diff --git a/runtime/src/distro/build.xml b/runtime/src/distro/build.xml new file mode 100644 index 0000000..03231d0 --- /dev/null +++ b/runtime/src/distro/build.xml @@ -0,0 +1,471 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/runtime/src/distro/src/docs/userguide/images/activiti_logo.png b/runtime/src/distro/src/docs/userguide/images/activiti_logo.png new file mode 100644 index 0000000..8d7ddba Binary files /dev/null and b/runtime/src/distro/src/docs/userguide/images/activiti_logo.png differ diff --git a/runtime/src/distro/src/docs/userguide/images/activiti_readme.png b/runtime/src/distro/src/docs/userguide/images/activiti_readme.png new file mode 100644 index 0000000..2653851 Binary files /dev/null and b/runtime/src/distro/src/docs/userguide/images/activiti_readme.png differ diff --git a/runtime/src/distro/src/license.txt b/runtime/src/distro/src/license.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/runtime/src/distro/src/license.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/runtime/src/distro/src/notice.txt b/runtime/src/distro/src/notice.txt new file mode 100644 index 0000000..eb1df73 --- /dev/null +++ b/runtime/src/distro/src/notice.txt @@ -0,0 +1,224 @@ +Activiti BPM Platform +Copyright 2010-2011 Alfresco Software, Ltd. + +The following activiti software libraries are distributed under the Apache License Version 2.0 (the ÒLicenseÓ): + * activiti-cxf--sources.jar + * activiti-cxf-.jar + * activiti-engine--sources.jar + * activiti-engine-.jar + * activiti-spring--sources.jar + * activiti-spring-.jar + +You may not use these files except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an ÒAS ISÓ BASIS, WITHOUT WARRANTIES OR CONDITIONS OR ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +This software package also includes third party components as listed below. +This software package includes changed source code of the following libraries: + +JUEL + * Location: http://juel.sourceforge.net/ + * Included in activiti-engine-5.8.jar in package org.activiti.engine.impl.juel + * License: Apache V2 + +Quartz + * Location: http://www.quartz-scheduler.org/ + * CronExpression is included in activiti-engine-5.8.jar in package org.activiti.engine.impl.calendar + * License: Apache V2 + +JSON + * Location: http://www.JSON.org/java + * Included in activiti-engine-5.8.jar in package org.activiti.engine.impl.json + * License: +=============================================================================== +Copyright (c) 2002 JSON.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +The Software shall be used for Good, not Evil. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +=============================================================================== + + +This software includes unchanged copies of the following libraries: + +FastInfoset-1.2.2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +XmlSchema-1.4.2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +abdera-client-0.4.0-incubating.jar : http://www.apache.org/licenses/LICENSE-2.0.html +abdera-core-0.4.0-incubating.jar : http://www.apache.org/licenses/LICENSE-2.0.html +abdera-extensions-html-0.4.0-incubating.jar : http://www.apache.org/licenses/LICENSE-2.0.html +abdera-extensions-json-0.4.0-incubating.jar : http://www.apache.org/licenses/LICENSE-2.0.html +abdera-extensions-main-0.4.0-incubating.jar : http://www.apache.org/licenses/LICENSE-2.0.html +abdera-i18n-0.4.0-incubating.jar : http://www.apache.org/licenses/LICENSE-2.0.html +abdera-parser-0.4.0-incubating.jar : http://www.apache.org/licenses/LICENSE-2.0.html +abdera-server-0.4.0-incubating.jar : http://www.apache.org/licenses/LICENSE-2.0.html +activation-1.1.jar : http://www.apache.org/licenses/LICENSE-2.0.html +antlr-2.7.7.jar : http://www.antlr.org/license.html (BSD license) +antlr-runtime-3.1.3.jar : http://www.antlr.org/license.html (BSD license) +aopalliance-1.0.jar : Public domain +apache-mime4j-0.6.jar : http://www.apache.org/licenses/LICENSE-2.0.html +asm-3.1.jar : http://asm.ow2.org/license.html +asm-3.2.jar : http://asm.ow2.org/license.html +asm-analysis-3.2.jar : http://asm.ow2.org/license.html +asm-commons-3.2.jar : http://asm.ow2.org/license.html +asm-tree-3.2.jar : http://asm.ow2.org/license.html +asm-util-3.2.jar : http://asm.ow2.org/license.html +axiom-api-1.2.5.jar : http://www.apache.org/licenses/LICENSE-2.0.html +axiom-impl-1.2.5.jar : http://www.apache.org/licenses/LICENSE-2.0.html +cglib-2.2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +commons-beanutils-1.7.0.jar : http://www.apache.org/licenses/LICENSE-2.0.html +commons-codec-1.3.jar : http://www.apache.org/licenses/LICENSE-2.0.html +commons-codec-1.4.jar : http://www.apache.org/licenses/LICENSE-2.0.html +commons-collections-3.1.jar : http://www.apache.org/licenses/LICENSE-2.0.html +commons-collections-3.2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +commons-dbcp-1.4.jar : http://www.apache.org/licenses/LICENSE-2.0.html +commons-digester-1.6.jar : http://www.apache.org/licenses/LICENSE-2.0.html +commons-el-1.0.jar : http://www.apache.org/licenses/LICENSE-2.0.html +commons-email-1.2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +commons-fileupload-1.2.1.jar : http://www.apache.org/licenses/LICENSE-2.0.html +commons-httpclient-3.1.jar : http://www.apache.org/licenses/LICENSE-2.0.html +commons-io-1.4.jar : http://www.apache.org/licenses/LICENSE-2.0.html +commons-lang-2.1.jar : http://www.apache.org/licenses/LICENSE-2.0.html +commons-lang-2.4.jar : http://www.apache.org/licenses/LICENSE-2.0.html +commons-logging-1.0.4.jar : http://www.apache.org/licenses/LICENSE-2.0.html +commons-logging-1.1.1.jar : http://www.apache.org/licenses/LICENSE-2.0.html +commons-pool-1.3.jar : http://www.apache.org/licenses/LICENSE-2.0.html +commons-pool-1.5.4.jar : http://www.apache.org/licenses/LICENSE-2.0.html +cxf-api-2.1.2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +cxf-common-schemas-2.1.2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +cxf-common-utilities-2.1.2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +cxf-rt-bindings-soap-2.1.2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +cxf-rt-bindings-xml-2.1.2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +cxf-rt-core-2.1.2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +cxf-rt-databinding-jaxb-2.1.2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +cxf-rt-frontend-jaxws-2.1.2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +cxf-rt-frontend-simple-2.1.2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +cxf-rt-transports-http-2.1.2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +cxf-rt-transports-http-jetty-2.1.2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +cxf-rt-ws-addr-2.1.2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +cxf-tools-common-2.1.2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +dom4j-1.6.1.jar : http://www.opensource.org/licenses/bsd-license.php +drools-api-5.1.1.jar : http://www.apache.org/licenses/LICENSE-2.0.html +drools-compiler-5.1.1.jar : http://www.apache.org/licenses/LICENSE-2.0.html +drools-core-5.1.1.jar : http://www.apache.org/licenses/LICENSE-2.0.html +ecj-3.5.1.jar : http://www.eclipse.org/org/documents/epl-v10.php +freemarker-2.3.13.jar : http://www.opensource.org/licenses/bsd-license.php +geronimo-activation_1.0.2_spec-1.1.jar : http://www.apache.org/licenses/LICENSE-2.0.html +geronimo-annotation_1.0_spec-1.1.1.jar : http://www.apache.org/licenses/LICENSE-2.0.html +geronimo-jaxws_2.1_spec-1.0.jar : http://www.apache.org/licenses/LICENSE-2.0.html +geronimo-jms_1.1_spec-1.0.1.jar : http://www.apache.org/licenses/LICENSE-2.0.html +geronimo-jpa_3.0_spec-1.0.jar : http://www.apache.org/licenses/LICENSE-2.0.html +geronimo-jta_1.1_spec-1.1.1.jar : http://www.apache.org/licenses/LICENSE-2.0.html +geronimo-servlet_2.5_spec-1.2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +geronimo-stax-api_1.0_spec-1.0.1.jar : http://www.apache.org/licenses/LICENSE-2.0.html +geronimo-ws-metadata_2.0_spec-1.1.2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +groovy-1.7.5.jar : http://www.apache.org/licenses/LICENSE-2.0.html +h2-1.2.132.jar: http://www.mozilla.org/MPL & http://opensource.org/licenses/eclipse-1.0.php +hamcrest-core-1.1.jar : http://www.opensource.org/licenses/bsd-license.php +htmlparser-1.0.5.jar : http://www.opensource.org/licenses/cpl1.0.php +htmlparser-1.6.jar : http://www.opensource.org/licenses/cpl1.0.php +httpclient-4.0.1.jar : http://www.apache.org/licenses/LICENSE-2.0.html +httpcore-4.0.1.jar : http://www.apache.org/licenses/LICENSE-2.0.html +httpmime-4.0.1.jar : http://www.apache.org/licenses/LICENSE-2.0.html +javassist-3.6.0.GA.jar : MPL http://www.mozilla.org/MPL/ and the LGPL http://www.opensource.org/licenses/lgpl-2.1.php +jaxb-api-2.2.1.jar : http://www.apache.org/licenses/LICENSE-2.0.html +jaxb-impl-2.2.1.jar : http://www.apache.org/licenses/LICENSE-2.0.html +jaxb-xjc-2.1.7.jar : http://www.apache.org/licenses/LICENSE-2.0.html +jaxen-1.1.1.jar : http://jaxen.codehaus.org/license.html (modified apache license) +jcip-annotations-1.0.jar : Creative Commons Attribution License http://creativecommons.org/licenses/by/2.5 +jetty-continuation-7.2.0.v20101020.jar : http://www.apache.org/licenses/LICENSE-2.0.html +jetty-http-7.2.0.v20101020.jar : http://www.apache.org/licenses/LICENSE-2.0.html +jetty-io-7.2.0.v20101020.jar : http://www.apache.org/licenses/LICENSE-2.0.html +jetty-server-7.2.0.v20101020.jar : http://www.apache.org/licenses/LICENSE-2.0.html +jetty-util-7.2.0.v20101020.jar : http://www.apache.org/licenses/LICENSE-2.0.html +js-1.6R7.jar : Mozilla Public License version 1.1 http://www.mozilla.org/MPL/MPL-1.1.html +json-20070829.jar : http://www.json.org/java/ free software +jstl-1.1.0.jar : http://www.apache.org/licenses/LICENSE-2.0.html +jtds-1.2.4.jar : LGPL http://www.opensource.org/licenses/lgpl-2.1.php (no version mentioned) +junit-4.8.1.jar : http://www.opensource.org/licenses/cpl1.0.php +livetribe-jsr223-2.0.6.jar : http://www.apache.org/licenses/LICENSE-2.0.html +log4j-1.2.14.jar : http://www.apache.org/licenses/LICENSE-2.0.html +mail-1.4.1.jar : CDDL https://glassfish.dev.java.net/javaee5/mail/ +mime-util-2.1.3.jar : http://www.apache.org/licenses/LICENSE-2.0.html +mockito-core-1.8.2.jar : MIT http://www.opensource.org/licenses/mit-license.php +mvel2-2.0.16.jar : http://www.apache.org/licenses/LICENSE-2.0.html +mybatis-3.0.1.jar : http://www.apache.org/licenses/LICENSE-2.0.html +myfaces-api-1.1.5.jar : http://www.apache.org/licenses/LICENSE-2.0.html +myfaces-impl-1.1.5.jar : http://www.apache.org/licenses/LICENSE-2.0.html +mysql-connector-java-5.1.6.jar : GPL http://www.gnu.org/licenses/old-licenses/gpl-2.0.html +neethi-2.0.4.jar : http://www.apache.org/licenses/LICENSE-2.0.html +objenesis-1.0.jar : http://www.apache.org/licenses/LICENSE-2.0.html +openjpa-1.2.2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +org.osgi.core-4.2.0.jar : http://www.apache.org/licenses/LICENSE-2.0.html +org.restlet-2.0.4.jar : LGPL 3.0 license http://www.opensource.org/licenses/lgpl-3.0.html, LGPL 2.1 license http://www.opensource.org/licenses/lgpl-2.1.php, CDDL 1.0 license http://www.opensource.org/licenses/cddl1.php, EPL 1.0 http://www.opensource.org/licenses/eclipse-1.0.php +org.restlet.ext.httpclient-2.0.4.jar : LGPL 3.0 license http://www.opensource.org/licenses/lgpl-3.0.html, LGPL 2.1 license http://www.opensource.org/licenses/lgpl-2.1.php, CDDL 1.0 license http://www.opensource.org/licenses/cddl1.php, EPL 1.0 http://www.opensource.org/licenses/eclipse-1.0.php +org.restlet.ext.json-2.0.4.jar : LGPL 3.0 license http://www.opensource.org/licenses/lgpl-3.0.html, LGPL 2.1 license http://www.opensource.org/licenses/lgpl-2.1.php, CDDL 1.0 license http://www.opensource.org/licenses/cddl1.php, EPL 1.0 http://www.opensource.org/licenses/eclipse-1.0.php +org.restlet.ext.xml-2.0.4.jar : LGPL 3.0 license http://www.opensource.org/licenses/lgpl-3.0.html, LGPL 2.1 license http://www.opensource.org/licenses/lgpl-2.1.php, CDDL 1.0 license http://www.opensource.org/licenses/cddl1.php, EPL 1.0 http://www.opensource.org/licenses/eclipse-1.0.php +org.restlet.lib.org.json-2.0.jar : LGPL 3.0 license http://www.opensource.org/licenses/lgpl-3.0.html, LGPL 2.1 license http://www.opensource.org/licenses/lgpl-2.1.php, CDDL 1.0 license http://www.opensource.org/licenses/cddl1.php, EPL 1.0 http://www.opensource.org/licenses/eclipse-1.0.php +persistence-api-1.0.jar : CDDL http://www.opensource.org/licenses/cddl1 +postgresql-8.4-701.jdbc4.jar : BSD http://www.opensource.org/licenses/bsd-license.php +saaj-api-1.3.jar : CDDL http://www.opensource.org/licenses/cddl1 +saaj-impl-1.3.jar : CDDL http://www.opensource.org/licenses/cddl1 +scannotation-1.0.2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +serp-1.13.1.jar : BSD http://www.opensource.org/licenses/bsd-license.php +servlet-api-2.5.jar : http://developers.sun.com/license/berkeley_license.html +signavio-core-components-1.0.jar : MIT http://www.opensource.org/licenses/mit-license.php +slf4j-api-1.5.6.jar : MIT http://www.opensource.org/licenses/mit-license.php +slf4j-api-1.6.1.jar : MIT http://www.opensource.org/licenses/mit-license.php +slf4j-jdk14-1.6.1.jar : MIT http://www.opensource.org/licenses/mit-license.php +slf4j-log4j12-1.5.6.jar : MIT http://www.opensource.org/licenses/mit-license.php +spring-aop-3.0.3.RELEASE.jar : http://www.apache.org/licenses/LICENSE-2.0.html +spring-asm-3.0.0.RELEASE.jar : http://www.apache.org/licenses/LICENSE-2.0.html +spring-asm-3.0.3.RELEASE.jar : http://www.apache.org/licenses/LICENSE-2.0.html +spring-beans-3.0.0.RELEASE.jar : http://www.apache.org/licenses/LICENSE-2.0.html +spring-beans-3.0.3.RELEASE.jar : http://www.apache.org/licenses/LICENSE-2.0.html +spring-context-3.0.0.RELEASE.jar : http://www.apache.org/licenses/LICENSE-2.0.html +spring-context-3.0.3.RELEASE.jar : http://www.apache.org/licenses/LICENSE-2.0.html +spring-context-support-3.0.0.RELEASE.jar : http://www.apache.org/licenses/LICENSE-2.0.html +spring-core-3.0.0.RELEASE.jar : http://www.apache.org/licenses/LICENSE-2.0.html +spring-core-3.0.3.RELEASE.jar : http://www.apache.org/licenses/LICENSE-2.0.html +spring-expression-3.0.0.RELEASE.jar : http://www.apache.org/licenses/LICENSE-2.0.html +spring-expression-3.0.3.RELEASE.jar : http://www.apache.org/licenses/LICENSE-2.0.html +spring-jdbc-3.0.3.RELEASE.jar : http://www.apache.org/licenses/LICENSE-2.0.html +spring-orm-3.0.3.RELEASE.jar : http://www.apache.org/licenses/LICENSE-2.0.html +spring-surf-1.0.0-RC2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +spring-surf-api-1.0.0-RC2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +spring-surf-core-1.0.0-RC2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +spring-surf-core-configservice-1.0.0-RC2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +spring-test-3.0.3.RELEASE.jar : http://www.apache.org/licenses/LICENSE-2.0.html +spring-tx-3.0.3.RELEASE.jar : http://www.apache.org/licenses/LICENSE-2.0.html +spring-web-2.0.8.jar : http://www.apache.org/licenses/LICENSE-2.0.html +spring-web-3.0.0.RELEASE.jar : http://www.apache.org/licenses/LICENSE-2.0.html +spring-web-3.0.3.RELEASE.jar : http://www.apache.org/licenses/LICENSE-2.0.html +spring-webmvc-3.0.0.RELEASE.jar : http://www.apache.org/licenses/LICENSE-2.0.html +spring-webscripts-1.0.0-RC2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +spring-webscripts-api-1.0.0-RC2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +stax-api-1.0-2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +subethasmtp-smtp-1.2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +subethasmtp-wiser-1.2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +urlrewritefilter-3.1.0.jar : BSD http://www.opensource.org/licenses/bsd-license.php +vaadin-6.5.2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +velocity-1.4.jar : http://www.apache.org/licenses/LICENSE-2.0.html +velocity-dep-1.4.jar : http://www.apache.org/licenses/LICENSE-2.0.html +wsdl4j-1.6.2.jar : http://www.opensource.org/licenses/cpl1.0.php +wstx-asl-3.2.1.jar : http://www.apache.org/licenses/LICENSE-2.0.html +wstx-asl-3.2.4.jar : http://www.apache.org/licenses/LICENSE-2.0.html +xercesImpl-2.9.1.jar : http://www.apache.org/licenses/LICENSE-2.0.html +xml-apis-1.0.b2.jar : CDDL http://www.opensource.org/licenses/cddl1 +xml-apis-1.3.04.jar : CDDL http://www.opensource.org/licenses/cddl1 +xml-resolver-1.2.jar : http://www.apache.org/licenses/LICENSE-2.0.html +xpp3_min-1.1.4c.jar : http://www.extreme.indiana.edu/viewcvs/~checkout~/XPP3/java/LICENSE.txt Apache 1.0 variant +xstream-1.3.1.jar : BSD http://www.opensource.org/licenses/bsd-license.php diff --git a/runtime/src/distro/src/readme.html b/runtime/src/distro/src/readme.html new file mode 100644 index 0000000..c9c145e --- /dev/null +++ b/runtime/src/distro/src/readme.html @@ -0,0 +1,1595 @@ + + + + + Activiti Readme + + + + + +

License

+

All the software included in this distribution is distributed under Apache license V2 + unless for these exceptions: +

+
    +
  • We are including slightly modified source code of the Apache Licensed JUEL 2.2.1, created by Odysseus Software GmbH.
  • +
+ +

Documentation

+ + +

Links for demo setup

+

After running the demo setup, + you can open the Activiti Explorer +

+ +

Other Links

+ + A more elaborate collection of Activiti-links can be found on the + Activiti Community page + +

Activiti Release Notes

+ + +

Release Notes - Activiti - Version 5.8

+ +

Highlights

+
    +
  • Asynchronous continations (tech preview)
  • +
  • Added BPMN inclusive gateway
  • +
  • Improved Spring support
  • +
  • CDI integration improvements
  • +
  • Bug fixes
  • +
+ +

Bug +

+
    +
  • [ACT-908] - Designer .activiti file won't compile and generate a BPMN 2.0 xml file +
  • +
  • [ACT-910] - duplication of flownodes when nodes are out of order +
  • +
  • [ACT-919] - Activiti-cdi: make interceptors serializable +
  • +
  • [ACT-922] - Activiti-cdi: make sure to use the right BeanManager in ProgrammaticLookups +
  • +
  • [ACT-924] - BPMN Export fails for Sequence Flows under IBM JDK because of wrong namespace definition in SequenceFlowExport.java +
  • +
  • [ACT-937] - Desiger form property editor flips ID and Name fields +
  • +
  • [ACT-939] - Mime-type and extension of uploaded attachments isn't handled correctly +
  • +
  • [ACT-943] - ReceiveTask with TimerBoundaryEvent not working as expected ! +
  • +
  • [ACT-957] - Unable to add 2 timerBoundaryEvents in sub process +
  • +
+ +

Improvement +

+
    +
  • [ACT-288] - Variable with authenticated user for be used inside form +
  • +
  • [ACT-909] - Null-check for process name in explorer2 ui +
  • +
  • [ACT-918] - Activiti-cdi: revisit process variable handling and interceptor +
  • +
  • [ACT-926] - Add method that is called when root-element of BPMN is parsed to BPMNParseListener +
  • +
+ +

New Feature +

+
    +
  • [ACT-126] - Asynchronous continuations +
  • +
  • [ACT-890] - Add Inclusive Gateway Support +
  • +
  • [ACT-916] - Activiti-cdi: add thread context for thread-scoped associations +
  • +
  • [ACT-917] - Activiti-cdi: add execution-based associations. +
  • +
+ + +

Release Notes - Activiti - Version 5.7

+ +

Highlights

+
    +
  • A new Activiti Explorer application completely rewritten in Vaadin
  • +
  • The REST services have been rewritten to Restlet
  • +
+ +

Important

+ +

+ A couple of add-on applications have spun off from the Activiti download and + started life on their own. Activiti Modeler continues as a Google code project + called Signavio Core Components. + Activiti Cycle now lives on as Camunda Fox. + An evolved version of Activiti KickStart will become part of a new Alfresco cloud case management + solution. +

+ +

+ Activiti Explorer has acquired Activiti Probe for an undisclosed amount :-) The resulting + Activiti Explorer has been restyled and includes more dynamic task management features. +

+ +

+ The REST services were rewritten with the Restlet framework with backwards compatibility, so the REST interfaces haven't changed. + The previous versions of Activiti included a REST services web application that used the Spring Surf and Webscripts framework. + To implement a new or revised REST service you had to learn these frameworks. With moving to Restlet implementing new or revised REST services has become really simple. +

+ +

+ The demo setup has been limited to H2 database only, as many people struggled with getting + the demo setup to run on their databases. The demo setup is a quick way to get familiar + with Activiti and its tools, but it is by no means meant for production purposes. + A section 'Changing the database' has been added to the userguide and is intended for advanced users + who want to run the Activiti tools on their servers and databases. +

+ + +

Sub-task +

+
    +
  • [ACT-705] - Enable opening a call activity's process if it exists in the workspace +
  • +
+ +

Bug +

+
    +
  • [ACT-481] - Replacing MailTask with ServiceTask by reconnecting connections renders different type of connection after deletion of MailTask +
  • +
  • [ACT-629] - BPMN waypoints are not created accurately +
  • +
  • [ACT-768] - JtaTransactionInterceptor should not rollback existing JTA transactions but use setRollbackOnly instead +
  • +
  • [ACT-803] - Activiti-Designer creates activiti:field for empty field-values which causes an error on deployment of bar on activiti-probe +
  • +
  • [ACT-842] - Activiti explorer pretty-time label tooltip doesn't show time, only date +
  • +
  • [ACT-856] - Error format xml in parameters of Call-Activity +
  • +
  • [ACT-867] - Login page of activiti explorer 2 is not showing in ie +
  • +
  • [ACT-879] - Designer plugin creates multiple extensionElements Nodes in a serviceTask Node +
  • +
+ +

Improvement +

+
    +
  • [ACT-730] - Easier way to retrieve businessKey from task listeners +
  • +
  • [ACT-833] - [PATCH] make new explorer SSO friendly +
  • +
  • [ACT-835] - Make commands serializable +
  • +
  • [ACT-841] - Designer changes timer start event to none start event +
  • +
  • [ACT-843] - Rendering variable values in process-instance view should be made pluggable +
  • +
  • [ACT-860] - Ability to set targetNamespace /process definition category +
  • +
  • [ACT-880] - Add query capbility to search for historic process instances based on the parent process instance id +
  • +
+ +

New Feature +

+
    +
  • [ACT-450] - Use a Activiti XSD for the XML editor +
  • +
  • [ACT-708] - Allow dragging a shape and connector directly from the context buttons +
  • +
  • [ACT-846] - Add Scrollbars to Process image in Explorer2 +
  • +
  • [ACT-852] - Support timer start event +
  • +
+ +

Task +

+
    +
  • [ACT-436] - Create retry interceptor +
  • +
  • [ACT-773] - Define strategy for classloading +
  • +
  • [ACT-787] - Enable probe functionality subset in the new webapp +
  • +
  • [ACT-836] - Cleaning obsolete modules from codebase +
  • +
  • [ACT-839] - Remove impl from the public javadocs +
  • +
  • [ACT-849] - Integrate explorer 2 in demo setup +
  • +
  • [ACT-857] - Limit demo setup to H2 +
  • +
  • [ACT-864] - Add support for MS SQL bootstrap +
  • +
+ + +

Release Notes - Activiti - Version 5.6

+

Highlights

+
    +
  • Added direct Mule and Camel integration
  • +
  • Easier way to retrieve businessKey from task listeners
  • +
  • Improved support for Alfresco processes
  • +
  • Added support for delegateExpressions in tasklistener
  • +
  • Added support for BPMN multi instance in the eclipse designer
  • +
  • Extended length of all user defined text columns to 4000
  • +
+ +

Known upgrade limitation

+

In the DB schema creation scripts, we've enlarged the max size of certain varchar columns from 255 to 4000. + See ACT-236. These schema updates are not part of the + automatic upgrade procedure. +

+ +

Max length of following columns has been set to 4000: +

+ +
    +
  • ACT_RU_JOB.EXCEPTION_MSG_
  • +
  • ACT_RU_JOB.HANDLER_CFG_
  • +
  • ACT_RE_PROCDEF.RESOURCE_NAME_
  • +
  • ACT_RE_PROCDEF.DGRM_RESOURCE_NAME_
  • +
  • ACT_RU_TASK.DESCRIPTION_
  • +
  • ACT_RU_VARIABLE.TEXT_
  • +
  • ACT_RU_VARIABLE.TEXT2_
  • +
  • ACT_HI_TASKINST.DESCRIPTION_
  • +
  • ACT_HI_TASKINST.DELETE_REASON_
  • +
  • ACT_HI_DETAIL.TEXT_
  • +
  • ACT_HI_DETAIL.TEXT2_
  • +
  • ACT_HI_COMMENT.MESSAGE_
  • +
  • ACT_HI_ATTACHMENT.DESCRIPTION_
  • +
  • ACT_HI_ATTACHMENT.URL_
  • +
+ +

If you want to perform these changes, you can do that manually. Check your database capabilities for the + easiest way on changing the type of columns from varchar(255) to varchar(4000). As a fall back, + for each table affected, you can: +

+
    +
  1. create a new temporary table
  2. +
  3. copy the contents from the original to the temporary table
  4. +
  5. delete the original table
  6. +
  7. recreate the original table using the new create script with the proper lengths
  8. +
  9. copy the contents from the temporary table back to the new original table
  10. +
  11. drop the temporary table
  12. +
+ +

Bug +

+
    +
  • [ACT-665] - Activiti Designer 0.8.0 can not delete by keyboard +
  • +
  • [ACT-691] - Cannot see property changes when clicking on new tasks (Activiti Engine) +
  • +
  • [ACT-786] - NPE on default sequenceFlow without id +
  • +
  • [ACT-803] - Activiti-Designer creates activiti:field for empty field-values which causes an error on deployment of bar on activiti-probe +
  • +
  • [ACT-806] - Bug: multi instance service task with collection doesnt inject collection element +
  • +
  • [ACT-808] - Support for default sequence flow in Activiti Designer +
  • +
  • [ACT-809] - Deploying Webservice +
  • +
  • [ACT-813] - deleting task cascading problem for new variable instances +
  • +
  • [ACT-826] - Rules Filter in Business Rules Task +
  • +
+ +

Improvement +

+
    +
  • [ACT-730] - Easier way to retrieve businessKey from task listeners +
  • +
  • [ACT-795] - Refactor BPMN 2.0 validation to worker list +
  • +
+ +

New Feature +

+
    +
  • [ACT-236] - Introduce new variable type text +
  • +
  • [ACT-781] - Allow to set charset when sending email +
  • +
  • [ACT-797] - Set a userTask priority on the bpmn20.xml +
  • +
  • [ACT-799] - Implement support for specifying timer event definitions other than timeDuration +
  • +
  • [ACT-805] - Add Ant view to Activiti perspective +
  • +
  • [ACT-807] - support definition of delegateExpressions in tasklistener +
  • +
  • [ACT-811] - Support BPMN Multi-instance +
  • +
+ +

Task +

+
    +
  • [ACT-703] - Complement palette +
  • +
  • [ACT-780] - Enhancing the create task input field +
  • +
  • [ACT-788] - Enable Alfresco user repository integration in the new webapp +
  • +
+ +

Release Notes - Activiti - Version 5.5

+ +

Highlights

+
    +
  • Added CDI support
  • +
  • Added dynamic sub task capabilities
  • +
  • Added support for event/activity streams
  • +
  • In the eclipse process designer,added support for default value for CustomServiceTask fields
  • +
  • Simplified persistence
  • +
  • Performance improvements
  • +
  • Many bug fixes
  • +
+ +

Bug +

+
    +
  • [ACT-477] - Creating new diagram using wizard with existing name overwrites without warning +
  • +
  • [ACT-718] - Ternary operator not working in Listener field expression +
  • +
  • [ACT-757] - calledElement missing from call activity in generated bpmn +
  • +
  • [ACT-764] - MultiInstance doesn't work for serviceTask +
  • +
  • [ACT-765] - Initial priority from task is not stored on HistoricTaskInstanceEntity +
  • +
  • [ACT-766] - Querying tasks causes HistoricTaskInstanceEntity to be loaded for each result +
  • +
  • [ACT-782] - Javadoc of org.activiti.engine.test.Deployment is inconsistent with its implementation +
  • +
+ +

Improvement +

+
    +
  • [ACT-653] - When folders src/test/java and src/test/resources are missing my unittests are not generated +
  • +
  • [ACT-725] - Expose task query criteria for priority >= and <= in addition to = +
  • +
  • [ACT-728] - When creating a process model not in src/main/resources (e.g. test), the activiti file is created in the src/main/resources anyway +
  • +
  • [ACT-732] - Upgrade to iBatis 3.04 +
  • +
  • [ACT-735] - Task owner is not stored on the HistoricTaskInstance +
  • +
  • [ACT-742] - Use spring to wire explorer 2 application +
  • +
  • [ACT-744] - Management pages should only be visible for admins +
  • +
  • [ACT-750] - Refactor task-lists in explorer 2 +
  • +
  • [ACT-752] - Add more demo-data to explorer 2 +
  • +
  • [ACT-753] - Navigate to task URL for task where user is not involved should be forbidden +
  • +
+ +

New Feature +

+
    +
  • [ACT-559] - Allow default value for CustomServiceTask fields +
  • +
  • [ACT-644] - Add support for dynamic subtasks +
  • +
  • [ACT-743] - Add screen to edit user profile +
  • +
  • [ACT-746] - Add people involvement in task UI +
  • +
  • [ACT-747] - Add support for dynamic tasks in explorer UI +
  • +
  • [ACT-748] - Add support for showing/adding subtasks in UI +
  • +
  • [ACT-751] - Show event-stream in new explorer +
  • +
  • [ACT-755] - Add/remove related URL to task +
  • +
  • [ACT-759] - Allow user assignable Id for process elements. +
  • +
  • [ACT-760] - Add Skype buttons +
  • +
+ +

Task +

+
    +
  • [ACT-741] - Refactoring persistence +
  • +
  • [ACT-754] - Apply styling to vaadin-components +
  • +
  • [ACT-767] - Add support for Events +
  • +
  • [ACT-790] - Look at cycle persistence +
  • +
+ +

Test +

+
    +
  • [ACT-745] - Incorporate user/group administration into explorer 2 +
  • +
+ +

Release Notes - Activiti - Version 5.4

+ +

Compatibility note

+

After releasing 5.3, we discovered that + execution listeners and task listeners and expressions were still in non-public api. Those classes were in subpackages + of org.activiti.engine.impl..., which has impl in it). + org.activiti.engine.impl.pvm.delegate.ExecutionListener, + org.activiti.engine.impl.pvm.delegate.TaskListener and + org.activiti.engine.impl.pvm.el.Expression + have been deprecated. From now on, you should use org.activiti.engine.delegate.ExecutionListener, + org.activiti.engine.delegate.TaskListener and org.activiti.engine.delegate.Expression. + In the new publicly available API, access to + ExecutionListenerExecution.getEventSource() has been removed. Apart from the deprecation + compiler warning, the existing code should run fine. But consider switching to the new public + API interfaces (without .impl. in the package name). +

+ +

Highlights

+
    +
  • Added first version of BPM-Roundtrip with Activiti Cycle (see this Screencast)
  • +
  • Started building case management features in the engine: Added dynamic comments, attachments and due dates to tasks in Activiti Engine
  • +
  • IMAP folder scanning for new tasks
  • +
  • Added accounts to users in Activiti Engine
  • +
  • Provided support to specify form properties in Activiti Designer Eclipse plugin
  • +
  • Many bug fixes
  • +
+ +

Sub-task +

+
    +
  • [ACT-692] - Activiti Designer 0.8.0 can not show diagram with callActivity tasks +
  • +
+ +

Bug +

+
    +
  • [ACT-607] - Developer Friendly BPMN doesn't remove Pools/Lanes in DI +
  • +
  • [ACT-634] - Generated Jar file is invalid +
  • +
  • [ACT-666] - Activiti 5.3 demo setup does not work on JDK 5 +
  • +
  • [ACT-667] - Diagram is cut off in some cases +
  • +
  • [ACT-668] - Mail task doesnt leave activity +
  • +
  • [ACT-670] - Designer 0.8.0 generates wrong bpmnElement references for subprocess elements +
  • +
  • [ACT-681] - Db autodiscovery for DB2 does not work on all installations of DB2 +
  • +
  • [ACT-685] - Executing processes can cause StackOverflows +
  • +
  • [ACT-695] - Exception when using HistoricVariables of type ByteArray on Postgres +
  • +
  • [ACT-731] - Webservice invocation doesnt continue process execution +
  • +
+ +

Improvement +

+
    +
  • [ACT-655] - Throw better exception when form is not found +
  • +
  • [ACT-669] - FormService.submitStartFormData should provide a way to specify businessKey for process instance +
  • +
+ +

New Feature +

+
    +
  • [ACT-459] - Query for tasks for a specific process definition +
  • +
  • [ACT-564] - Add dueDate to tasks +
  • +
  • [ACT-661] - Parse process definition documentation +
  • +
  • [ACT-663] - Provide support to specify form properties +
  • +
  • [ACT-672] - Allow querying task based on process-instance variable +
  • +
  • [ACT-673] - Extend HistoricTaskInstanceQuery sorting: assignee, taskId +
  • +
  • [ACT-675] - Allow querying HistoricTaskInstances based on the state of historic process-instance (running/completed) +
  • +
  • [ACT-676] - Allow querying HistoricTaskInstances based on the value of the last variable-update for a certain task-variable +
  • +
  • [ACT-677] - Query HistoricTaskInstances based on the process definition key, id and name +
  • +
  • [ACT-688] - Add comments to tasks and process instances +
  • +
  • [ACT-712] - Create feature that scans a IMAP-folder and creates task for each email in it. +
  • +
+ +

Task +

+
    +
  • [ACT-628] - Resolve publicly exposed implementation classes +
  • +
  • [ACT-648] - Fix activiti-cycle-maven-template.zip +
  • +
  • [ACT-649] - Document process instance visualization in Probe & REST +
  • +
  • [ACT-650] - Verify links to jdk, eclipse and ant in userguide +
  • +
  • [ACT-652] - Ensure docs on how to deploy from designer to engine +
  • +
  • [ACT-679] - Add attachments to tasks and to process instances +
  • +
  • [ACT-687] - Add owner property to tasks +
  • +
  • [ACT-690] - Verify activiti dependency versions against the ones used in Alfresco +
  • +
  • [ACT-694] - Add photo, skypeid and other account data to identities +
  • +
  • [ACT-696] - Prototype new Explorer UI +
  • +
+ + +

Release Notes - Activiti - Version 5.3

+ +

Highlights

+
    +
  • Added BPMN multi instance (==foreach) support
  • +
  • Added BPMN intermediate timer catch event
  • +
  • Added business rule task with Drools integration
  • +
  • Improved Spring integrations: added possibility to limit visibility of beans and also exposed spring beans in scripts
  • +
  • Added administrator console to manage users and groups
  • +
  • Added automatic DB type discovery
  • +
  • Various bug fixes
  • +
+ +

Bug +

+
    +
  • [ACT-485] - Fields in HistoricTaskInstance aren't updated when corresponding Task fields are updated using API +
  • +
  • [ACT-568] - Deleting an gateway does not delete the associated sequence flows +
  • +
  • [ACT-575] - Name of node in diagram not updated in specific case +
  • +
  • [ACT-589] - Kickstart does not display properly on 1024x768 +
  • +
  • [ACT-592] - Nullpointer when trying to set variables on process-instance which is waiting in a Task with a timer on it, when history-level is FULL +
  • +
  • [ACT-598] - Bug in drawing of process diagrams: sequence flow out of gateways can't have conditional markers +
  • +
  • [ACT-599] - BPMN20ExportMarshaller generates wrong id for startEvent and endEvent elements of subProcesses +
  • +
  • [ACT-603] - docs for generated processdefinition id not correct +
  • +
  • [ACT-604] - Cannot add variables to standalone task when history level is 'full' +
  • +
  • [ACT-610] - ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE does not work with Oracle +
  • +
  • [ACT-611] - It's not possible to delete sequenceFlows +
  • +
  • [ACT-612] - ServiceTask: Switching the type from class to expression doesn't update BPMN2.0.xml +
  • +
  • [ACT-618] - Call of setter before null check in file BpmnParse +
  • +
  • [ACT-621] - When creating HistoricFormPropertyEntity query for HistoricActivityInstance isn't limited to the active one +
  • +
  • [ACT-625] - Task form just displays a Failure error when deployed from Eclipse Designer +
  • +
  • [ACT-627] - Subprocess Start and End event ids incorrectly generated +
  • +
  • [ACT-629] - BPMN waypoints are not created accurately +
  • +
  • [ACT-631] - Investigate potential concurrency bug +
  • +
  • [ACT-637] - Using a call activity with activiti: in extension for variable passing results in null pointer when history level set to "full" +
  • +
+ +

Improvement +

+
    +
  • [ACT-429] - Allow to use expressions in timer duration +
  • +
  • [ACT-484] - Add task priority to HistoricTaskInstance +
  • +
  • [ACT-529] - Processimage name does not follow conventions used by explorer/API to show or get image +
  • +
  • [ACT-530] - Deployment doesn't export process image +
  • +
  • [ACT-549] - Need brief documentation of working with Eclipse Designer Sources +
  • +
  • [ACT-584] - Add ability to delete IdentityLinks using API and DelegateTask +
  • +
  • [ACT-585] - Limiting/disabling spring-beans in expressions should be possible +
  • +
  • [ACT-587] - FieldInjection should try public setter first and revert to setting private field +
  • +
  • [ACT-600] - Review and improve 10 minute tutorial +
  • +
  • [ACT-601] - Review and improve Designer section in userguide +
  • +
+ +

New Feature +

+
    +
  • [ACT-469] - Add support for specifying a Form key for StartEvent in Designer +
  • +
  • [ACT-483] - Support for specifying a form (form key) on a StartEvent +
  • +
  • [ACT-506] - For each support (Multi instance) +
  • +
  • [ACT-527] - Implement a Business Rule Task with Drools integration +
  • +
  • [ACT-581] - CallActivity with in/out parameters: Add sourceExpression and documentation to User Guide +
  • +
  • [ACT-582] - Add deleteHistoricProcessInstance() to HistoryService +
  • +
  • [ACT-588] - Extend TaskQuery to add variableValue querying similar to the ProcessInstanceQuery +
  • +
  • [ACT-593] - Allow firing of custom events to the active node on a given execution +
  • +
  • [ACT-596] - Result DTO of KickstartService.findKickstartWorkflowById() is missing Task-ID's +
  • +
  • [ACT-606] - Open existing BPMN XML directly in the project with the Designer +
  • +
  • [ACT-641] - Implement intermediate timer catch event +
  • +
+ +

Task +

+
    +
  • [ACT-97] - Expose spring beans in Scripts +
  • +
  • [ACT-416] - Document how to open mgr of the in memory db +
  • +
  • [ACT-422] - Make spring parsing dependency optional +
  • +
  • [ACT-442] - expose root cause for class not found exceptions +
  • +
  • [ACT-526] - Provide Money tasks example code from userguide in repository +
  • +
  • [ACT-540] - Distill db name from the datasource +
  • +
  • [ACT-571] - Upgrade KickStart to Vaadin 6.5.0 +
  • +
  • [ACT-574] - Rename service task resultVariableName to resultVariable +
  • +
  • [ACT-623] - Simplify access to process engine configuration through Context +
  • +
  • [ACT-632] - Update repo link +
  • +
  • [ACT-642] - Include MIT license file in the activiti-modeler.war distribution file +
  • +
  • [ACT-645] - Merge Administrator branch into trunk +
  • +
+ + + +

Release Notes - Activiti - Version 5.2

+ +

Highlights

+
    +
  • First version of the jBPM-Activiti migration
  • +
  • Visualization of the current activity in Activiti Probe
  • +
  • Added support for BPMN error event in Activiti Engine
  • +
  • Added support for BPMN 2.0 import in Activiti Designer
  • +
  • Improved form datatypes
  • +
  • Automated in container testing
  • +
  • Various bug fixes
  • +
+ +

Sub-task +

+
    +
  • [ACT-512] - Add Checkbox control +
  • +
  • [ACT-513] - Add static dropdown control +
  • +
  • [ACT-514] - Add radio control +
  • +
  • [ACT-515] - Add datepicker control +
  • +
+ +

Bug +

+
    +
  • [ACT-428] - It is not possible to use function with more then 1 argument as custom assignment handler for candidateGroups +
  • +
  • [ACT-473] - ProcessEngineFactoryBean fails to register created process engine properly +
  • +
  • [ACT-474] - Activiti Designer doesn't support multiple end events +
  • +
  • [ACT-479] - Vacation Request form example code in user guide is not correct +
  • +
  • [ACT-505] - Process definition cache not in sync when redeploying process definition with same generated id +
  • +
  • [ACT-509] - Reported progress for ExportMarshallers and ProcessValidators is incorrect +
  • +
  • [ACT-533] - In Eclipse the export process to bpmn20.xml fails in some attributes of "UserTask" +
  • +
  • [ACT-557] - Field TASK_DEF_KEY_ is not populated on ACT_HI_TASK and not exposed on HistoricTaskInstance +
  • +
  • [ACT-572] - Maven "check" profile states successful build when there are test-failures +
  • +
+ +

Improvement +

+
    +
  • [ACT-467] - Invalid small icon path throws unclear exception +
  • +
  • [ACT-492] - Incorrect icon paths result in exceptions for CustomServiceTasks +
  • +
  • [ACT-498] - Include active activity instance id on HistoricVariableUpdate when variable is updated +
  • +
  • [ACT-499] - Start- and end-event should also be include as HistoricActivityInstance when history-level is at FULL +
  • +
  • [ACT-534] - The BPMN validator should not fail validation if CustomServiceTasks are included +
  • +
  • [ACT-567] - Allow assignee of a task to be set to null +
  • +
+ +

New Feature +

+
    +
  • [ACT-15] - Implement BPMN boundary error event +
  • +
  • [ACT-281] - BPMN default sequence flow +
  • +
  • [ACT-354] - Add data mapping capabilities in call activity +
  • +
  • [ACT-446] - Add support for execution and task listener configuration +
  • +
  • [ACT-447] - Add support for a receive task +
  • +
  • [ACT-511] - Add support for simple controls in CustomServiceTasks +
  • +
  • [ACT-543] - Capture initiator in KickStart +
  • +
  • [ACT-554] - Return deploymentId when deploying process in AdhocWorkflowService (KickStart) +
  • +
  • [ACT-555] - Rename AdhocWorkflowService to KickstartService +
  • +
  • [ACT-560] - Improve CallActivity for independant subprocess to support parameters +
  • +
  • [ACT-563] - Start JBPM Migration +
  • +
  • [ACT-569] - Visualize current activities of process instances in probe +
  • +
+ +

Task +

+
    +
  • [ACT-108] - Create server script for continuous integration +
  • +
  • [ACT-457] - Support the documentation element +
  • +
  • [ACT-486] - User library is not present by default +
  • +
  • [ACT-494] - Refactor deployments +
  • +
  • [ACT-496] - Change action icons to links +
  • +
  • [ACT-504] - Document exception handling in service task +
  • +
  • [ACT-510] - Check export for each PropertyType to BPMN +
  • +
  • [ACT-544] - Fix oracle metadata problem +
  • +
+ +

Wish +

+
    +
  • [ACT-188] - Source jar files are not published on maven repository +
  • +
  • [ACT-476] - document the activiti database tables +
  • +
+ + +

Release Notes - Activiti - Version 5.1

+ +

Warning

+

The automatic upgrade does not have enough coverage to have full confidence. + For more info, see the user guide, section Database upgrade. +

+ +

Changes

+
    +
  • In attribute <serviceTask delegateExpression="..."> previously always performed a leave after + calling the delegate that was obtained by evaluating the expression. Which means that it's always an automatic + activity. Now the leave is only performed only when the delegate object implements JavaDelegate. In case the + delegate object implements ActivityBehavior the leave will not be called. In that case, the ActivityBehavior is + responsible for calling leave if it wants to be an automatic activity. +
  • +
+ +

Highlights

+
    +
  • Added Activiti KickStart making the creation of new BPMN process models as easy as 1, 2, 3
  • +
  • Added automatic upgrade of the DB schema from 5.0 to 5.1
  • +
  • Added generation of process definition diagram based on DI information
  • +
  • Added display of process definition diagram
  • +
  • Added historic task instances
  • +
  • Added Comments to artifacts in Cycle
  • +
  • Improved Cycle Plug-In Infrastructure (now using Annotations)
  • +
  • Fixed various bugs
  • +
+ +

Sub-task +

+
    +
  • [ACT-386] - Split the BPMN 2.0 marshalling into marshalling and validation parts +
  • +
+ +

Bug +

+
    +
  • [ACT-418] - Missing groovy dependency in demo setup +
  • +
  • [ACT-419] - Remove automatic leave when using delegateExpression in serviceTask +
  • +
  • [ACT-424] - BPMN Export differs between manual and automatic and causes unnecessary exceptions +
  • +
  • [ACT-430] - SequenceFlows are only deleted for Task elements +
  • +
  • [ACT-434] - SaveHandler is only invoked from key combination +
  • +
  • [ACT-443] - HistoricDetail doesn't use activitiyInstanceId +
  • +
+ +

Improvement +

+
    +
  • [ACT-18] - Show process definition diagram +
  • +
  • [ACT-226] - Retrieve the expression from the PvmTransition +
  • +
+ +

New Feature +

+
    +
  • [ACT-336] - Create email service task node +
  • +
  • [ACT-385] - Create extension point to validate diagrams +
  • +
  • [ACT-408] - Allow usage of lists as property of CustomServiceTask +
  • +
  • [ACT-413] - Allow parametrization of PropertyTypes +
  • +
  • [ACT-421] - Introduce task-local variables +
  • +
  • [ACT-455] - Make parselisteners configurable on ProcessEngineConfiguration +
  • +
  • [ACT-464] - Introduce HistoricTaskInstance +
  • +
  • [ACT-470] - Create and include Activiti KickStart in the distribution +
  • +
+ +

Task +

+
    +
  • [ACT-293] - Refactor variable map +
  • +
  • [ACT-420] - Automatic upgrade +
  • +
  • [ACT-439] - Extract image generation in code in module activiti-engine +
  • +
  • [ACT-440] - Add process image generation to bpmn deployer +
  • +
  • [ACT-444] - Add task query criteria for taskDefinitionKey and -Like +
  • +
  • [ACT-458] - Check if seperate selectTaskByQueryCriteria is needed for MySQL in task.mapping.xml +
  • +
  • [ACT-471] - Add taskId ref to HistoricDetail +
  • +
+ +

Release Notes - Activiti - Version 5.0

+ +

Highlights

+
    +
  • Various bug fixes
  • +
  • Activiti Engine: Added more configuration options and synced standalone with Spring configuration
  • +
  • Activiti Engine: Added task listeners
  • +
  • Activiti Probe: Deployment through file upload
  • +
  • Activiti Cycle: Loads of improvements for the GUI, tagging and linking, new connectors for SVN and SFTP, Maven project generation
  • +
  • Activiti Designer: Possibility to add your own developed nodes to the Designer with the Designer extension functionality
  • +
  • Activiti Designer: BPMN 2.0 XML editor with content assist
  • +
  • Activiti Designer: Deployment editor with support to generate a BAR file
  • +
  • Activiti Designer: Support for e-mail and manual tasks
  • +
  • Activiti Designer: Field extensions editor for the Service task and support for expressions
  • +
  • Activiti Designer: Support for Formkey attribute for User tasks
  • +
  • Activiti Designer: Automatic generation of the BPMN 2.0 XML and a process image after each save of the editor diagram (no need to for an explicit export).
  • +
+ +

Bug +

+
    +
  • [ACT-194] - Business model is not persisted when reconnecting SequenceFlow +
  • +
  • [ACT-215] - TaskEntity does not populate processInstanceId +
  • +
  • [ACT-217] - Review documentation +
  • +
  • [ACT-225] - Cannot see database view in Probe +
  • +
  • [ACT-255] - Access via url to Explorer lose url after authentication. +
  • +
  • [ACT-295] - Sorting processes on name doesn't work +
  • +
  • [ACT-297] - Error when creating link in activiti-cycle on postgres DB +
  • +
  • [ACT-306] - Nullpointer exception when sequence flow has invalid destination +
  • +
  • [ACT-308] - Review DeployBarTask handling when no ProcessEngine is found +
  • +
  • [ACT-314] - REST-call task get doesn't return valid JSON +
  • +
  • [ACT-318] - Cannot open PNG picture in Activiti-Cycle if the model name has whitespaces in the name +
  • +
  • [ACT-320] - Replace of JAVA_OPTS in demo setup not working on Windows +
  • +
  • [ACT-323] - Business key not persisted in HistoricProcessInstance +
  • +
  • [ACT-329] - HistoricProcessInstance startActivityId() and endActivityId() is always null +
  • +
  • [ACT-334] - Remove check whether user/group exists when claim/addCandidateXX/etc. +
  • +
  • [ACT-338] - Pagination Links in Processes List in Activiti Explorer doesn't work +
  • +
  • [ACT-347] - Fix Spring bean usage in ServiceTask +
  • +
  • [ACT-351] - Possible illegal query results when querying ProcessInstances by date/long variable value +
  • +
  • [ACT-352] - HistoricVariableUpdate of type byteArray/serializable throws NPE when calling getValue() +
  • +
  • [ACT-353] - Boolean variables are stored as bytearray +
  • +
  • [ACT-366] - Problems with Umlauts in Modeler +
  • +
  • [ACT-369] - Modeler requires Java 6 to run +
  • +
  • [ACT-371] - Latest SVG API doesn't work with Activiti Modeler examples +
  • +
  • [ACT-377] - Empty diagrams have no Process entity by default +
  • +
  • [ACT-379] - Methode getLabels() is missing in Shape +
  • +
  • [ACT-391] - Exception with BPMN 2.0 XML Export of examples in Modeler. +
  • +
  • [ACT-403] - Cycle in demo-setup throws exception when opening 'Activiti Modeler' node in tree +
  • +
  • [ACT-405] - Cycle create-scripts for oracle contain errors +
  • +
  • [ACT-409] - Task form properties not persisted on history level audit +
  • +
+ +

Improvement +

+
    +
  • [ACT-162] - Simplify extensibility of identity component +
  • +
  • [ACT-212] - Prefix foreign keys with FK_ACT_* instead of FK_* +
  • +
  • [ACT-252] - Typo in warning message is misleading: "XPath currently not supported as typeLanguage" +
  • +
  • [ACT-274] - Switch to Spring Surf/Webscripts 1.0 for all web applications & rest api (and use its new abstract authenticator base class) +
  • +
  • [ACT-292] - Stop making default event being bookmarked +
  • +
  • [ACT-327] - Add finished() to the HistoricActivityInstanceQuery to be able find all completed activities +
  • +
  • [ACT-328] - add getId() into HisctoricActivitiInstance and add search by id into HistoricActivitiInstanceQuery +
  • +
  • [ACT-359] - Invoke export to BPMN 2.0 automatically via ExportMarshaller extension point +
  • +
+ +

New Feature +

+
    +
  • [ACT-211] - BPMN: assignment handler +
  • +
  • [ACT-222] - Make activiti jars valid OSGi bundles +
  • +
  • [ACT-235] - Add an OSGi extender to deploy activiti processes as osgi bundles along with the needed URL handlers and fileinstall deployers +
  • +
  • [ACT-278] - Add support for extending designer's functionality with custom service tasks +
  • +
  • [ACT-290] - SVG API should not peform access to Signavio Academic Version in the Internet +
  • +
  • [ACT-300] - Deploy business archive with Activiti Probe +
  • +
  • [ACT-301] - Expose getFormService() for ActivitiRule +
  • +
  • [ACT-360] - Provide an osgi web bundle for the rest api +
  • +
  • [ACT-363] - Bug with relative paths in Modler Backend +
  • +
  • [ACT-364] - The BPMN 2.0 serialization isn't the latest version +
  • +
  • [ACT-365] - The BPMN 2.0 DI is still the early draft, not the spec version +
  • +
  • [ACT-367] - Release a new Maven version of the Signavio core components and upload them to the alfresco repository +
  • +
  • [ACT-396] - activiti.cfg.jar should go in webapps\activiti-rest\WEB-INF\lib as well +
  • +
+ +

Task +

+
    +
  • [ACT-123] - Review the user guide for experimental features +
  • +
  • [ACT-163] - Investigate if smaller groovy jar is sufficient +
  • +
  • [ACT-171] - Remove model repository workaround in demo.setup +
  • +
  • [ACT-180] - Fix forced downloads in mule build +
  • +
  • [ACT-205] - Create Ant script to assemble update site +
  • +
  • [ACT-256] - Changed config param dbSchemaStrategy to databaseSchemaUpdate +
  • +
  • [ACT-296] - Fix date picker in safari +
  • +
  • [ACT-299] - Fix JobQuery test +
  • +
  • [ACT-311] - Rename JavaDelegation to JavaDelegate +
  • +
  • [ACT-315] - fix wsdl importer parsing +
  • +
  • [ACT-317] - Improve lib dependency management in distribution +
  • +
  • [ACT-321] - Add orderByCreateTime() to TaskQuery +
  • +
  • [ACT-332] - Make variable types configurable +
  • +
  • [ACT-335] - Move modeler patching from demo setup to a dedicated build +
  • +
  • [ACT-337] - Refactor distribution to remove maven and include the libs in the distro +
  • +
  • [ACT-340] - Add process definition diagram resource property +
  • +
  • [ACT-342] - Make sessions configurable +
  • +
  • [ACT-348] - Make handling of process definition resource name and other resource names consistent +
  • +
  • [ACT-349] - Delete rest 2 webapp +
  • +
  • [ACT-355] - Test java delegations in demo setup after distro refactoring +
  • +
  • [ACT-358] - Lazy initialization of delegation classes +
  • +
  • [ACT-378] - Unify and simplify configuration +
  • +
  • [ACT-381] - Verify history level configuration +
  • +
  • [ACT-383] - Fix exception message +
  • +
  • [ACT-393] - Create build file for example projects to deploy business archives and classes +
  • +
  • [ACT-394] - Review setup target cfg.create +
  • +
  • [ACT-395] - Doc URIEncoding for Activiti Modeler +
  • +
  • [ACT-399] - Check driver jars and setup demo.start with other dbs +
  • +
  • [ACT-400] - Add release notes to the readme.html +
  • +
  • [ACT-401] - Add cxf module to the checkmule profile +
  • +
  • [ACT-402] - Add version number to userguide title +
  • +
+ +

5.0.rc1 (November 1, 2010)

+ +

Highlights

+ +
    +
  • Activiti Probe added Job and Deployment management
  • +
  • Event listeners
  • +
  • Query for process instances based on variable values
  • +
  • Parameterized method expressions
  • +
  • History details and audit capabilities
  • +
  • Extracted FormService and improved flexible form handling
  • +
  • Activiti config file from properties to xml
  • +
  • PostgreSQL en Oracle support
  • +
  • Improved DB performance by fine tuning indexes
  • +
+ +

Known limitations

+
    +
  • [ACT-294] - Currently the forms as worked out in Activiti Explorer + do not yet use the submitStartFormData and submitTaskFormData. + So the form properties are not yet archived when using the forms in Activity Explorer. +
  • +
+ +

Sub-tasks

+
    +
  • [ACT-191] - Documentation Mistake in ProcessEngineFactoryBean section of User Guide +
  • +
+ +

Bug

+
    +
  • [ACT-144] - Canot start process instance when sorted on version first +
  • +
  • [ACT-192] - Table "ACT_ID_GROUP" not found for dbSchemaStrategy = "create-drop" +
  • +
  • [ACT-194] - Business model is not persisted when reconnecting SequenceFlow +
  • +
  • [ACT-195] - UpdateConnectionFlowElementFeature is not invoked for SequenceFlows +
  • +
  • [ACT-206] - Cannot unclaim a task +
  • +
  • [ACT-233] - Connection pool of Ibatis is not used in standalone usage +
  • +
  • [ACT-287] - Starting process instance in explorer doesn't show 'Start form' anymore when the process has a startform +
  • +
+ +

Improvement

+
    +
  • [ACT-21] - Manage list of deployments +
  • +
  • [ACT-22] - Manage list of jobs +
  • +
  • [ACT-23] - Add no-wrap to task list menu navigation +
  • +
  • [ACT-129] - Make connection pool of MyBatis configurable +
  • +
  • [ACT-138] - Create REST API for Manage list of jobs +
  • +
  • [ACT-139] - REST API for Manage list of deployments +
  • +
  • [ACT-179] - Fix css code so its consistent with the rest of the app +
  • +
  • [ACT-189] - Engine should be able to resolve parameterised method expressions +
  • +
  • [ACT-196] - Process and subprocess diagram should have default content +
  • +
  • [ACT-197] - SequenceFlow arrowheads are mispositioned and too large +
  • +
  • [ACT-209] - Expose Task start time in interface and query API +
  • +
  • [ACT-210] - Rename ActivitiRule.getHistoricDataService() to ActivitiRule.getHistoryService() +
  • +
  • [ACT-213] - Verify all basic indices exist on supported databases +
  • +
  • [ACT-214] - Clarify documentation demo setup +
  • +
  • [ACT-216] - ServiceTaskMethodExpressionActivityBehavior / ServiceTaskValueExpressionActivityBehavior should support storing service task return value in process variable +
  • +
  • [ACT-219] - Update Userguide with latest UI changes +
  • +
  • [ACT-224] - Allow parsing of document element for all activity types +
  • +
  • [ACT-230] - Change BpmnParse: instead of throwing an exception, use the addProblem() method +
  • +
  • [ACT-238] - Extract common methods from Query API to single Interface +
  • +
  • [ACT-241] - Handle closing of inputstreams in a consistent way +
  • +
  • [ACT-246] - Missing warning when process has a construct which is unsupported. +
  • +
  • [ACT-257] - Define a order for group list (left panel) +
  • +
  • [ACT-259] - Make method naming in Query API consistent +
  • +
  • [ACT-260] - Make namespace prefix consistent activiti: +
  • +
  • [ACT-261] - Change dashes in xml-entities to camelCase +
  • +
  • [ACT-265] - Always use ReflectUtil to do classloader-related operations +
  • +
  • [ACT-272] - Only use 'Expression' instead of making distinction between value/method +
  • +
+ +

New Feature

+
    +
  • [ACT-120] - Audit tracking +
  • +
  • [ACT-125] - BPMN: add event listeners +
  • +
  • [ACT-145] - Add Task.getTaskDefinitionKey() +
  • +
  • [ACT-148] - Make Activiti "offline runnable" +
  • +
  • [ACT-152] - Introduce business key +
  • +
  • [ACT-190] - Query for process instances based on variable values +
  • +
  • [ACT-208] - Cannot remove a variable +
  • +
  • [ACT-220] - Allow for parameter injection in method-expr on service-task +
  • +
  • [ACT-242] - Expose process definition model for introspection +
  • +
  • [ACT-258] - Introduce form instances +
  • +
  • [ACT-273] - Allow user to customize preference of automatically adding labels to sequence flows +
  • +
+ +

Task

+
    +
  • [ACT-134] - Revisit configuration +
  • +
  • [ACT-137] - Add oracle support +
  • +
  • [ACT-174] - Document link to Signavio community in our wiki +
  • +
  • [ACT-183] - Remove 'about' tabs in the webapps +
  • +
  • [ACT-186] - Improve exception analysis when no tables are present +
  • +
  • [ACT-193] - Bring CYCLE_CONFIG in sync with rest of table naming conventions +
  • +
  • [ACT-243] - Expose Execution.getProcessInstanceId +
  • +
  • [ACT-245] - review variable in ByteArrayEntity +
  • +
  • [ACT-247] - Clean unused table columns +
  • +
  • [ACT-248] - Verify HistoricProcessInstance query filtering +
  • +
  • [ACT-251] - Add task audit to history +
  • +
  • [ACT-262] - Check docs about bar file classloading +
  • +
  • [ACT-263] - Use a correct versioning scheme for activiti-juel module +
  • +
  • [ACT-264] - Remove eclipse/idea files from trunk +
  • +
  • [ACT-266] - Make demo-setup run on Postgres +
  • +
  • [ACT-267] - Merge pvm and juel modules into engine +
  • +
  • [ACT-282] - Transform BpmnJavaDelegation class to JavaDelegation interface +
  • +
  • [ACT-283] - rename activiti bpmn extensions namespace +
  • +
+ +

Test

+
    +
  • [ACT-221] - Add an integration test for the webservice task solely based on CXF +
  • +
+ + +

5.0.beta2 (October 1, 2010)

+ +

Highlights

+ +
    +
  • Added Activiti Designer, an eclipse plugin for process authoring targetted for developers +
      +
    • Design BPMN processes grafically: start event, end event, sequence flow, parallel gateway, exclusive gateway, embedded subprocess, script task, user task and service task.
    • +
    • Generate JUnit test case by right click on the process in the package explorer
    • +
    • Run the JUnit test with an embedded h2 database
    • +
    • Configure Java class for a service task
    • +
    • Configure assignee or candidate for a user task
    • +
    • Configure script with a script task
    • +
    +
  • +
  • Added DB support for MySQL and PostgreSQL
  • +
  • Activiti Modeler and Activiti Engine are now synced on the final BPMN 2.0 specification
  • +
  • New improved version of Activiti Modeler
  • +
  • Loads of Activiti Cycle improvements
  • +
  • Added JDK 5 compatibility
  • +
  • Added history activity instances
  • +
  • Added unit testing support
  • +
  • Added email support and receive activity
  • +
  • Added optimistic locking for out-of-the-box clustering support
  • +
  • Added more query APIs
  • +
  • Minor API cleanup
  • +
+ +

Bug

+ +
    +
  • [ACT-1] - Change init servlet into context listener +
  • +
  • [ACT-56] - Activiti Modeler is bound to localhost instead of the actual servername +
  • +
  • [ACT-57] - Condition on sequence flow is not saved to bpmn20.xml file after reopening an existing process +
  • +
  • [ACT-71] - Activiti Modeler doesn't work if not installed by demo setup +
  • +
  • [ACT-76] - JSON Response contains unescaped control caharcters +
  • +
  • [ACT-94] - java.util.logging.ErrorManager/ NullPointerException in catalina.out at startup of tomcat +
  • +
  • [ACT-113] - Modeler "Save" does not regenerate bpmn20.xml file +
  • +
  • [ACT-114] - Unable to save newly created diagram twice +
  • +
  • [ACT-115] - Table ACT_GE_PROPERTY cannot be created on MySQL with UTF-8 encoding due to limitation of key index length +
  • +
  • [ACT-142] - Logo is linked to Signavio jBpm page +
  • +
  • [ACT-181] - Automatic deployment on resource change doesn't work +
  • +
+ +

Improvement

+
    +
  • [ACT-7] - Move logging.properties process activiti-engines-init to tomcat installation +
  • +
  • [ACT-23] - Add no-wrap to task list menu navigation +
  • +
  • [ACT-64] - Configure Tomcat in demo setup to have more memory +
  • +
  • [ACT-66] - Make task form rendering consistent in API +
  • +
  • [ACT-68] - Make demo.setup run on MySQL +
  • +
  • [ACT-69] - Add ant target to start up h4 console +
  • +
  • [ACT-70] - Review API and build systematic test coverage +
  • +
  • [ACT-73] - Document usage of activiti prefix +
  • +
  • [ACT-104] - Replace findXxx methods returning lists with query API +
  • +
  • [ACT-140] - REST API for Show process definition diagram +
  • +
  • [ACT-158] - ScriptTaskActivity should support storing script execution result in a process variable with configurable name +
  • +
  • [ACT-182] - Add internal support for create-if-necessary db schema stragegy +
  • +
+ +

New Feature

+
    +
  • [ACT-35] - Provide external URL for navigating task forms +
  • +
  • [ACT-83] - Capture the initiator +
  • +
  • [ACT-109] - BPMN: document receive task +
  • +
  • [ACT-146] - Add Activiti FavIcon to webapp +
  • +
  • [ACT-168] - Introduce identityLink in API +
  • +
+ +

Task

+
    +
  • [ACT-30] - Finish the basic history data model +
  • +
  • [ACT-44] - Verify exception and rollback behavior in Spring context +
  • +
  • [ACT-49] - make activiti compatible with jdk 5 +
  • +
  • [ACT-52] - Remove BPMN 2.0 Beta compatibility +
  • +
  • [ACT-67] - Rename modules activiti-probe to activiti-webapp-probe, similar for activiti-explorer +
  • +
  • [ACT-78] - move sortorder out of the interface package +
  • +
  • [ACT-84] - move parsing of value expression to bpmn parser +
  • +
  • [ACT-87] - Fill exception field when job fails +
  • +
  • [ACT-89] - Review test support +
  • +
  • [ACT-95] - fix testTwoNestedSubProcessesInParallelWithTimer +
  • +
  • [ACT-103] - Consider removing Page from engine interface +
  • +
  • [ACT-105] - Add auto redirect to Activiti Modeler +
  • +
  • [ACT-106] - Add testing for optimistic locking +
  • +
  • [ACT-110] - Move Chapter 11. Running QA tests to wiki +
  • +
  • [ACT-124] - Document library dependencies +
  • +
  • [ACT-127] - Restructure modules +
  • +
  • [ACT-130] - Reupload Maven artifacts due to checksum error +
  • +
  • [ACT-131] - Switch to new repository/build for Ativiti Modeler +
  • +
  • [ACT-133] - Refactor start process instance +
  • +
  • [ACT-135] - Cleanup unused task properties +
  • +
  • [ACT-136] - Verify MySQL +
  • +
  • [ACT-153] - Replace DbSchemaStrategy enum with String +
  • +
  • [ACT-155] - Create Junit @Rule test with ActivitiRule and document it +
  • +
  • [ACT-156] - Revise Java service task: introduce BpmnJavaDelegation and field injection +
  • +
  • [ACT-157] - Create mail activity +
  • +
  • [ACT-159] - Remove expressionLanguage and typeLanguage in examples +
  • +
  • [ACT-167] - fix excluded test RepositoryConnectorConfigurationManagerImplTest +
  • +
  • [ACT-177] - Document configuration file properties +
  • +
+ + +

5.0.beta1 (September 1, 2010)

+ +

Known limitations

+
    +
  • Optimistic locking isn't tested yet [ACT-106]
  • +
  • History only contains HistoricProcessInstances, no HistoricActivityInstances yet [ACT-30]
  • +
  • Some API changes are still expected [ACT-104]
  • +
+

New Features

+
    +
  • [ACT-55] - Introduce first version of Activiti-Cycle +
  • [ACT-91] - Expand serviceTask with method and value expressions +
  • +
+

Bugs

+
    +
  • [ACT-39] - fix ProcessEngineInitializationTest +
  • +
  • [ACT-98] - REST API errors +
  • +
  • [ACT-99] - Table records don't show +
  • +
+

Improvements

+
    +
  • [ACT-2] - Clean up API +
  • +
  • [ACT-6] - Rename DbProcessEngineBuilder to ProcessEngineBuilder +
  • +
  • [ACT-60] - pvm refactoring +
  • +
  • [ACT-79] - Please add a ELResolver that automatically resolves any bean in the Spring BeanFactory in which the ELResolver resides +
  • +
  • [ACT-80] - Extend service task to SignallableActivityBehavior +
  • +
  • [ACT-82] - Expose form attribute from Task object +
  • +
+

Tasks

+
    +
  • [ACT-48] - Add Grails plugin link to docs or website +
  • +
  • [ACT-59] - define table/column naming strategy +
  • +
  • [ACT-61] - Introduce query API for deployments and resources +
  • +
  • [ACT-75] - document maven repo in the website community page +
  • +
  • [ACT-85] - Improve error message when db driver is not found +
  • +
  • [ACT-86] - Fix classpath in setup script for other dbs +
  • +
  • [ACT-90] - Add Spring integration examples and documentation +
  • +
  • [ACT-96] - Cycle demo build creates 2 files in codebase +
  • +
  • [ACT-101] - Add sorting of the table names in Probe +
  • +
+ +

5.0.alpha4 (August 1, 2010)

+

Improvements

+
    +
  • MySQL support
  • +
  • Support for method expressions on sequence flow
  • +
  • Revised ActivityExecution API
  • +
  • Added ConcurrencyController API
  • +
  • Process Event Bus
  • +
  • Taskforms: added date and date picker support
  • +
  • Explorer: changed process definition drop down list to a separate page
  • +
+ +

New features

+
    +
  • BPMN parallel gateway
  • +
  • BPMN manual task
  • +
  • BPMN (embedded) subprocess
  • +
  • BPMN call activity (subprocess)
  • +
  • BPMN Java service task
  • +
  • Spring integration (experimental, no docs yet)
  • +
+ +

Bugfixes

+
    +
  • Made engine compatible with BPMN 2.0 beta process models
  • +
  • Fixed exception on windows and linux when using boundary timer event
  • +
  • Expression cannot have whitespaces
  • +
+ +

5.0.alpha3 (July 1, 2010)

+

Improvements

+
    +
  • Switch from iBatis to MyBatis
  • +
  • JobExecutor
  • +
  • BPMN Timers
  • +
  • BPMN JSR 223 script support.
  • +
  • Updated to a newer version of BPMN xsd
  • +
  • Query API
  • +
  • Switched JUnit usage from 3-style inheritance to 4-style annotations
  • +
+ +

5.0.alpha2 (June 1, 2010)

+

Improvements

+
    +
  • Task forms in Activiti Explorer
  • +
  • Database table content viewer in Activiti Probe
  • +
  • Exclusive gateway
  • +
  • Unified Expression Language support
  • +
  • Reduced download size
  • +
+

Known limitations

+
    +
  • No history in Activiti Engine
  • +
  • Only single DB: H2
  • +
  • Only one tx demarcation tech: standalone JDBC
  • +
  • No process concurrency
  • +
+

5.0.alpha1 (May 17, 2010)

+

Known limitations

+
    +
  • No history in Activiti Engine
  • +
  • Only single DB: H2
  • +
  • Only one tx demarcation tech: standalone JDBC
  • +
  • No task forms
  • +
  • No process concurrency
  • +
  • No Activiti Cycle
  • +
+ + + diff --git a/runtime/src/distro/src/setup/build.db.properties b/runtime/src/distro/src/setup/build.db.properties new file mode 100644 index 0000000..2b8496d --- /dev/null +++ b/runtime/src/distro/src/setup/build.db.properties @@ -0,0 +1,5 @@ +db=h2 +jdbc.driver=org.h2.Driver +jdbc.url=jdbc:h2:tcp://localhost/activiti +jdbc.username=sa +jdbc.password= diff --git a/runtime/src/distro/src/setup/build.properties b/runtime/src/distro/src/setup/build.properties new file mode 100644 index 0000000..a753dc1 --- /dev/null +++ b/runtime/src/distro/src/setup/build.properties @@ -0,0 +1,20 @@ +# The tx property refers to the transaction environment +# you want to use. Choose from {standalone} +tx=standalone + +# Specify the version of Tomcat that you want to use. +# We only tested with the given Tomcat version but in +# theory any tomcat 6.0.x version should do fine. +tomcat.version=6.0.32 + +# If you have tomcat already downloaded, point the +# downloads.dir property to that directly. If tomcat is +# not found in the downloads.dir, it will be automatically +# downloaded there. +downloads.dir=../../downloads + +# Remove this property or set it to disabled if you're not using Activiti Cycle +feature.cycle=enabled + +# Remove this property or set it to disabled if you're not using Activiti Modeler +feature.modeler=enabled \ No newline at end of file diff --git a/runtime/src/distro/src/setup/build.xml b/runtime/src/distro/src/setup/build.xml new file mode 100644 index 0000000..02f1ae8 --- /dev/null +++ b/runtime/src/distro/src/setup/build.xml @@ -0,0 +1,495 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Enabling tomcat remote debugging ... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + ]]> + + + + diff --git a/runtime/src/distro/src/setup/files/cfg.activiti/standalone/activiti.cfg.xml b/runtime/src/distro/src/setup/files/cfg.activiti/standalone/activiti.cfg.xml new file mode 100644 index 0000000..15d815a --- /dev/null +++ b/runtime/src/distro/src/setup/files/cfg.activiti/standalone/activiti.cfg.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/runtime/src/distro/src/setup/files/cfg.cycle/cycle.properties b/runtime/src/distro/src/setup/files/cfg.cycle/cycle.properties new file mode 100644 index 0000000..7b301c4 --- /dev/null +++ b/runtime/src/distro/src/setup/files/cfg.cycle/cycle.properties @@ -0,0 +1,6 @@ +activiti.modeler.base.url=http://localhost:8080/activiti-modeler/ +database=@db@ +jdbc.driver=@jdbc.driver@ +jdbc.url=@jdbc.url@ +jdbc.username=@jdbc.username@ +jdbc.password=@jdbc.password@ diff --git a/runtime/src/distro/src/setup/files/cfg.modeler/ActivitiCycle.js b/runtime/src/distro/src/setup/files/cfg.modeler/ActivitiCycle.js new file mode 100644 index 0000000..5e63ada --- /dev/null +++ b/runtime/src/distro/src/setup/files/cfg.modeler/ActivitiCycle.js @@ -0,0 +1,305 @@ +/* Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @author Falko Menge + */ + +// define namespace if it doesn't already exist +if (!ORYX) { + var ORYX = new Object(); +} +if (!ORYX.Plugins) { + ORYX.Plugins = new Object(); +} + +ORYX.Plugins.ActivitiCycle = ORYX.Plugins.AbstractPlugin.extend({ + + button: undefined, + + panel: undefined, + + numberOfLinks: 1, + + construct: function() { + + // call super class constructor + arguments.callee.$.construct.apply(this, arguments); + + // add button to toolbar +// this.facade.offer({ +// 'name': 'Activiti Cycle: 0 Links', +// 'cls': 'x-btn-text-icon', // button with icon and text +// 'functionality': this.perform.bind(this), +// 'group': 'Activiti', +// 'icon': ORYX.PATH + "images/activiti_logo_16x16.png", +// 'description': 'Activiti Cycle', +// 'index': 1, +// 'minShape': 0, +// 'maxShape': 0 +// }); + + this.panel = new Ext.Panel({ + title: this.getPanelTitle(), + cls: 'activiticyclepanel', + border: false, + autoWidth: true, + autoScroll: true, + tbar: [{ + text: 'Show links', + handler: this.showLinks.bind(this), + 'cls': 'x-btn-text-icon', // button with icon and text + 'icon': ORYX.PATH + "images/activiti_logo_16x16.png" + },{ + text: 'Add link', + handler: this.openAddLinkDialog.bind(this), + 'cls': 'x-btn-text-icon', // button with icon and text + 'icon': ORYX.PATH + "images/activiti_logo_16x16.png" + }]//, +// html: '3 Artifacts linked with this model' + }); + + var region = this.facade.addToRegion("west", this.panel); + +// this.button = new Ext.Button({ +// text: 'Add Link', +// 'cls': 'x-btn-text-icon', // button with icon and text +// 'icon': ORYX.PATH + "images/activiti_logo_16x16.png", +// autoWidth: true, +// handler: this.perform.bind(this) +// }); +// this.panel.add(this.button); +// this.panel.doLayout(); + + }, + + showLinks: function () { + // fake data + validExtensions = [ { + title : 'ABPM-2', + definition : 'User Story', + 'extends' : 'JIRA' + } ]; + loadedExtensions = []; + successCallback = this.openAddLinkDialog.bind(this); + + // Extract the data + var data = []; + validExtensions.each(function(value){ + data.push([value.title, value.definition, value["extends"]]); + }); + + // Create a new Selection Model + var sm = new Ext.grid.CheckboxSelectionModel(); + + // Create a new Grid with a selection box + var grid = new Ext.grid.GridPanel({ + deferRowRender: false, + id: 'oryx_new_stencilset_extention_grid', + store: new Ext.data.SimpleStore({ + fields: ['title', 'definition', 'extends'] + }), + cm: new Ext.grid.ColumnModel([ + sm, + { + header: 'Target Artifact', + width: 200, + sortable: true, + dataIndex: 'title' + }, + { + header: 'Type', + width: 90, + sortable: true, + dataIndex: 'definition' + }, + { + header: 'Repository', + width: 90, + sortable: true, + dataIndex: 'extends' + } + ]), + sm: sm, + frame: true, + width: 400, + height: 400, + iconCls: 'icon-grid', + listeners: { + "render": function(){ + this.getStore().loadData(data); + selectItems.defer(1); + } + } + }); + + function selectItems() { + // Select loaded extensions + var selectedRecords = new Array(); + grid.store.each(function(rec) { + if(loadedExtensions.any(function(ext) { return ext.definition == rec.get('definition'); })) + selectedRecords.push(rec); + }); + sm.selectRecords(selectedRecords); + } + + /* grid.store.on("load", function() { + console.log("okay"); + grid.getSelectionModel().selectRecords(selectedRecords); + }, this, {delay:500});*/ + + + + // Create a new Panel + var panel = new Ext.Panel({ + items: [{ + xtype: 'label', + text: 'The following list show artifacts from Activiti Cycle that are linked with the current model.', + style: 'margin:10px;display:block' + }, grid], + frame: true, + buttons: [{ + text: 'Remove selected links', + handler: function(){ + var selectionModel = Ext.getCmp('oryx_new_stencilset_extention_grid').getSelectionModel(); + var result = selectionModel.selections.items.collect(function(item){ + return item.data; + }); +// Ext.getCmp('activiti_cycle_show_links_window').close(); + successCallback(result); + }.bind(this) + }, { + text: 'Add link', + handler: function(){ + var selectionModel = Ext.getCmp('oryx_new_stencilset_extention_grid').getSelectionModel(); + var result = selectionModel.selections.items.collect(function(item){ + return item.data; + }); +// Ext.getCmp('activiti_cycle_show_links_window').close(); + successCallback(result); + }.bind(this) + }, { + text: 'Close', + handler: function(){ + Ext.getCmp('activiti_cycle_show_links_window').close(); + }.bind(this) + }] + }); + + // Create a new Window + var window = new Ext.Window({ + id: 'activiti_cycle_show_links_window', + width: 427, + title: 'Activiti Cycle: Linked Artifacts', + floating: true, + shim: true, + modal: true, + resizable: false, + autoHeight: true, + items: [panel] + }); + + // Show the window + window.show(); + + }, + + openAddLinkDialog: function () { + var options = [ + [ + undefined, + 'User Story', + 'user_story' + ] + ]; + + var store = new Ext.data.SimpleStore({ + fields: [{name: 'icon'}, + {name: 'title'}, + {name: 'value'} ], + data : options + }); + + var typeCombo = new Ext.form.ComboBox({ + tpl: '
{[(values.icon) ? "" : ""]} {title}
', + store: store, + displayField:'title', + valueField: 'value', + typeAhead: true, + mode: 'local', + triggerAction: 'all', + selectOnFocus:true + }); + + // Create a new Panel + var panel = new Ext.Panel({ + items: [ + { + xtype: 'label', + text: 'Please select the target artifact from Activiti Cycle that should be linked with the current model.', + style: 'margin-top:5px;margin-bottom:5px;display:block' + }, + { + xtype: 'panel', + frame: true, + html: '" + + "
" + + "" + + "" + + "" + + "" + + " " + + "
" + + "
" + + "
"; + + return (x + "" + h + b + "").getBytes(); + } + +} diff --git a/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/login/LoginHandler.java b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/login/LoginHandler.java new file mode 100644 index 0000000..b83d513 --- /dev/null +++ b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/login/LoginHandler.java @@ -0,0 +1,64 @@ +/* Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.activiti.explorer.ui.login; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.activiti.explorer.identity.LoggedInUser; + + +/** + * Class handling authentication for the explorer ui. + * + * @author Frederik Heremans + */ +public interface LoginHandler { + + /** + * Authenticate the user with the given username and given password. + * + * @return the logged in user. Return null of authentication failed. + */ + LoggedInUser authenticate(String userName, String password); + + /** + * Authenticate the current user. Use this to eg. shared autentication, + * which can be done without the user actually having to provide + * credentials. + * + * @return The logged in user. Return null, if no user can be logged in + * automatically. When null is returned, user will be requested to provide + * credentials. + */ + LoggedInUser authenticate(HttpServletRequest request, HttpServletResponse response); + + /** + * Called when the user is logged out, should clear all context related + * to authorization and authentication for the current logged in user. + */ + void logout(LoggedInUser userTologout); + + /** + * Called when request started. Allows eg. validating of authentication or + * renewing. + */ + void onRequestStart(HttpServletRequest request, HttpServletResponse response); + + /** + * Called when request started. Allows eg. validating of authentication or + * renewing. + */ + void onRequestEnd(HttpServletRequest request, HttpServletResponse response); +} diff --git a/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/login/LoginPage.java b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/login/LoginPage.java new file mode 100644 index 0000000..e0c6747 --- /dev/null +++ b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/login/LoginPage.java @@ -0,0 +1,109 @@ +/* Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.activiti.explorer.ui.login; + +import java.io.IOException; +import java.io.InputStream; + +import org.activiti.engine.IdentityService; +import org.activiti.engine.ProcessEngines; +import org.activiti.explorer.ExplorerApp; +import org.activiti.explorer.I18nManager; +import org.activiti.explorer.Messages; +import org.activiti.explorer.NotificationManager; +import org.activiti.explorer.ViewManager; +import org.activiti.explorer.identity.LoggedInUser; +import org.activiti.explorer.ui.mainlayout.ExplorerLayout; + +import com.vaadin.ui.CustomLayout; +import com.vaadin.ui.LoginForm.LoginEvent; +import com.vaadin.ui.LoginForm.LoginListener; + + +/** + * @author Joram Barrez + */ +public class LoginPage extends CustomLayout { + + private static final long serialVersionUID = 1L; + + protected IdentityService identityService = ProcessEngines.getDefaultProcessEngine().getIdentityService(); + + protected I18nManager i18nManager; + protected ViewManager viewManager; + protected NotificationManager notificationManager; + protected LoginHandler loginHandler; + + public LoginPage() { + super(); + + // Check if the login HTML is available on the classpath. If present, the activiti-theme files are + // inside a jar and should be loaded from here to be added as resource in UIDL, since the layout html + // is not present in a webapp-folder. If not found, just use the default way of defining the template, by name. + InputStream loginHtmlStream = getClass().getResourceAsStream("/VAADIN/themes/" + ExplorerLayout.THEME + "/layouts/" + + ExplorerLayout.CUSTOM_LAYOUT_LOGIN + ".html"); + if(loginHtmlStream != null) { + try { + initTemplateContentsFromInputStream(loginHtmlStream); + } catch (IOException e) { + throw new RuntimeException("Error while loading login page template from classpath resource", e); + } + } else { + setTemplateName(ExplorerLayout.CUSTOM_LAYOUT_LOGIN); + } + + this.i18nManager = ExplorerApp.get().getI18nManager(); + this.viewManager = ExplorerApp.get().getViewManager(); + this.notificationManager = ExplorerApp.get().getNotificationManager(); + this.loginHandler = ExplorerApp.get().getLoginHandler(); + + addStyleName(ExplorerLayout.STYLE_LOGIN_PAGE); + initUi(); + } + + protected void initUi() { + // Login form is an a-typical Vaadin component, since we want browsers to fill the password fields + // which is not the case for ajax-generated UI components + ExplorerLoginForm loginForm = new ExplorerLoginForm(); + addComponent(loginForm, ExplorerLayout.LOCATION_LOGIN); + + // Login listener + loginForm.addListener(new ActivitiLoginListener()); + } + + protected void refreshUi() { + // Quick and dirty 'refresh' + removeAllComponents(); + initUi(); + } + + class ActivitiLoginListener implements LoginListener { + + private static final long serialVersionUID = 1L; + + public void onLogin(LoginEvent event) { + String userName = event.getLoginParameter("username"); // see the input field names in CustomLoginForm + String password = event.getLoginParameter("password"); // see the input field names in CustomLoginForm + // Delegate authentication to handler + LoggedInUser loggedInUser = loginHandler.authenticate(userName, password); + if (loggedInUser != null) { + ExplorerApp.get().setUser(loggedInUser); + viewManager.showDefaultPage(); + } else { + refreshUi(); + notificationManager.showErrorNotification(Messages.LOGIN_FAILED_HEADER, i18nManager.getMessage(Messages.LOGIN_FAILED_INVALID)); + } + } + } + +} diff --git a/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/mainlayout/ExplorerLayout.java b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/mainlayout/ExplorerLayout.java new file mode 100644 index 0000000..29f7a12 --- /dev/null +++ b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/mainlayout/ExplorerLayout.java @@ -0,0 +1,139 @@ +/* Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.activiti.explorer.ui.mainlayout; + + +/** + * @author Joram Barrez + */ +public interface ExplorerLayout { + + // Application theme + static final String THEME = "activiti"; + + // Custom layouts (found in /VAADIN/themes/${THEME}/layouts + static final String CUSTOM_LAYOUT_LOGIN = "login"; + + // Locations defined in the layout .html files + static final String LOCATION_LOGIN = "login-content"; + static final String LOCATION_CONTENT = "content"; + static final String LOCATION_SEARCH = "search"; + static final String LOCATION_LOGOUT = "logout"; + static final String LOCATION_MAIN_MENU = "main-menu"; + static final String LOCATION_HIDDEN = "hidden"; + static final String STYLE_IMAGE_ACTION = "image-action"; + + static final String LINK_TARGET_BLANK = "_blank"; + + // ---------- + // Css styles + // ---------- + + // Skeleton + static final String STYLE_MAIN_WRAPPER = "main"; + static final String STYLE_HEADER = "header"; + static final String STYLE_MAIN_CONTENT = "main-content"; + static final String STYLE_MAIN_FOOTER = "footer"; + + // General + static final String STYLE_SMALL_TEXTFIELD = "small"; + static final String STYLE_SEARCHBOX = "searchbox"; + static final String STYLE_SEARCHBOX_LEFT = "searchbox-left"; + static final String STYLE_SEARCHBOX_RIGHT = "searchbox-right"; + static final String STYLE_SEARCHBOX_SORTMENU = "searchbox-sortmenu"; + static final String STYLE_HEADER_PROFILE_BOX = "person"; + static final String STYLE_HEADER_PROFILE_MENU = "person-menu"; + static final String STYLE_USER_PROFILE = "user"; + static final String STYLE_LABEL_BOLD = "bold"; + static final String STYLE_LABEL_RED = "red"; + static final String STYLE_CLICKABLE = "clickable"; + static final String STYLE_ACTIVE = "active"; + static final String STYLE_TOOLBAR = "toolbar"; + static final String STYLE_TOOLBAR_BUTTON = "toolbar-button"; + static final String STYLE_TOOLBAR_COUNT = "toolbar-count"; + static final String STYLE_TOOLBAR_POPUP = "toolbar-popup"; + static final String STYLE_SCROLLABLE = "scrollable"; + static final String STYLE_TITLE_BLOCK = "title-block"; + static final String STYLE_DETAIL_BLOCK = "block-holder"; + static final String STYLE_DETAIL_PANEL = "detail-panel"; + static final String STYLE_H3 = "h3"; + static final String STYLE_H4 = "h4"; + static final String STYLE_ADD = "add"; + static final String STYLE_NO_LINE = "no-line"; + + + static final String STYLE_APPLICATION_LOGO = "logo"; + static final String STYLE_WORKFLOW_CONSOLE_LOGO = "workflow-console-logo"; + static final String STYLE_MAIN_MENU_BUTTON = "main-menu-button"; + + //Forms + static final String STYLE_FORM_PROPERTIES = "formprops"; + static final String STYLE_FORM_USER_SELECTED = "formprop-user-selected"; + static final String STYLE_FORM_NO_USER_SELECTED = "formprop-no-user-selected"; + + // Login page + static final String STYLE_LOGIN_PAGE = "login-general"; + + // Profile page + static final String STYLE_PROFILE_LAYOUT = "profile-layout"; + static final String STYLE_PROFILE_FIELD = "profile-field"; + static final String STYLE_PROFILE_PICTURE = "profile-picture"; + static final String STYLE_PROFILE_LINK = "profile-link"; + + // Task pages + static final String STYLE_TASK_LIST = "task-list"; + static final String STYLE_TASK_EVENT_PANEL = "task-event-panel"; + static final String STYLE_TASK_EVENT = "task-event"; + static final String STYLE_TASK_EVENT_AUTHOR = "task-event-author"; + static final String STYLE_TASK_EVENT_TIME = "task-event-time"; + static final String STYLE_TASK_EVENT_PICTURE = "task-event-picture"; + static final String STYLE_TASK_EVENT_GRID = "event-grid"; + static final String STYLE_TASK_HEADER_DUEDATE = "task-duedate"; + static final String STYLE_TASK_HEADER_PRIORITY_LOW = "task-priority-low"; + static final String STYLE_TASK_HEADER_PRIORITY_MEDIUM = "task-priority-medium"; + static final String STYLE_TASK_HEADER_PRIORITY_HIGH = "task-priority-high"; + static final String STYLE_TASK_HEADER_CREATE_TIME = "task-create-time"; + static final String STYLE_INVOLVE_PEOPLE = "involve-people"; + static final String STYLE_TASK_SUBTASKS_LIST = "subtasks"; + + // Process pages + static final String STYLE_PROCESS_DEFINITION_LIST = "proc-def-list"; + static final String STYLE_PROCESS_INSTANCE_LIST = "proc-inst-list"; + static final String STYLE_PROCESS_INSTANCE_TASK_LIST = "proc-inst-task-list"; + static final String STYLE_PROCESS_HEADER_DEPLOY_TIME = "process-deploy-time"; + static final String STYLE_PROCESS_HEADER_VERSION = "process-version"; + static final String STYLE_PROCESS_HEADER_START_TIME = "process-start-time"; + + // Database page + static final String STYLE_DATABASE_TABLE = "database-table"; + + + // Deployment page + static final String STYLE_DEPLOYMENT_UPLOAD_DESCRIPTION = "upload-description"; + static final String STYLE_DEPLOYMENT_UPLOAD_BUTTON = "upload-button"; + static final String STYLE_DEPLOYMENT_HEADER_DEPLOY_TIME = "deployment-deploy-time"; + + // Jobs page + static final String STYLE_JOB_DETAILS_HEADER = "job-details-header"; + static final String STYLE_JOB_EXCEPTION_MESSAGE = "job-exception-message"; + static final String STYLE_JOB_EXCEPTION_TRACE = "job-exception-trace"; + static final String STYLE_JOB_HEADER_DUE_DATE = "job-duedate"; + + // Related content + static final String STYLE_RELATED_CONTENT_LIST = "related-content-list"; + static final String STYLE_RELATED_CONTENT_CREATE_LIST = "related-content-create-list"; + static final String STYLE_RELATED_CONTENT_CREATE_DETAIL = "related-content-create-detail"; + static final String STYLE_RELATED_CONTENT_CREATE_LIST_LAST_COLUMN = "related-last-column"; + +} diff --git a/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/mainlayout/MainLayout.java b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/mainlayout/MainLayout.java new file mode 100644 index 0000000..df1a423 --- /dev/null +++ b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/mainlayout/MainLayout.java @@ -0,0 +1,102 @@ +/* Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.activiti.explorer.ui.mainlayout; + +import org.activiti.explorer.ExplorerApp; +import org.activiti.explorer.I18nManager; +import org.activiti.explorer.Messages; +import org.activiti.explorer.ViewManager; + +import com.vaadin.ui.Component; +import com.vaadin.ui.CssLayout; +import com.vaadin.ui.Label; +import com.vaadin.ui.VerticalLayout; + + +/** + * @author Joram Barrez + * @author Frederik Heremans + */ +public class MainLayout extends VerticalLayout { + + private static final long serialVersionUID = 1L; + + protected ViewManager viewManager; + protected I18nManager i18nManager; + protected MainMenuBar mainMenuBar; + + protected CssLayout header; + protected CssLayout main; + protected CssLayout footer; + + public MainLayout() { + this.viewManager = ExplorerApp.get().getViewManager(); + this.i18nManager = ExplorerApp.get().getI18nManager(); + + setSizeFull(); + addStyleName(ExplorerLayout.STYLE_MAIN_WRAPPER); + + initHeader(); + initMainMenuBar(); + initMain(); + initFooter(); + } + + public void setMainContent(Component mainContent) { + main.removeAllComponents(); + main.addComponent(mainContent); + } + + public void setFooter(Component footerContent) { + footer.removeAllComponents(); + footer.addComponent(footerContent); + } + + public void setMainNavigation(String navigation) { + mainMenuBar.setMainNavigation(navigation); + } + + protected void initHeader() { + header = new CssLayout(); + header.addStyleName(ExplorerLayout.STYLE_HEADER); + header.setWidth(100, UNITS_PERCENTAGE); + addComponent(header); + } + + protected void initMain() { + main = new CssLayout(); + main.setSizeFull(); + main.addStyleName(ExplorerLayout.STYLE_MAIN_CONTENT); + addComponent(main); + setExpandRatio(main, 1.0f); + } + + protected void initFooter() { + footer = new CssLayout(); + footer.setWidth(100, UNITS_PERCENTAGE); + footer.addStyleName(ExplorerLayout.STYLE_MAIN_FOOTER); + addComponent(footer); + + Label footerLabel = new Label(); + footerLabel.setContentMode(Label.CONTENT_XHTML); + footerLabel.setValue(i18nManager.getMessage(Messages.FOOTER_MESSAGE)); + footerLabel.setWidth(100, UNITS_PERCENTAGE); + footer.addComponent(footerLabel); + } + + protected void initMainMenuBar() { + this.mainMenuBar = ExplorerApp.get().getComponentFactory(MainMenuBarFactory.class).create(); + header.addComponent(mainMenuBar); + } +} diff --git a/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/mainlayout/MainMenuBar.java b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/mainlayout/MainMenuBar.java new file mode 100644 index 0000000..1e4dc9e --- /dev/null +++ b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/mainlayout/MainMenuBar.java @@ -0,0 +1,206 @@ +/* Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.activiti.explorer.ui.mainlayout; + +import java.util.HashMap; +import java.util.Map; + +import org.activiti.explorer.Environments; +import org.activiti.explorer.ExplorerApp; +import org.activiti.explorer.I18nManager; +import org.activiti.explorer.Messages; +import org.activiti.explorer.ViewManager; +import org.activiti.explorer.identity.LoggedInUser; +import org.activiti.explorer.ui.Images; +import org.activiti.explorer.ui.profile.ChangePasswordPopupWindow; + +import com.vaadin.terminal.Resource; +import com.vaadin.ui.Alignment; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.Button.ClickListener; +import com.vaadin.ui.HorizontalLayout; +import com.vaadin.ui.Label; +import com.vaadin.ui.MenuBar; +import com.vaadin.ui.MenuBar.Command; +import com.vaadin.ui.MenuBar.MenuItem; +import com.vaadin.ui.themes.Reindeer; + + +/** + * @author Joram Barrez + * @author Frederik Heremans + */ +@SuppressWarnings("serial") +public class MainMenuBar extends HorizontalLayout { + + private static final long serialVersionUID = 1L; + + protected ViewManager viewManager; + protected I18nManager i18nManager; + protected Map menuItemButtons; + protected String currentMainNavigation; + + public MainMenuBar() { + this.viewManager = ExplorerApp.get().getViewManager(); + this.i18nManager = ExplorerApp.get().getI18nManager(); + + menuItemButtons = new HashMap(); + init(); + } + + /** + * Highlights the given main navigation in the menubar. + */ + public synchronized void setMainNavigation(String navigation) { + if(currentMainNavigation != null) { + menuItemButtons.get(currentMainNavigation).removeStyleName(ExplorerLayout.STYLE_ACTIVE); + } + currentMainNavigation = navigation; + + Button current = menuItemButtons.get(navigation); + if(current != null) { + current.addStyleName(ExplorerLayout.STYLE_ACTIVE); + } + } + + protected void init() { + setHeight(54, UNITS_PIXELS); + setWidth(100, UNITS_PERCENTAGE); + + setMargin(false, true, false, false); + + initTitle(); + initButtons(); + initProfileButton(); + } + + protected void initButtons() { + // TODO: fixed widths based on i18n strings? + Button taskButton = addMenuButton(ViewManager.MAIN_NAVIGATION_TASK, i18nManager.getMessage(Messages.MAIN_MENU_TASKS), Images.MAIN_MENU_TASKS, false, 80); + taskButton.addListener(new ShowTasksClickListener()); + menuItemButtons.put(ViewManager.MAIN_NAVIGATION_TASK, taskButton); + + Button processButton = addMenuButton(ViewManager.MAIN_NAVIGATION_PROCESS, i18nManager.getMessage(Messages.MAIN_MENU_PROCESS), Images.MAIN_MENU_PROCESS, false, 80); + processButton.addListener(new ShowProcessDefinitionsClickListener()); + menuItemButtons.put(ViewManager.MAIN_NAVIGATION_PROCESS, processButton); + + if (ExplorerApp.get().getLoggedInUser().isAdmin()) { + Button manageButton = addMenuButton(ViewManager.MAIN_NAVIGATION_MANAGE, i18nManager.getMessage(Messages.MAIN_MENU_MANAGEMENT), Images.MAIN_MENU_MANAGE, false, 90); + manageButton.addListener(new ShowManagementClickListener()); + menuItemButtons.put(ViewManager.MAIN_NAVIGATION_MANAGE, manageButton); + } + } + + protected void initTitle() { + Label title = new Label(); + title.addStyleName(Reindeer.LABEL_H1); + + if (ExplorerApp.get().getEnvironment().equals(Environments.ALFRESCO)) { + title.addStyleName(ExplorerLayout.STYLE_WORKFLOW_CONSOLE_LOGO); + } else { + title.addStyleName(ExplorerLayout.STYLE_APPLICATION_LOGO); + } + + addComponent(title); + + setExpandRatio(title, 1.0f); + } + + protected Button addMenuButton(String type, String label, Resource icon, boolean active, float width) { + Button button = new Button(label); + button.addStyleName(type); + button.addStyleName(ExplorerLayout.STYLE_MAIN_MENU_BUTTON); + button.addStyleName(Reindeer.BUTTON_LINK); + button.setHeight(54, UNITS_PIXELS); + button.setIcon(icon); + button.setWidth(width, UNITS_PIXELS); + + addComponent(button); + setComponentAlignment(button, Alignment.TOP_CENTER); + + return button; + } + + protected void initProfileButton() { + final LoggedInUser user = ExplorerApp.get().getLoggedInUser(); + + // User name + link to profile + MenuBar profileMenu = new MenuBar(); + profileMenu.addStyleName(ExplorerLayout.STYLE_HEADER_PROFILE_BOX); + MenuItem rootItem = profileMenu.addItem(user.getFirstName() + " " + user.getLastName(), null); + rootItem.setStyleName(ExplorerLayout.STYLE_HEADER_PROFILE_MENU); + + if(useProfile()) { + // Show profile + rootItem.addItem(i18nManager.getMessage(Messages.PROFILE_SHOW), new Command() { + public void menuSelected(MenuItem selectedItem) { + ExplorerApp.get().getViewManager().showProfilePopup(user.getId()); + } + }); + + // Edit profile + rootItem.addItem(i18nManager.getMessage(Messages.PROFILE_EDIT), new Command() { + + public void menuSelected(MenuItem selectedItem) { + // TODO: Show in edit-mode + ExplorerApp.get().getViewManager().showProfilePopup(user.getId()); + } + }); + + // Change password + rootItem.addItem(i18nManager.getMessage(Messages.PASSWORD_CHANGE), new Command() { + public void menuSelected(MenuItem selectedItem) { + ExplorerApp.get().getViewManager().showPopupWindow(new ChangePasswordPopupWindow()); + } + }); + + rootItem.addSeparator(); + } + + // Logout + rootItem.addItem(i18nManager.getMessage(Messages.HEADER_LOGOUT), new Command() { + public void menuSelected(MenuItem selectedItem) { + ExplorerApp.get().close(); + } + }); + + addComponent(profileMenu); + setComponentAlignment(profileMenu, Alignment.TOP_RIGHT); + setExpandRatio(profileMenu, 1.0f); + } + + protected boolean useProfile() { + return true; + } + + // Listener classes + private class ShowTasksClickListener implements ClickListener { + public void buttonClick(ClickEvent event) { + ExplorerApp.get().getViewManager().showInboxPage(); + } + } + + private class ShowProcessDefinitionsClickListener implements ClickListener { + public void buttonClick(ClickEvent event) { + ExplorerApp.get().getViewManager().showProcessDefinitionPage(); + } + } + + private class ShowManagementClickListener implements ClickListener { + public void buttonClick(ClickEvent event) { + ExplorerApp.get().getViewManager().showDatabasePage(); + } + } +} diff --git a/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/mainlayout/MainMenuBarFactory.java b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/mainlayout/MainMenuBarFactory.java new file mode 100644 index 0000000..2d9587c --- /dev/null +++ b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/mainlayout/MainMenuBarFactory.java @@ -0,0 +1,36 @@ +/* Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.activiti.explorer.ui.mainlayout; + +import org.activiti.explorer.ui.NoParamComponentFactory; +import org.activiti.explorer.ui.alfresco.AlfrescoMainMenuBar; + + + + +/** + * @author Joram Barrez + */ +public class MainMenuBarFactory extends NoParamComponentFactory { + + @Override + protected Class getAlfrescoComponentClass() { + return AlfrescoMainMenuBar.class; + } + + @Override + protected Class getDefaultComponentClass() { + return MainMenuBar.class; + } + +} diff --git a/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/ManagementMenuBar.java b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/ManagementMenuBar.java new file mode 100644 index 0000000..b68ec44 --- /dev/null +++ b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/ManagementMenuBar.java @@ -0,0 +1,98 @@ +/* Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.activiti.explorer.ui.management; + +import org.activiti.explorer.ExplorerApp; +import org.activiti.explorer.I18nManager; +import org.activiti.explorer.Messages; +import org.activiti.explorer.ViewManager; +import org.activiti.explorer.ui.custom.ToolBar; +import org.activiti.explorer.ui.custom.ToolbarEntry.ToolbarCommand; +import org.activiti.explorer.ui.custom.ToolbarPopupEntry; +import org.activiti.explorer.ui.management.deployment.NewDeploymentListener; + +/** + * @author Joram Barrez + */ +public class ManagementMenuBar extends ToolBar { + + private static final long serialVersionUID = 1L; + + public static final String ENTRY_DATABASE = "database"; + public static final String ENTRY_DEPLOYMENTS = "deployments"; + public static final String ENTRY_JOBS = "jobs"; + public static final String ENTRY_USERS = "users"; + public static final String ENTRY_GROUPS = "groups"; + + protected I18nManager i18nManager; + protected ViewManager viewManager; + + public ManagementMenuBar() { + this.i18nManager = ExplorerApp.get().getI18nManager(); + this.viewManager = ExplorerApp.get().getViewManager(); + setWidth("100%"); + + initToolbarEntries(); + } + + protected void initToolbarEntries() { + addDatabaseToolbarEntry(); + addDeploymentsToolbarEntry(); + addJobsToolbarEntry(); + addUsersToolbarEntry(); + addGroupToolbarEntry(); + } + + protected void addDatabaseToolbarEntry() { + addToolbarEntry(ENTRY_DATABASE, i18nManager.getMessage(Messages.MGMT_MENU_DATABASE), new ToolbarCommand() { + public void toolBarItemSelected() { + viewManager.showDatabasePage(); + } + }); + } + + protected void addDeploymentsToolbarEntry() { + ToolbarPopupEntry deploymentEntry = addPopupEntry(ENTRY_DEPLOYMENTS, i18nManager.getMessage(Messages.MGMT_MENU_DEPLOYMENTS)); + deploymentEntry.addMenuItem(i18nManager.getMessage(Messages.MGMT_MENU_DEPLOYMENTS_SHOW_ALL), new ToolbarCommand() { + public void toolBarItemSelected() { + viewManager.showDeploymentPage(); + } + }); + deploymentEntry.addMenuItem(i18nManager.getMessage(Messages.MGMT_MENU_DEPLOYMENTS_UPLOAD), new NewDeploymentListener()); + } + + protected void addJobsToolbarEntry() { + addToolbarEntry(ENTRY_JOBS, i18nManager.getMessage(Messages.MGMT_MENU_JOBS), new ToolbarCommand() { + public void toolBarItemSelected() { + viewManager.showJobPage(); + } + }); + } + + protected void addUsersToolbarEntry() { + addToolbarEntry(ENTRY_USERS, i18nManager.getMessage(Messages.MGMT_MENU_USERS), new ToolbarCommand() { + public void toolBarItemSelected() { + viewManager.showUserPage(); + } + }); + } + + protected void addGroupToolbarEntry() { + addToolbarEntry(ENTRY_GROUPS, i18nManager.getMessage(Messages.MGMT_MENU_GROUPS), new ToolbarCommand() { + public void toolBarItemSelected() { + viewManager.showGroupPage(); + } + }); + } + +} diff --git a/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/ManagementMenuBarFactory.java b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/ManagementMenuBarFactory.java new file mode 100644 index 0000000..82a6664 --- /dev/null +++ b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/ManagementMenuBarFactory.java @@ -0,0 +1,34 @@ +/* Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.activiti.explorer.ui.management; + +import org.activiti.explorer.ui.NoParamComponentFactory; +import org.activiti.explorer.ui.alfresco.AlfrescoManagementMenuBar; +import org.activiti.explorer.ui.custom.ToolBar; + + +/** + * @author Joram Barrez + */ +public class ManagementMenuBarFactory extends NoParamComponentFactory { + + protected Class< ? extends ToolBar> getAlfrescoComponentClass() { + return AlfrescoManagementMenuBar.class; + } + + protected Class< ? extends ToolBar> getDefaultComponentClass() { + return ManagementMenuBar.class; + } + +} diff --git a/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/ManagementPage.java b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/ManagementPage.java new file mode 100644 index 0000000..e41e796 --- /dev/null +++ b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/ManagementPage.java @@ -0,0 +1,32 @@ +/* Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.activiti.explorer.ui.management; + +import org.activiti.explorer.ExplorerApp; +import org.activiti.explorer.ui.AbstractTablePage; +import org.activiti.explorer.ui.custom.ToolBar; + + +/** + * @author Joram Barrez + */ +public abstract class ManagementPage extends AbstractTablePage { + + private static final long serialVersionUID = 1L; + + @Override + protected ToolBar createMenuBar() { + return ExplorerApp.get().getComponentFactory(ManagementMenuBarFactory.class).create(); + } + +} diff --git a/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/db/DatabaseDetailPanel.java b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/db/DatabaseDetailPanel.java new file mode 100644 index 0000000..272a7e4 --- /dev/null +++ b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/db/DatabaseDetailPanel.java @@ -0,0 +1,123 @@ +/* Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.activiti.explorer.ui.management.db; + +import org.activiti.engine.ManagementService; +import org.activiti.engine.ProcessEngines; +import org.activiti.engine.management.TableMetaData; +import org.activiti.explorer.ExplorerApp; +import org.activiti.explorer.I18nManager; +import org.activiti.explorer.Messages; +import org.activiti.explorer.data.LazyLoadingContainer; +import org.activiti.explorer.data.LazyLoadingQuery; +import org.activiti.explorer.ui.Images; +import org.activiti.explorer.ui.custom.DetailPanel; +import org.activiti.explorer.ui.mainlayout.ExplorerLayout; + +import com.vaadin.ui.Alignment; +import com.vaadin.ui.Embedded; +import com.vaadin.ui.HorizontalLayout; +import com.vaadin.ui.Label; +import com.vaadin.ui.Table; +import com.vaadin.ui.themes.Reindeer; + + +/** + * @author Joram Barrez + */ +public class DatabaseDetailPanel extends DetailPanel { + + private static final long serialVersionUID = 1L; + + protected ManagementService managementService; + protected I18nManager i18nManager; + + protected String tableName; + + + public DatabaseDetailPanel(String tableName) { + this.tableName = tableName; + this.managementService = ProcessEngines.getDefaultProcessEngine().getManagementService(); + this.i18nManager = ExplorerApp.get().getI18nManager(); + + addStyleName(Reindeer.LAYOUT_WHITE); + setSizeFull(); + + addTableName(); + addTableData(); + } + + protected void addTableName() { + HorizontalLayout header = new HorizontalLayout(); + header.setWidth(100, UNITS_PERCENTAGE); + header.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK); + header.setSpacing(true); + + // TODO: use right image + Embedded image = new Embedded(null, Images.DATABASE_50); + header.addComponent(image); + header.setComponentAlignment(image, Alignment.MIDDLE_LEFT); + header.setMargin(false, false, true, false); + + Label name = new Label(tableName); + name.addStyleName(Reindeer.LABEL_H2); + header.addComponent(name); + + header.setExpandRatio(name, 1.0f); + header.setComponentAlignment(name, Alignment.MIDDLE_LEFT); + addDetailComponent(header); + + Label spacer = new Label(); + spacer.setWidth(100, UNITS_PERCENTAGE); + spacer.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK); + addDetailComponent(spacer); + } + + protected void addTableData() { + LazyLoadingQuery lazyLoadingQuery = new TableDataQuery(tableName, managementService); + LazyLoadingContainer lazyLoadingContainer = new LazyLoadingContainer(lazyLoadingQuery, 10); + + if (lazyLoadingContainer.size() > 0) { + + Table data = new Table(); + data.setContainerDataSource(lazyLoadingContainer); + data.setEditable(false); + data.setSelectable(true); + data.setColumnReorderingAllowed(true); + if (lazyLoadingQuery.size() < 10) { + data.setPageLength(0); + } else { + data.setPageLength(10); + } + addDetailComponent(data); + + data.setWidth(100, UNITS_PERCENTAGE); + data.setHeight(100, UNITS_PERCENTAGE); + data.addStyleName(ExplorerLayout.STYLE_DATABASE_TABLE); + setDetailExpandRatio(data, 1.0f); + + // Create column headers + TableMetaData metaData = managementService.getTableMetaData(tableName); + for (String columnName : metaData.getColumnNames()) { + data.addContainerProperty(columnName, String.class, null); + } + + } else { + Label noDataLabel = new Label(i18nManager.getMessage(Messages.DATABASE_NO_ROWS)); + noDataLabel.addStyleName(Reindeer.LABEL_SMALL); + addDetailComponent(noDataLabel); + setDetailExpandRatio(noDataLabel, 1.0f); + } + } + +} diff --git a/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/db/DatabasePage.java b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/db/DatabasePage.java new file mode 100644 index 0000000..70c23a3 --- /dev/null +++ b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/db/DatabasePage.java @@ -0,0 +1,117 @@ +/* Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.activiti.explorer.ui.management.db; + +import java.util.TreeMap; + +import org.activiti.engine.ManagementService; +import org.activiti.engine.ProcessEngines; +import org.activiti.explorer.ExplorerApp; +import org.activiti.explorer.navigation.DatabaseNavigator; +import org.activiti.explorer.navigation.UriFragment; +import org.activiti.explorer.ui.Images; +import org.activiti.explorer.ui.management.ManagementPage; + +import com.vaadin.data.Item; +import com.vaadin.data.Property; +import com.vaadin.data.Property.ValueChangeEvent; +import com.vaadin.terminal.Resource; +import com.vaadin.ui.Embedded; +import com.vaadin.ui.Table; + + +/** + * @author Joram Barrez + */ +public class DatabasePage extends ManagementPage { + + private static final long serialVersionUID = 1L; + + protected ManagementService managementService = ProcessEngines.getDefaultProcessEngine().getManagementService(); + protected String tableName; + + public DatabasePage() { + ExplorerApp.get().setCurrentUriFragment( + new UriFragment(DatabaseNavigator.TABLE_URI_PART)); + } + + public DatabasePage(String tableName) { + this(); + this.tableName = tableName; + } + + @Override + protected void initUi() { + super.initUi(); + + populateTableList(); // tablelist is NOT lazy loaded, since there are only a few tables + if (tableName == null) { + selectElement(0); + } else { + table.select(tableName); + } + } + + @Override + protected Table createList() { + final Table tableList = new Table(); + + // Listener to change right panel when clicked on a task + tableList.addListener(new Property.ValueChangeListener() { + private static final long serialVersionUID = 8811553575319455854L; + public void valueChange(ValueChangeEvent event) { + // The itemId of the table list is the tableName + String tableName = (String) event.getProperty().getValue(); + setDetailComponent(new DatabaseDetailPanel(tableName)); + + // Update URL + ExplorerApp.get().setCurrentUriFragment( + new UriFragment(DatabaseNavigator.TABLE_URI_PART, tableName)); + } + }); + + // Create column headers + tableList.addContainerProperty("icon", Embedded.class, null); + tableList.setColumnWidth("icon", 22); + tableList.addContainerProperty("tableName", String.class, null); + tableList.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN); + + return tableList; + } + + protected void populateTableList() { + TreeMap tables = new TreeMap(managementService.getTableCount()); // treemap because we want to sort it on name + for (String tableName : tables.keySet()) { + Item item = table.addItem(tableName); + item.getItemProperty("icon").setValue(determineTableIcon(tableName)); + item.getItemProperty("tableName").setValue(tableName + " (" + tables.get(tableName) + ")"); + } + } + + protected Embedded determineTableIcon(String tableName) { + Resource image = null; + if (tableName.startsWith("ACT_HI")) { + image = Images.DATABASE_HISTORY; + } else if (tableName.startsWith("ACT_RU")) { + image = Images.DATABASE_RUNTIME; + } else if (tableName.startsWith("ACT_RE")) { + image = Images.DATABASE_REPOSITORY; + } else if (tableName.startsWith("ACT_ID")) { + image = Images.DATABASE_IDENTITY; + } else { + image = Images.DATABASE_22; + } + return new Embedded(null, image); + } + +} diff --git a/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/db/TableDataQuery.java b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/db/TableDataQuery.java new file mode 100644 index 0000000..5daec46 --- /dev/null +++ b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/db/TableDataQuery.java @@ -0,0 +1,78 @@ +/* Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.activiti.explorer.ui.management.db; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import org.activiti.engine.ManagementService; +import org.activiti.engine.management.TablePageQuery; +import org.activiti.explorer.data.AbstractLazyLoadingQuery; +import org.activiti.explorer.data.MapItem; + +import com.vaadin.data.Item; + + + +/** + * @author Joram Barrez + */ +public class TableDataQuery extends AbstractLazyLoadingQuery { + + protected String tableName; + protected ManagementService managementService; + protected Object[] sortPropertyIds; + protected boolean[] sortPropertyIdsAscending; + + public TableDataQuery(String tableName, ManagementService managementService) { + this.tableName = tableName; + this.managementService = managementService; + } + + public List loadItems(int start, int count) { + TablePageQuery query = managementService.createTablePageQuery().tableName(tableName); + + if (sortPropertyIds != null && sortPropertyIds.length > 0) { + for (int i=0; i> rows = query.listPage(start, count).getRows(); + List items = new ArrayList(); + for (Map row : rows) { + items.add(new MapItem(row)); + } + return items; + } + + public int size() { + return managementService.getTableCount().get(tableName).intValue(); + } + + public void setSorting(Object[] propertyId, boolean[] ascending) { + this.sortPropertyIds = propertyId; + this.sortPropertyIdsAscending = ascending; + } + + public Item loadSingleResult(String id) { + throw new UnsupportedOperationException(); + } + +} diff --git a/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/deployment/DeleteDeploymentPopupWindow.java b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/deployment/DeleteDeploymentPopupWindow.java new file mode 100644 index 0000000..ae949c5 --- /dev/null +++ b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/deployment/DeleteDeploymentPopupWindow.java @@ -0,0 +1,138 @@ +/* Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.activiti.explorer.ui.management.deployment; + +import java.util.List; + +import org.activiti.engine.ProcessEngines; +import org.activiti.engine.RepositoryService; +import org.activiti.engine.RuntimeService; +import org.activiti.engine.repository.Deployment; +import org.activiti.engine.repository.ProcessDefinition; +import org.activiti.explorer.ExplorerApp; +import org.activiti.explorer.I18nManager; +import org.activiti.explorer.Messages; +import org.activiti.explorer.ui.Images; +import org.activiti.explorer.ui.custom.PopupWindow; + +import com.vaadin.ui.Alignment; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.Button.ClickListener; +import com.vaadin.ui.Embedded; +import com.vaadin.ui.HorizontalLayout; +import com.vaadin.ui.Label; +import com.vaadin.ui.VerticalLayout; +import com.vaadin.ui.themes.Reindeer; + + +/** + * @author Joram Barrez + */ +public class DeleteDeploymentPopupWindow extends PopupWindow { + + private static final long serialVersionUID = 1L; + + protected I18nManager i18nManager; + protected RepositoryService repositoryService = ProcessEngines.getDefaultProcessEngine().getRepositoryService(); + protected RuntimeService runtimeService = ProcessEngines.getDefaultProcessEngine().getRuntimeService(); + protected DeploymentPage deploymentPage; + protected VerticalLayout windowLayout; + protected Deployment deployment; + + public DeleteDeploymentPopupWindow(Deployment deployment, DeploymentPage deploymentPage) { + this.deployment = deployment; + this.deploymentPage = deploymentPage; + this.windowLayout = (VerticalLayout) getContent(); + this.i18nManager = ExplorerApp.get().getI18nManager(); + + initWindow(); + addDeleteWarning(); + addButtons(); + } + + protected void initWindow() { + windowLayout.setSpacing(true); + addStyleName(Reindeer.WINDOW_LIGHT); + setModal(true); + center(); + setCaption(i18nManager.getMessage(Messages.DEPLOYMENT_DELETE_POPUP_CAPTION, deployment.getName())); + } + + protected void addDeleteWarning() { + List processDefinitions = + repositoryService.createProcessDefinitionQuery().deploymentId(deployment.getId()).list(); + + int nrOfProcessInstances = 0; + for (ProcessDefinition processDefinition : processDefinitions) { + nrOfProcessInstances += runtimeService.createProcessInstanceQuery() + .processDefinitionId(processDefinition.getId()) + .count(); + } + + if (nrOfProcessInstances == 0) { + Label noInstancesLabel = new Label(i18nManager.getMessage(Messages.DEPLOYMENT_NO_INSTANCES)); + noInstancesLabel.addStyleName(Reindeer.LABEL_SMALL); + addComponent(noInstancesLabel); + } else { + HorizontalLayout warningLayout = new HorizontalLayout(); + warningLayout.setSpacing(true); + addComponent(warningLayout); + + Embedded warningIcon = new Embedded(null, Images.WARNING); + warningIcon.setType(Embedded.TYPE_IMAGE); + warningLayout.addComponent(warningIcon); + + Label warningLabel = new Label(i18nManager.getMessage(Messages.DEPLOYMENT_DELETE_POPUP_WARNING, nrOfProcessInstances), Label.CONTENT_XHTML); + warningLabel.setSizeUndefined(); + warningLabel.addStyleName(Reindeer.LABEL_SMALL); + warningLayout.addComponent(warningLabel); + } + + // Some empty space + Label emptySpace = new Label(" ", Label.CONTENT_XHTML); + addComponent(emptySpace); + } + + protected void addButtons() { + // Cancel + Button cancelButton = new Button(i18nManager.getMessage(Messages.BUTTON_CANCEL)); + cancelButton.addStyleName(Reindeer.BUTTON_SMALL); + cancelButton.addListener(new ClickListener() { + public void buttonClick(ClickEvent event) { + close(); + } + }); + + // Delete + Button deleteButton = new Button(i18nManager.getMessage(Messages.DEPLOYMENT_DELETE_POPUP_DELETE_BUTTON)); + deleteButton.addStyleName(Reindeer.BUTTON_SMALL); + deleteButton.addListener(new ClickListener() { + public void buttonClick(ClickEvent event) { + // Delete deployment, close popup window and refresh deployment list + repositoryService.deleteDeployment(deployment.getId(), true); + close(); + deploymentPage.refreshSelectNext(); + } + }); + + // Alignment + HorizontalLayout buttonLayout = new HorizontalLayout(); + buttonLayout.setSpacing(true); + buttonLayout.addComponent(cancelButton); + buttonLayout.addComponent(deleteButton); + addComponent(buttonLayout); + windowLayout.setComponentAlignment(buttonLayout, Alignment.BOTTOM_RIGHT); + } + +} diff --git a/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/deployment/DeploymentDetailPanel.java b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/deployment/DeploymentDetailPanel.java new file mode 100644 index 0000000..a065d8f --- /dev/null +++ b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/deployment/DeploymentDetailPanel.java @@ -0,0 +1,201 @@ +/* Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.activiti.explorer.ui.management.deployment; + +import java.io.InputStream; +import java.util.Collections; +import java.util.List; + +import org.activiti.engine.ProcessEngines; +import org.activiti.engine.RepositoryService; +import org.activiti.engine.repository.Deployment; +import org.activiti.engine.repository.ProcessDefinition; +import org.activiti.explorer.ExplorerApp; +import org.activiti.explorer.I18nManager; +import org.activiti.explorer.Messages; +import org.activiti.explorer.ViewManager; +import org.activiti.explorer.ui.Images; +import org.activiti.explorer.ui.custom.DetailPanel; +import org.activiti.explorer.ui.custom.PrettyTimeLabel; +import org.activiti.explorer.ui.mainlayout.ExplorerLayout; + +import com.vaadin.terminal.StreamResource; +import com.vaadin.terminal.StreamResource.StreamSource; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.Button.ClickListener; +import com.vaadin.ui.Embedded; +import com.vaadin.ui.GridLayout; +import com.vaadin.ui.Label; +import com.vaadin.ui.Link; +import com.vaadin.ui.VerticalLayout; +import com.vaadin.ui.themes.Reindeer; + + +/** + * @author Joram Barrez + * @author Frederik Heremans + */ +public class DeploymentDetailPanel extends DetailPanel { + + private static final long serialVersionUID = 1L; + + protected RepositoryService repositoryService; + protected ViewManager viewManager; + protected I18nManager i18nManager; + + protected Deployment deployment; + protected DeploymentPage parent; + + public DeploymentDetailPanel(String deploymentId, DeploymentPage parent) { + this.repositoryService = ProcessEngines.getDefaultProcessEngine().getRepositoryService(); + this.i18nManager = ExplorerApp.get().getI18nManager(); + this.viewManager = ExplorerApp.get().getViewManager(); + + this.deployment = repositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult(); + this.parent = parent; + + init(); + } + + protected void init() { + + setWidth(100, UNITS_PERCENTAGE); + + addDeploymentName(); + addProcessDefinitionLinks(); + addResourceLinks(); + + addActions(); + } + + protected void addActions() { + // Delete button + Button deleteButton = new Button(i18nManager.getMessage(Messages.DEPLOYMENT_DELETE)); + deleteButton.setIcon(Images.DELETE); + deleteButton.addListener(new ClickListener() { + + public void buttonClick(ClickEvent event) { + viewManager.showPopupWindow(new DeleteDeploymentPopupWindow(deployment, parent)); + } + }); + + parent.getToolBar().removeAllButtons(); + parent.getToolBar().addButton(deleteButton); + } + + protected void addDeploymentName() { + + GridLayout taskDetails = new GridLayout(3, 2); + taskDetails.setWidth(100, UNITS_PERCENTAGE); + taskDetails.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK); + taskDetails.setSpacing(true); + taskDetails.setMargin(false, false, true, false); + + // Add image + Embedded image = new Embedded(null, Images.DEPLOYMENT_50); + taskDetails.addComponent(image, 0, 0, 0, 1); + + // Add deployment name + Label nameLabel = new Label(); + if(deployment.getName() != null) { + nameLabel.setValue(deployment.getName()); + } else { + nameLabel.setValue(i18nManager.getMessage(Messages.DEPLOYMENT_NO_NAME)); + } + nameLabel.addStyleName(Reindeer.LABEL_H2); + taskDetails.addComponent(nameLabel, 1, 0, 2, 0); + + // Add deploy time + PrettyTimeLabel deployTimeLabel = new PrettyTimeLabel(i18nManager.getMessage(Messages.DEPLOYMENT_DEPLOY_TIME), + deployment.getDeploymentTime(), null, true); + deployTimeLabel.addStyleName(ExplorerLayout.STYLE_DEPLOYMENT_HEADER_DEPLOY_TIME); + taskDetails.addComponent(deployTimeLabel, 1, 1); + + taskDetails.setColumnExpandRatio(1, 1.0f); + taskDetails.setColumnExpandRatio(2, 1.0f); + + addDetailComponent(taskDetails); + } + + protected void addProcessDefinitionLinks() { + List processDefinitions = repositoryService.createProcessDefinitionQuery() + .deploymentId(deployment.getId()) + .orderByProcessDefinitionName().asc() + .list(); + + if (processDefinitions.size() > 0) { + + // Header + Label processDefinitionHeader = new Label(i18nManager.getMessage(Messages.DEPLOYMENT_HEADER_DEFINITIONS)); + processDefinitionHeader.addStyleName(ExplorerLayout.STYLE_H3); + processDefinitionHeader.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK); + processDefinitionHeader.setWidth(100, UNITS_PERCENTAGE); + addDetailComponent(processDefinitionHeader); + + // processes + VerticalLayout processDefinitionLinksLayout = new VerticalLayout(); + processDefinitionLinksLayout.setSpacing(true); + processDefinitionLinksLayout.setMargin(true, false, true, false); + addDetailComponent(processDefinitionLinksLayout); + + for (final ProcessDefinition processDefinition : processDefinitions) { + Button processDefinitionButton = new Button(getProcessDisplayName(processDefinition)); + processDefinitionButton.addListener(new ClickListener() { + public void buttonClick(ClickEvent event) { + viewManager.showProcessDefinitionPage(processDefinition.getId()); + } + }); + processDefinitionButton.addStyleName(Reindeer.BUTTON_LINK); + processDefinitionLinksLayout.addComponent(processDefinitionButton); + } + } + } + + protected String getProcessDisplayName(ProcessDefinition processDefinition) { + if(processDefinition.getName() != null) { + return processDefinition.getName(); + } else { + return processDefinition.getKey(); + } + } + + protected void addResourceLinks() { + List resourceNames = repositoryService.getDeploymentResourceNames(deployment.getId()); + Collections.sort(resourceNames); // small nr of elements, so we can do it in-memory + + if (resourceNames.size() > 0) { + Label resourceHeader = new Label(i18nManager.getMessage(Messages.DEPLOYMENT_HEADER_RESOURCES)); + resourceHeader.setWidth("95%"); + resourceHeader.addStyleName(ExplorerLayout.STYLE_H3); + resourceHeader.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK); + addDetailComponent(resourceHeader); + + // resources + VerticalLayout resourceLinksLayout = new VerticalLayout(); + resourceLinksLayout.setSpacing(true); + resourceLinksLayout.setMargin(true, false, false, false); + addDetailComponent(resourceLinksLayout); + + for (final String resourceName : resourceNames) { + StreamResource.StreamSource streamSource = new StreamSource() { + public InputStream getStream() { + return repositoryService.getResourceAsStream(deployment.getId(), resourceName); + } + }; + Link resourceLink = new Link(resourceName, new StreamResource(streamSource, resourceName, ExplorerApp.get())); + resourceLinksLayout.addComponent(resourceLink); + } + } + } +} diff --git a/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/deployment/DeploymentListQuery.java b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/deployment/DeploymentListQuery.java new file mode 100644 index 0000000..6099b96 --- /dev/null +++ b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/deployment/DeploymentListQuery.java @@ -0,0 +1,100 @@ +/* Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.activiti.explorer.ui.management.deployment; + +import java.util.ArrayList; +import java.util.List; + +import org.activiti.engine.ProcessEngines; +import org.activiti.engine.RepositoryService; +import org.activiti.engine.repository.Deployment; +import org.activiti.explorer.ExplorerApp; +import org.activiti.explorer.Messages; +import org.activiti.explorer.data.AbstractLazyLoadingQuery; + +import com.vaadin.data.Item; +import com.vaadin.data.util.ObjectProperty; +import com.vaadin.data.util.PropertysetItem; + + +/** + * @author Joram Barrez + */ +public class DeploymentListQuery extends AbstractLazyLoadingQuery { + + protected RepositoryService repositoryService; + + public DeploymentListQuery() { + this.repositoryService = ProcessEngines.getDefaultProcessEngine().getRepositoryService(); + } + + public int size() { + return (int) repositoryService.createDeploymentQuery().count(); + } + + public List loadItems(int start, int count) { + List deployments = repositoryService.createDeploymentQuery() + .orderByDeploymentName().asc() + .orderByDeploymentId().asc() + .listPage(start, count); + + List items = new ArrayList(); + for (Deployment deployment : deployments) { + items.add(new DeploymentListitem(deployment)); + } + return items; + } + + public Item loadSingleResult(String id) { + Deployment deployment = repositoryService.createDeploymentQuery().deploymentId(id).singleResult(); + if(deployment != null) { + return new DeploymentListitem(deployment); + } + return null; + } + + public void setSorting(Object[] propertyIds, boolean[] ascending) { + throw new UnsupportedOperationException(); + } + + class DeploymentListitem extends PropertysetItem implements Comparable { + + private static final long serialVersionUID = 1L; + + public DeploymentListitem(Deployment deployment) { + addItemProperty("id", new ObjectProperty(deployment.getId(), String.class)); + if(deployment.getName() != null) { + addItemProperty("name", new ObjectProperty(deployment.getName(), String.class)); + } else { + addItemProperty("name", new ObjectProperty(ExplorerApp.get().getI18nManager().getMessage(Messages.DEPLOYMENT_NO_NAME), String.class)); + } + } + + public int compareTo(DeploymentListitem other) { + // Deployments are ordered first on name, then on id + String name = (String) getItemProperty("name").getValue(); + String otherName = (String) other.getItemProperty("name").getValue(); + + int comparison = name.compareTo(otherName); + if (comparison != 0) { + return comparison; + } else { + String id = (String) getItemProperty("id").getValue(); + String otherId = (String) other.getItemProperty("id").getValue(); + return id.compareTo(otherId); + } + } + + } + +} diff --git a/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/deployment/DeploymentPage.java b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/deployment/DeploymentPage.java new file mode 100644 index 0000000..ea23b82 --- /dev/null +++ b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/deployment/DeploymentPage.java @@ -0,0 +1,101 @@ +/* Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.activiti.explorer.ui.management.deployment; + +import org.activiti.explorer.ExplorerApp; +import org.activiti.explorer.data.LazyLoadingContainer; +import org.activiti.explorer.data.LazyLoadingQuery; +import org.activiti.explorer.navigation.DeploymentNavigator; +import org.activiti.explorer.navigation.UriFragment; +import org.activiti.explorer.ui.Images; +import org.activiti.explorer.ui.management.ManagementPage; +import org.activiti.explorer.ui.util.ThemeImageColumnGenerator; + +import com.vaadin.data.Item; +import com.vaadin.data.Property; +import com.vaadin.data.Property.ValueChangeEvent; +import com.vaadin.ui.Component; +import com.vaadin.ui.Table; + + +/** + * @author Joram Barrez + */ +public class DeploymentPage extends ManagementPage { + + private static final long serialVersionUID = 1L; + + protected String deploymentId; + protected Table deploymentTable; + protected LazyLoadingContainer deploymentListContainer; + + public DeploymentPage() { + ExplorerApp.get().setCurrentUriFragment( + new UriFragment(DeploymentNavigator.DEPLOYMENT_URI_PART)); + } + + public DeploymentPage(String deploymentId) { + this(); + this.deploymentId = deploymentId; + } + + @Override + protected void initUi() { + super.initUi(); + + if (deploymentId == null) { + selectElement(0); + } else { + selectElement(deploymentListContainer.getIndexForObjectId(deploymentId)); + } + } + + @Override + protected Table createList() { + final Table deploymentTable = new Table(); + + LazyLoadingQuery deploymentListQuery = new DeploymentListQuery(); + deploymentListContainer = new LazyLoadingContainer(deploymentListQuery, 10); + deploymentTable.setContainerDataSource(deploymentListContainer); + + // Listener to change right panel when clicked on a deployment + deploymentTable.addListener(new Property.ValueChangeListener() { + private static final long serialVersionUID = 8811553575319455854L; + public void valueChange(ValueChangeEvent event) { + Item item = deploymentTable.getItem(event.getProperty().getValue()); // the value of the property is the itemId of the table entry + if(item != null) { + String deploymentId = (String) item.getItemProperty("id").getValue(); + setDetailComponent(new DeploymentDetailPanel(deploymentId, DeploymentPage.this)); + + // Update URL + ExplorerApp.get().setCurrentUriFragment( + new UriFragment(DeploymentNavigator.DEPLOYMENT_URI_PART, deploymentId)); + } else { + // Nothing is selected + setDetailComponent(null); + ExplorerApp.get().setCurrentUriFragment(new UriFragment(DeploymentNavigator.DEPLOYMENT_URI_PART)); + } + } + }); + + // Create column headers + deploymentTable.addGeneratedColumn("icon", new ThemeImageColumnGenerator(Images.DEPLOYMENT_22)); + deploymentTable.setColumnWidth("icon", 22); + + deploymentTable.addContainerProperty("name", String.class, null); + deploymentTable.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN); + + return deploymentTable; + } + +} diff --git a/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/deployment/DeploymentUploadReceiver.java b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/deployment/DeploymentUploadReceiver.java new file mode 100644 index 0000000..02a7a7b --- /dev/null +++ b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/deployment/DeploymentUploadReceiver.java @@ -0,0 +1,114 @@ +/* Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.activiti.explorer.ui.management.deployment; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.util.zip.ZipInputStream; + +import org.activiti.engine.ActivitiException; +import org.activiti.engine.ProcessEngines; +import org.activiti.engine.RepositoryService; +import org.activiti.engine.repository.Deployment; +import org.activiti.engine.repository.DeploymentBuilder; +import org.activiti.explorer.ExplorerApp; +import org.activiti.explorer.I18nManager; +import org.activiti.explorer.Messages; +import org.activiti.explorer.NotificationManager; +import org.activiti.explorer.ViewManager; + +import com.vaadin.ui.Upload.FinishedEvent; +import com.vaadin.ui.Upload.FinishedListener; +import com.vaadin.ui.Upload.Receiver; + + +/** + * @author Joram Barrez + */ +public class DeploymentUploadReceiver implements Receiver, FinishedListener { + + private static final long serialVersionUID = 1L; + + protected RepositoryService repositoryService; + protected I18nManager i18nManager; + protected NotificationManager notificationManager; + protected ViewManager viewManager; + + // Will be assigned during upload + protected ByteArrayOutputStream outputStream; + protected String fileName; + + // Will be assigned after deployment + protected boolean validFile = false; + protected Deployment deployment; + + public DeploymentUploadReceiver() { + this.repositoryService = ProcessEngines.getDefaultProcessEngine().getRepositoryService(); + this.i18nManager = ExplorerApp.get().getI18nManager(); + this.notificationManager = ExplorerApp.get().getNotificationManager(); + this.viewManager = ExplorerApp.get().getViewManager(); + } + + public OutputStream receiveUpload(String filename, String mimeType) { + this.fileName = filename; + this.outputStream = new ByteArrayOutputStream(); + return outputStream; + } + + public void uploadFinished(FinishedEvent event) { + deployUploadedFile(); + if (validFile) { + showUploadedDeployment(); + } + } + + protected void deployUploadedFile() { + DeploymentBuilder deploymentBuilder = repositoryService.createDeployment().name(fileName); + try { + try { + if (fileName.endsWith(".bpmn20.xml")) { + validFile = true; + deployment = deploymentBuilder + .addInputStream(fileName, new ByteArrayInputStream(outputStream.toByteArray())) + .deploy(); + } else if (fileName.endsWith(".bar") || fileName.endsWith(".zip")) { + validFile = true; + deployment = deploymentBuilder + .addZipInputStream(new ZipInputStream(new ByteArrayInputStream(outputStream.toByteArray()))) + .deploy(); + } else { + notificationManager.showErrorNotification(Messages.DEPLOYMENT_UPLOAD_INVALID_FILE, + i18nManager.getMessage(Messages.DEPLOYMENT_UPLOAD_INVALID_FILE_EXPLANATION)); + } + } catch (ActivitiException e) { + String errorMsg = e.getMessage().replace(System.getProperty("line.separator"), "
"); + notificationManager.showErrorNotification(Messages.DEPLOYMENT_UPLOAD_FAILED, errorMsg); + } + } finally { + if (outputStream != null) { + try { + outputStream.close(); + } catch (IOException e) { + notificationManager.showErrorNotification("Server-side error", e.getMessage()); + } + } + } + } + + protected void showUploadedDeployment() { + viewManager.showDeploymentPage(deployment.getId()); + } + +} diff --git a/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/deployment/NewDeploymentListener.java b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/deployment/NewDeploymentListener.java new file mode 100644 index 0000000..a86df3f --- /dev/null +++ b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/deployment/NewDeploymentListener.java @@ -0,0 +1,50 @@ +/* Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.activiti.explorer.ui.management.deployment; + +import org.activiti.explorer.ExplorerApp; +import org.activiti.explorer.I18nManager; +import org.activiti.explorer.Messages; +import org.activiti.explorer.ViewManager; +import org.activiti.explorer.ui.custom.ToolbarEntry.ToolbarCommand; +import org.activiti.explorer.ui.custom.UploadPopupWindow; + + +/** + * @author Joram Barrez + */ +public class NewDeploymentListener implements ToolbarCommand { + + private static final long serialVersionUID = 1L; + + protected I18nManager i18nManager; + protected ViewManager viewManager; + + public NewDeploymentListener() { + this.i18nManager = ExplorerApp.get().getI18nManager(); + this.viewManager = ExplorerApp.get().getViewManager(); + } + + public void toolBarItemSelected() { + DeploymentUploadReceiver receiver = new DeploymentUploadReceiver(); + UploadPopupWindow uploadPopupWindow = new UploadPopupWindow( + i18nManager.getMessage(Messages.DEPLOYMENT_UPLOAD), + i18nManager.getMessage(Messages.DEPLOYMENT_UPLOAD_DESCRIPTION), + receiver); + + // The receiver also acts as a listener for the end of the upload + // so it can switch to the new deployment page + uploadPopupWindow.addFinishedListener(receiver); + viewManager.showPopupWindow(uploadPopupWindow); + } +} diff --git a/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/identity/DeleteMembershipListener.java b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/identity/DeleteMembershipListener.java new file mode 100644 index 0000000..301d15b --- /dev/null +++ b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/identity/DeleteMembershipListener.java @@ -0,0 +1,68 @@ +/* Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.activiti.explorer.ui.management.identity; + +import org.activiti.engine.IdentityService; +import org.activiti.explorer.ExplorerApp; +import org.activiti.explorer.I18nManager; +import org.activiti.explorer.Messages; +import org.activiti.explorer.ViewManager; +import org.activiti.explorer.ui.custom.ConfirmationDialogPopupWindow; +import org.activiti.explorer.ui.event.ConfirmationEvent; +import org.activiti.explorer.ui.event.ConfirmationEventListener; + +import com.vaadin.event.MouseEvents.ClickEvent; +import com.vaadin.event.MouseEvents.ClickListener; + + +/** + * @author Joram Barrez + */ +public class DeleteMembershipListener implements ClickListener { + + private static final long serialVersionUID = 1L; + protected IdentityService identityService; + protected String userId; + protected String groupId; + protected MemberShipChangeListener membershipChangeListener; + + public DeleteMembershipListener(IdentityService identityService, String userId, + String groupId, MemberShipChangeListener memberShipChangeListener ) { + this.identityService = identityService; + this.userId = userId; + this.groupId = groupId; + this.membershipChangeListener = memberShipChangeListener; + } + + public void click(ClickEvent event) { + I18nManager i18nManager = ExplorerApp.get().getI18nManager(); + ViewManager viewManager = ExplorerApp.get().getViewManager(); + + // Add listener to confirmation window. If confirmed, membership is deleted + ConfirmationDialogPopupWindow confirmationPopup = + new ConfirmationDialogPopupWindow(i18nManager.getMessage(Messages.USER_CONFIRM_DELETE_GROUP, userId, groupId)); + confirmationPopup.addListener(new ConfirmationEventListener() { + protected void rejected(ConfirmationEvent event) { + } + protected void confirmed(ConfirmationEvent event) { + identityService.deleteMembership(userId, groupId); + membershipChangeListener.notifyMembershipChanged(); + } + }); + + // Show popup + viewManager.showPopupWindow(confirmationPopup); + } + +} diff --git a/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/identity/GroupDetailPanel.java b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/identity/GroupDetailPanel.java new file mode 100644 index 0000000..712a61f --- /dev/null +++ b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/identity/GroupDetailPanel.java @@ -0,0 +1,376 @@ +/* Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.activiti.explorer.ui.management.identity; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.List; + +import org.activiti.engine.IdentityService; +import org.activiti.engine.ProcessEngines; +import org.activiti.engine.identity.Group; +import org.activiti.engine.identity.User; +import org.activiti.explorer.ExplorerApp; +import org.activiti.explorer.I18nManager; +import org.activiti.explorer.Messages; +import org.activiti.explorer.data.LazyLoadingContainer; +import org.activiti.explorer.data.LazyLoadingQuery; +import org.activiti.explorer.ui.Images; +import org.activiti.explorer.ui.custom.ConfirmationDialogPopupWindow; +import org.activiti.explorer.ui.custom.DetailPanel; +import org.activiti.explorer.ui.custom.SelectUsersPopupWindow; +import org.activiti.explorer.ui.event.ConfirmationEvent; +import org.activiti.explorer.ui.event.ConfirmationEventListener; +import org.activiti.explorer.ui.event.SubmitEvent; +import org.activiti.explorer.ui.event.SubmitEventListener; +import org.activiti.explorer.ui.mainlayout.ExplorerLayout; + +import com.vaadin.ui.Alignment; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.Button.ClickListener; +import com.vaadin.ui.ComboBox; +import com.vaadin.ui.Component; +import com.vaadin.ui.Embedded; +import com.vaadin.ui.GridLayout; +import com.vaadin.ui.HorizontalLayout; +import com.vaadin.ui.Label; +import com.vaadin.ui.Table; +import com.vaadin.ui.TextField; +import com.vaadin.ui.VerticalLayout; +import com.vaadin.ui.themes.Reindeer; + + +/** + * @author Joram Barrez + */ +public class GroupDetailPanel extends DetailPanel implements MemberShipChangeListener { + + private static final long serialVersionUID = 1L; + + protected IdentityService identityService; + protected I18nManager i18nManager; + + protected GroupPage groupPage; + protected Group group; + protected VerticalLayout panelLayout; + protected boolean editingDetails; + protected HorizontalLayout detailLayout; + protected GridLayout detailsGrid; + protected TextField nameTextField; + protected ComboBox typeCombobox; + protected HorizontalLayout membersLayout; + protected Table membersTable; + protected Label noMembersTable; + + public GroupDetailPanel(GroupPage groupPage, String groupId) { + this.groupPage = groupPage; + this.identityService = ProcessEngines.getDefaultProcessEngine().getIdentityService(); + this.group = identityService.createGroupQuery().groupId(groupId).singleResult(); + this.i18nManager = ExplorerApp.get().getI18nManager(); + + init(); + } + + protected void init() { + setSizeFull(); + addStyleName(Reindeer.PANEL_LIGHT); + + initPageTitle(); + initGroupDetails(); + initMembers(); + + initActions(); + } + + protected void initActions() { + Button createGroupButton = new Button(i18nManager.getMessage(Messages.GROUP_CREATE)); + createGroupButton.setIcon(Images.GROUP_16); + createGroupButton.addListener(new ClickListener() { + public void buttonClick(ClickEvent event) { + NewGroupPopupWindow popup = new NewGroupPopupWindow(); + ExplorerApp.get().getViewManager().showPopupWindow(popup); + } + }); + groupPage.getToolBar().removeAllButtons(); + groupPage.getToolBar().addButton(createGroupButton); + } + + protected void initPageTitle() { + HorizontalLayout layout = new HorizontalLayout(); + layout.setWidth(100, UNITS_PERCENTAGE); + layout.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK); + layout.setSpacing(true); + layout.setMargin(false, false, true, false); + addDetailComponent(layout); + + Embedded groupImage = new Embedded(null, Images.GROUP_50); + layout.addComponent(groupImage); + + Label groupName = new Label(getGroupName(group)); + groupName.setSizeUndefined(); + groupName.addStyleName(Reindeer.LABEL_H2); + layout.addComponent(groupName); + layout.setComponentAlignment(groupName, Alignment.MIDDLE_LEFT); + layout.setExpandRatio(groupName, 1.0f); + } + + protected String getGroupName(Group theGroup) { + if(theGroup.getName() == null) { + return theGroup.getId(); + } + return group.getName(); + } + + protected void initGroupDetails() { + Label groupDetailsHeader = new Label(i18nManager.getMessage(Messages.GROUP_HEADER_DETAILS)); + groupDetailsHeader.addStyleName(ExplorerLayout.STYLE_H3); + groupDetailsHeader.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK); + + addDetailComponent(groupDetailsHeader); + + detailLayout = new HorizontalLayout(); + detailLayout.setSpacing(true); + detailLayout.setMargin(true, false, true, false); + addDetailComponent(detailLayout); + + populateGroupDetails(); + } + + protected void populateGroupDetails() { + initGroupProperties(); + initGroupActions(); + } + + protected void initGroupProperties() { + detailsGrid = new GridLayout(2, 3); + detailsGrid.setSpacing(true); + detailLayout.setMargin(true, true, true, false); + detailLayout.addComponent(detailsGrid); + + // id + Label idLabel = new Label(i18nManager.getMessage(Messages.GROUP_ID) + ": "); + idLabel.addStyleName(ExplorerLayout.STYLE_LABEL_BOLD); + detailsGrid.addComponent(idLabel); + Label idValueLabel = new Label(group.getId()); + detailsGrid.addComponent(idValueLabel); + + // name + Label nameLabel = new Label(i18nManager.getMessage(Messages.GROUP_NAME) + ": "); + nameLabel.addStyleName(ExplorerLayout.STYLE_LABEL_BOLD); + detailsGrid.addComponent(nameLabel); + if (!editingDetails) { + Label nameValueLabel = new Label(group.getName()); + detailsGrid.addComponent(nameValueLabel); + } else { + nameTextField = new TextField(null, group.getName()); + detailsGrid.addComponent(nameTextField); + } + + // Type + Label typeLabel = new Label(i18nManager.getMessage(Messages.GROUP_TYPE) + ": "); + typeLabel.addStyleName(ExplorerLayout.STYLE_LABEL_BOLD); + detailsGrid.addComponent(typeLabel); + if (!editingDetails) { + Label typeValueLabel = new Label(group.getType()); + detailsGrid.addComponent(typeValueLabel); + } else { + typeCombobox = new ComboBox(null, Arrays.asList("assignment", "security-role")); + typeCombobox.setNullSelectionAllowed(false); + typeCombobox.setInvalidAllowed(false); + typeCombobox.select(group.getType()); + detailsGrid.addComponent(typeCombobox); + } + } + + protected void initGroupActions() { + VerticalLayout actionsLayout = new VerticalLayout(); + actionsLayout.setSpacing(true); + actionsLayout.setMargin(false, false, false, true); + detailLayout.addComponent(actionsLayout); + + if (editingDetails) { + initSaveButton(actionsLayout); + } else { + initEditButton(actionsLayout); + initDeleteButton(actionsLayout); + } + } + + protected void initEditButton(VerticalLayout actionsLayout) { + Button editButton = new Button(i18nManager.getMessage(Messages.USER_EDIT)); + editButton.addStyleName(Reindeer.BUTTON_SMALL); + actionsLayout.addComponent(editButton); + + editButton.addListener(new ClickListener() { + public void buttonClick(ClickEvent event) { + editingDetails = true; + detailLayout.removeAllComponents(); + populateGroupDetails(); + } + }); + } + + protected void initSaveButton(VerticalLayout actionsLayout) { + Button saveButton = new Button(i18nManager.getMessage(Messages.USER_SAVE)); + saveButton.addStyleName(Reindeer.BUTTON_SMALL); + actionsLayout.addComponent(saveButton); + + saveButton.addListener(new ClickListener() { + public void buttonClick(ClickEvent event) { + String originalName = group.getName(); + + // Update data + if (nameTextField.getValue() != null) { + group.setName(nameTextField.getValue().toString()); + group.setType(typeCombobox.getValue().toString()); + } + identityService.saveGroup(group); + + // Update UI + editingDetails = false; + detailLayout.removeAllComponents(); + populateGroupDetails(); + + // Refresh task list (only if name was changed) + if ( (originalName != null && !originalName.equals(group.getName())) + || (originalName == null && group.getName() != null)) { + groupPage.notifyGroupChanged(group.getId()); + } + } + }); + } + + protected void initDeleteButton(VerticalLayout actionsLayout) { + Button deleteButton = new Button(i18nManager.getMessage(Messages.GROUP_DELETE)); + deleteButton.addStyleName(Reindeer.BUTTON_SMALL); + actionsLayout.addComponent(deleteButton); + + deleteButton.addListener(new ClickListener() { + public void buttonClick(ClickEvent event) { + ConfirmationDialogPopupWindow confirmPopup = + new ConfirmationDialogPopupWindow(i18nManager.getMessage(Messages.GROUP_CONFIRM_DELETE, group.getId())); + confirmPopup.addListener(new ConfirmationEventListener() { + protected void rejected(ConfirmationEvent event) { + } + protected void confirmed(ConfirmationEvent event) { + // Delete group from database + identityService.deleteGroup(group.getId()); + + // Update ui + groupPage.refreshSelectNext(); + } + }); + + ExplorerApp.get().getViewManager().showPopupWindow(confirmPopup); + } + }); + } + + protected void initMembers() { + HorizontalLayout membersHeader = new HorizontalLayout(); + membersHeader.setSpacing(true); + membersHeader.setWidth(100, UNITS_PERCENTAGE); + membersHeader.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK); + addDetailComponent(membersHeader); + + initMembersTitle(membersHeader); + initAddMembersButton(membersHeader); + + membersLayout = new HorizontalLayout(); + membersLayout.setWidth(100, UNITS_PERCENTAGE); + addDetailComponent(membersLayout); + initMembersTable(); + } + + protected void initMembersTitle(HorizontalLayout membersHeader) { + Label usersHeader = new Label(i18nManager.getMessage(Messages.GROUP_HEADER_USERS)); + usersHeader.addStyleName(ExplorerLayout.STYLE_H3); + membersHeader.addComponent(usersHeader); + } + + protected void initAddMembersButton(HorizontalLayout membersHeader) { + Button addButton = new Button(); + addButton.addStyleName(ExplorerLayout.STYLE_ADD); + membersHeader.addComponent(addButton); + membersHeader.setComponentAlignment(addButton, Alignment.MIDDLE_RIGHT); + + addButton.addListener(new ClickListener() { + public void buttonClick(ClickEvent event) { + final SelectUsersPopupWindow selectUsersPopup = new SelectUsersPopupWindow( + i18nManager.getMessage(Messages.GROUP_SELECT_MEMBERS, group.getId()), + true, false, getCurrentMembers()); + ExplorerApp.get().getViewManager().showPopupWindow(selectUsersPopup); + + // Listen to submit events (that contain the selected users) + selectUsersPopup.addListener(new SubmitEventListener() { + protected void submitted(SubmitEvent event) { + Collection userIds = selectUsersPopup.getSelectedUserIds(); + if (userIds.size() > 0) { + for (String userId : userIds) { + identityService.createMembership(userId, group.getId()); + } + notifyMembershipChanged(); + } + } + protected void cancelled(SubmitEvent event) { + } + }); + } + }); + } + + // Hacky - must be put in custom service + protected List getCurrentMembers() { + List users = identityService.createUserQuery().memberOfGroup(group.getId()).list(); + List userIds = new ArrayList(); + for (User user : users) { + userIds.add(user.getId()); + } + return userIds; + } + + protected void initMembersTable() { + LazyLoadingQuery query = new GroupMembersQuery(group.getId(), this); + if (query.size() > 0) { + membersTable = new Table(); + membersTable.setWidth(100, UNITS_PERCENTAGE); + membersTable.setHeight(400, UNITS_PIXELS); + + membersTable.setEditable(false); + membersTable.setSelectable(false); + membersTable.setSortDisabled(false); + + LazyLoadingContainer container = new LazyLoadingContainer(query, 10); + membersTable.setContainerDataSource(container); + + membersTable.addContainerProperty("id", Button.class, null); + membersTable.addContainerProperty("firstName", String.class, null); + membersTable.addContainerProperty("lastName", String.class, null); + membersTable.addContainerProperty("email", String.class, null); + membersTable.addContainerProperty("actions", Component.class, null); + + membersLayout.addComponent(membersTable); + } else { + noMembersTable = new Label(i18nManager.getMessage(Messages.GROUP_NO_MEMBERS)); + membersLayout.addComponent(noMembersTable); + } + } + + public void notifyMembershipChanged() { + membersLayout.removeAllComponents(); + initMembersTable(); + } + +} diff --git a/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/identity/GroupListQuery.java b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/identity/GroupListQuery.java new file mode 100644 index 0000000..3c5a630 --- /dev/null +++ b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/identity/GroupListQuery.java @@ -0,0 +1,86 @@ +/* Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.activiti.explorer.ui.management.identity; + +import java.util.ArrayList; +import java.util.List; + +import org.activiti.engine.IdentityService; +import org.activiti.engine.ProcessEngines; +import org.activiti.engine.identity.Group; +import org.activiti.explorer.data.AbstractLazyLoadingQuery; + +import com.vaadin.data.Item; +import com.vaadin.data.util.ObjectProperty; +import com.vaadin.data.util.PropertysetItem; + + +/** + * @author Joram Barrez + */ +public class GroupListQuery extends AbstractLazyLoadingQuery { + + protected IdentityService identityService; + + public GroupListQuery() { + this.identityService = ProcessEngines.getDefaultProcessEngine().getIdentityService(); + } + + public int size() { + return (int) identityService.createGroupQuery().count(); + } + + public List loadItems(int start, int count) { + List groups = identityService.createGroupQuery() + .orderByGroupId().asc() + .orderByGroupName().asc() + .listPage(start, count); + + List groupListItems = new ArrayList(); + for (Group group : groups) { + groupListItems.add(new GroupListItem(group)); + } + return groupListItems; + } + + public Item loadSingleResult(String id) { + return new GroupListItem(identityService.createGroupQuery().groupId(id).singleResult()); + } + + public void setSorting(Object[] propertyIds, boolean[] ascending) { + throw new UnsupportedOperationException(); + } + + class GroupListItem extends PropertysetItem implements Comparable { + + private static final long serialVersionUID = 1L; + + public GroupListItem(Group group) { + addItemProperty("id", new ObjectProperty(group.getId(), String.class)); + if (group.getName() != null) { + addItemProperty("name", new ObjectProperty(group.getName() + + " (" + group.getName() + ")", String.class)); + } else { + addItemProperty("name", new ObjectProperty("(" + group.getId() + ")", String.class)); + } + } + + public int compareTo(GroupListItem other) { + String id = (String) getItemProperty("id").getValue(); + String otherId = (String) other.getItemProperty("id").getValue(); + return id.compareTo(otherId); + } + + } + +} diff --git a/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/identity/GroupMembersQuery.java b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/identity/GroupMembersQuery.java new file mode 100644 index 0000000..e45b607 --- /dev/null +++ b/runtime/src/modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/identity/GroupMembersQuery.java @@ -0,0 +1,138 @@ +/* Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.activiti.explorer.ui.management.identity; + +import java.util.ArrayList; +import java.util.List; + +import org.activiti.engine.IdentityService; +import org.activiti.engine.ProcessEngines; +import org.activiti.engine.identity.User; +import org.activiti.engine.identity.UserQuery; +import org.activiti.explorer.ExplorerApp; +import org.activiti.explorer.data.AbstractLazyLoadingQuery; +import org.activiti.explorer.data.LazyLoadingQuery; +import org.activiti.explorer.ui.Images; +import org.activiti.explorer.ui.mainlayout.ExplorerLayout; + +import com.vaadin.data.Item; +import com.vaadin.data.util.ObjectProperty; +import com.vaadin.data.util.PropertysetItem; +import com.vaadin.ui.Button; +import com.vaadin.ui.Embedded; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.Button.ClickListener; +import com.vaadin.ui.themes.Reindeer; + + +/** + * {@link LazyLoadingQuery} that queries all members of a given group. + * Used in the {@link GroupDetailPanel} to display all group members. + * + * @author Joram Barrez + */ +public class GroupMembersQuery extends AbstractLazyLoadingQuery { + + protected String groupId; + protected MemberShipChangeListener memberShipChangeListener; + protected IdentityService identityService; + protected String sortby; + protected boolean ascending; + + public GroupMembersQuery(String groupId, MemberShipChangeListener memberShipChangeListener) { + this.groupId = groupId; + this.memberShipChangeListener = memberShipChangeListener; + this.identityService = ProcessEngines.getDefaultProcessEngine().getIdentityService(); + } + + public int size() { + return (int) identityService.createUserQuery().memberOfGroup(groupId).count(); + } + + public List loadItems(int start, int count) { + UserQuery query = identityService.createUserQuery().memberOfGroup(groupId); + + if (sortby == null || "id".equals(sortby)) { + query.orderByUserId(); // default + } else if ("firstName".equals(sortby)){ + query.orderByUserFirstName(); + } else if ("lastName".equals(sortby)) { + query.orderByUserLastName(); + } else if ("email".equals(sortby)) { + query.orderByUserEmail(); + } + + if (sortby == null || ascending) { + query.asc(); + } else { + query.desc(); + } + + List users = query.listPage(start, count); + + List items = new ArrayList(); + for (User user : users) { + items.add(new GroupMemberItem(user)); + } + return items; + } + + public Item loadSingleResult(String id) { + throw new UnsupportedOperationException(); + } + + public void setSorting(Object[] propertyIds, boolean[] ascending) { + if (propertyIds.length > 0) { + this.sortby = propertyIds[0].toString(); + this.ascending = ascending[0]; + } + } + + class GroupMemberItem extends PropertysetItem { + + private static final long serialVersionUID = 1L; + + public GroupMemberItem(final User user) { + // id + Button idButton = new Button(user.getId()); + idButton.addStyleName(Reindeer.BUTTON_LINK); + idButton.addListener(new ClickListener() { + public void buttonClick(ClickEvent event) { + ExplorerApp.get().getViewManager().showUserPage(user.getId()); + } + }); + addItemProperty("id", new ObjectProperty