71 changes: 30 additions & 41 deletions distro/camunda-welcome/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@

<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<meta name="author" content="camunda.org community" />

<link rel="shortcut icon" href="assets/img/favicon.ico" />

<!-- loads all stylesheets -->
<link href="assets/css/app.css" rel="stylesheet" />
<link href="assets/css/bootstrap.min.css" rel="stylesheet" />
Expand All @@ -19,89 +20,77 @@
<![endif]-->

<base app-base="." />

</head>
<body ng-controller="DefaultController" >
<div class="wrapper wrapper-dark">

<div style="position:absolute; width:100%; height:480px; background-color:white"> </div>

<div class="clearer"> </div>
<div class="container" >

<div class="center" style="padding-top:100px; position: relative;">
<div class="center center-custom">
<i class="camunda-icon"></i><p> <h1>camunda BPM platform</h1></p>
<div class="alert alert-success">
<strong>Congratulations!</strong> you have successfully installed camunda BPM platform.
</div>
<p>
<strong>Congratulations!</strong> you have successfully installed the camunda BPM platform.<br />
Read our <strong><a href="http://camunda.org/get-started/" target="_blank">Getting Started Tutorials</a></strong>
or jump right into our <strong><a href="/camunda-invoice/" target="_blank">Invoice Example</a></strong>.<br />
You can use the following credentials for all applications:
</p>
<h3>
User: <strong>demo</strong><br />
Password: <strong>demo</strong>
</h3>
</div>

<div style="position:relative; margin-top:40px">

<div class="welcome-container">
<div class="row">
<div class="span4 center">
<a href="/tasklist" target="_blank">
<img src="assets/img/tasklist.png" style="border: 1px solid grey; height:200px !important; width:100%">
<a href="/camunda/app/tasklist" target="_blank">
<img src="assets/img/tasklist.png" class="preview">
</a>
</div>
<div class="span4 center">
<a href="/cockpit" target="_blank">
<img src="assets/img/cockpit.png" style="border: 1px solid grey; height:200px !important; width:100%">
<a href="/camunda/app/cockpit" target="_blank">
<img src="assets/img/cockpit.png" class="preview">
</a>
</div>
<div class="span4 center">
<a href="/cycle" target="_blank">
<img src="assets/img/cycle.png" style="border: 1px solid grey; height:200px !important; width:100%">
</a>
<a href="/cycle" target="_blank">
<img src="assets/img/cycle.png" class="preview">
</a>
</div>

</div>
<div class="row row-white">
<div class="span4 center">
<h2>camunda Tasklist</h2>

<p>
Human Workflow Management.
</p>

<p>
<a href="/tasklist" class="btn" target="_blank">Open Tasklist &gt;&gt;</a>
<a href="/camunda/app/tasklist" class="btn" target="_blank">Open Tasklist &gt;&gt;</a>
</p>

</div>
<div class="span4 center">
<h2>camunda Cockpit</h2>

<h2>camunda Cockpit</h2>
<p>
Operations &amp; Monitoring.
</p>

<p>
<a href="/cockpit" class="btn" target="_blank">Open Cockpit &gt;&gt;</a>
</p>

<a href="/camunda/app/cockpit" class="btn" target="_blank">Open Cockpit &gt;&gt;</a>
</p>
</div>
<div class="span4 center">
<h2>camunda Cycle</h2>

<h2>camunda Cycle</h2>
<p>
Work with any BPMN 2.0 compliant Modeler.
</p>

<p>
<a href="/cylce" class="btn" target="_blank">Open Cycle &gt;&gt;</a>
</p>

<a href="/cycle" class="btn" target="_blank">Open Cycle &gt;&gt;</a>
</p>
</div>
</div>

</div>

</div>
<div class="push-down"><!-- // --></div>
<div class="push-down"> </div>
</div>
<!-- footer -->
<footer class="footer">

</footer>
</body>
</html>
Expand Down
32 changes: 26 additions & 6 deletions distro/gf31/assembly/assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<id>assemble</id>

<formats>
<format>dir</format>
<format>tar.gz</format>
</formats>

<includeBaseDirectory>true</includeBaseDirectory>
<includeBaseDirectory>false</includeBaseDirectory>

<dependencySets>
<dependencySet>
Expand All @@ -20,7 +20,7 @@
<unpackOptions>
<excludes>
<exclude>**/domains/domain1/config/domain.xml</exclude>
<exclude>**/domains/domain1/config/default-web.xml</exclude>
<exclude>**/domains/domain1/config/default-web.xml</exclude>
</excludes>
</unpackOptions>
</dependencySet>
Expand All @@ -33,16 +33,17 @@
<dependencySet>
<outputDirectory>modules</outputDirectory>
<includes>
<include>org.camunda.bpm.glassfish:camunda-glassfish-ear:ear:*</include>
<include>org.camunda.bpm.glassfish:camunda-glassfish-ear:ear:*</include>
<include>org.camunda.bpm.javaee:camunda-jobexecutor-rar:rar:*</include>
</includes>
</dependencySet>
<dependencySet>
<outputDirectory>modules/lib</outputDirectory>
<includes>
<include>org.camunda.bpm:camunda-engine:jar:*</include>
<include>org.camunda.bpm.identity:camunda-identity-ldap:jar:*</include>
<include>org.mybatis:mybatis:jar:*</include>
<include>com.fasterxml.uuid:java-uuid-generator:jar:*</include>
<include>com.fasterxml.uuid:java-uuid-generator:jar:*</include>
<include>joda-time:joda-time:jar:*</include>
</includes>
</dependencySet>
Expand Down Expand Up @@ -78,6 +79,7 @@
<outputDirectory>server/glassfish3/glassfish/lib</outputDirectory>
<includes>
<include>org.camunda.bpm:camunda-engine:jar:*</include>
<include>org.camunda.bpm.identity:camunda-identity-ldap:jar:*</include>
<include>org.mybatis:mybatis:jar:*</include>
<include>com.fasterxml.uuid:java-uuid-generator:jar:*</include>
<include>joda-time:joda-time:jar:*</include>
Expand All @@ -94,6 +96,24 @@
<file>
<source>src/README.txt</source>
<filtered>true</filtered>
<lineEnding>crlf</lineEnding>
<outputDirectory></outputDirectory>
</file>
<file>
<source>src/start-camunda.bat</source>
<filtered>true</filtered>
<outputDirectory></outputDirectory>
</file>
<file>
<source>src/start-camunda.sh</source>
<filtered>true</filtered>
<outputDirectory></outputDirectory>
<fileMode>0755</fileMode>
</file>
<file>
<source>src/LICENSE-2.0.txt</source>
<filtered>true</filtered>
<lineEnding>crlf</lineEnding>
<outputDirectory></outputDirectory>
</file>
<file>
Expand All @@ -105,6 +125,6 @@
<source>src/default-web.xml</source>
<filtered>false</filtered>
<outputDirectory>server/glassfish3/glassfish/domains/domain1/config</outputDirectory>
</file>
</file>
</files>
</assembly>
25 changes: 11 additions & 14 deletions distro/gf31/assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>

<description>
Assembles the fox platform and makes it ready for qa.
Assembles the camunda BPM platform and makes it ready for qa.
The assembly is installed to maven later in the reactor, if the integration tests pass sucessfully
</description>

Expand All @@ -12,7 +12,7 @@
<parent>
<groupId>org.camunda.bpm.glassfish</groupId>
<artifactId>camunda-glassfish</artifactId>
<version>7.0.0-alpha1</version>
<version>7.0.0-Final</version>
</parent>

<name>camunda BPM - Glassfish 3.1.x Assembly</name>
Expand Down Expand Up @@ -100,24 +100,23 @@
<artifactId>camunda-glassfish-service</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.camunda.bpm.javaee</groupId>
<artifactId>camunda-jobexecutor-service</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-engine</artifactId>
<version>${project.version}</version>
</dependency>


<dependency>
<groupId>org.camunda.bpm.identity</groupId>
<artifactId>camunda-identity-ldap</artifactId>
</dependency>

<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
</dependency>

<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
Expand Down Expand Up @@ -183,9 +182,7 @@
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
<!-- do not attach to the build -->
<finalName>assembly-${project.version}</finalName>
<attach>false</attach>
<attach>true</attach>
<appendAssemblyId>false</appendAssemblyId>
<outputDirectory>target/</outputDirectory>
<workDirectory>target/assembly/work</workDirectory>
Expand Down
202 changes: 202 additions & 0 deletions distro/gf31/assembly/src/LICENSE-2.0.txt
Original file line number Diff line number Diff line change
@@ -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.
77 changes: 46 additions & 31 deletions distro/gf31/assembly/src/README.txt
Original file line number Diff line number Diff line change
@@ -1,42 +1,57 @@
This is a distribution of the
This is a distribution of

camunda fox bpm platform enterprise edition (ee)
camunda BPM platform v${project.version}

visit
http://docs.camunda.org/

camunda fox ee, (c) camunda services GmbH

camunda BPM platform is licensed under the Apache License v2.0
http://www.apache.org/licenses/LICENSE-2.0

Packaged glassfish server is licensed under the LGPL license.
The packaged glassfish server is licensed under the LGPL license.

==================

Contents:

client/
This directory contains the client jar which is
needed for deploying process applications to the
fox platform.
client/
This directory contains the client jar which is
needed for deploying process applications to the
camunda BPM platform.

modules/
This directory contains the modules which
make up the camunda BPM platform. You can use these
modules and copy them to a vanilla distribution of
glassfish.

server/
This directory contains a preconfigured distribution
of glassfish 3.1.x with camunda BPM platform readily installed.

modules/
This directory contains the modules which
make up the fox platform. You can use these modules
and copy them to a vanilla distribution of glassfish.

server/
This directory contains a preconfigured distribution
of glassfish 3.1.x with camunda fox ee readily installed.

run the
server/glassfish3/glassfish/bin/startserv.{bat/sh}
script to start up the the server.

The server bundles a distribution of the activiti
task explorer (branded as fox-explorer).
You can access it using the following URL:

http://localhost:8080/explorer

==================

camunda fox ee version: ${project.version}
glassfish server version: ${version.glassfish}
run the
server/glassfish3/glassfish/bin/startserv.{bat/sh}
script to start up the the server.

After starting the server, you can access the
following web applications:

http://localhost:8080/camunda
http://localhost:8080/engine-rest
http://localhost:8080/cycle

sql/
This directory contains the create and upgrade sql script
for the different databases.
The engine create script contain the engine and history tables.

Execute the current upgrade script to make the database compatible
with the newest camunda BPM platform release.

==================

camunda BPM platform version: ${project.version}
Glassfish Application Server version: ${version.glassfish}

=================
30 changes: 13 additions & 17 deletions distro/gf31/assembly/src/domain.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,20 @@
<engine sniffer="connector"></engine>
</module>
</application>
<application location="${com.sun.aas.instanceRootURI}/applications/camunda-camunda/" name="camunda-camunda" object-type="user">
<application location="${com.sun.aas.instanceRootURI}/applications/camunda-bpm-platform/" name="camunda-bpm-platform" object-type="user">
<property name="isComposite" value="true"></property>
<engine sniffer="ear"></engine>
<module name="camunda-glassfish-service-#{project.version}.jar">
<engine sniffer="ejb"></engine>
<engine sniffer="security"></engine>
</module>
<module name="camunda-jobexecutor-service-#{project.version}.jar">
<engine sniffer="ejb"></engine>
<engine sniffer="security"></engine>
</module>
</module>
</application>
</applications>
<resources>
<jdbc-resource pool-name="__TimerPool" jndi-name="jdbc/__TimerPool" object-type="system-admin"></jdbc-resource>
<jdbc-resource pool-name="DerbyPool" jndi-name="jdbc/__default"></jdbc-resource>
<jdbc-resource pool-name="FoxEnginePool" jndi-name="jdbc/FoxEngine" enabled="true"></jdbc-resource>
<jdbc-resource pool-name="FoxCyclePool" jndi-name="jdbc/CycleDS" enabled="true"></jdbc-resource>
<jdbc-resource pool-name="ProcessEnginePool" jndi-name="jdbc/ProcessEngine" enabled="true"></jdbc-resource>
<jdbc-resource pool-name="CamundaCyclePool" jndi-name="jdbc/CycleDS" enabled="true"></jdbc-resource>

<jdbc-connection-pool datasource-classname="org.apache.derby.jdbc.EmbeddedXADataSource" res-type="javax.sql.XADataSource" name="__TimerPool">
<property name="databaseName" value="${com.sun.aas.instanceRoot}/lib/databases/ejbtimer"></property>
Expand All @@ -48,17 +44,17 @@
is-isolation-level-guaranteed="false"
datasource-classname="org.h2.jdbcx.JdbcDataSource"
res-type="javax.sql.DataSource" non-transactional-connections="true"
name="FoxEnginePool">
<property name="Url" value="jdbc:h2:./fox-h2-dbs/camunda-engine;DB_CLOSE_DELAY=-1;MVCC=TRUE;DB_CLOSE_ON_EXIT=FALSE"></property>
name="ProcessEnginePool">
<property name="Url" value="jdbc:h2:./camunda-h2-dbs/process-engine;DB_CLOSE_DELAY=-1;MVCC=TRUE;DB_CLOSE_ON_EXIT=FALSE"></property>
<property name="User" value="sa"></property>
<property name="Password" value="sa"></property>
</jdbc-connection-pool>
<jdbc-connection-pool
is-isolation-level-guaranteed="false"
datasource-classname="org.h2.jdbcx.JdbcDataSource"
res-type="javax.sql.DataSource" non-transactional-connections="true"
name="FoxCyclePool">
<property name="Url" value="jdbc:h2:./fox-h2-dbs/fox-cycle;DB_CLOSE_DELAY=-1;MVCC=TRUE;DB_CLOSE_ON_EXIT=FALSE"></property>
name="CamundaCyclePool">
<property name="Url" value="jdbc:h2:./camunda-h2-dbs/camunda-cycle;DB_CLOSE_DELAY=-1;MVCC=TRUE;DB_CLOSE_ON_EXIT=FALSE"></property>
<property name="User" value="sa"></property>
<property name="Password" value="sa"></property>
</jdbc-connection-pool>
Expand All @@ -71,23 +67,23 @@
enabled="true"
name="platformJobExecutorPool"
resource-adapter-name="camunda-jobexecutor-rar"
connection-definition-name="org.camunda.bpm.platform.jobexecutor.impl.ra.outbound.PlatformJobExecutorConnectionFactory"
connection-definition-name="org.camunda.bpm.container.impl.threading.jca.outbound.JcaExecutorServiceConnectionFactory"
transaction-support="NoTransaction" />
<connector-resource
enabled="true"
pool-name="platformJobExecutorPool"
jndi-name="eis/PlatformJobExecutorConnectionFactory" />
jndi-name="eis/JcaExecutorServiceConnectionFactory" />
</resources>
<servers>
<server name="server" config-ref="server-config">
<application-ref ref="__admingui" virtual-servers="__asadmin"></application-ref>
<application-ref ref="camunda-jobexecutor-rar" virtual-servers="server"></application-ref>
<application-ref ref="camunda-camunda" virtual-servers="server"></application-ref>
<application-ref ref="camunda-bpm-platform" virtual-servers="server"></application-ref>
<resource-ref ref="jdbc/__TimerPool"></resource-ref>
<resource-ref ref="jdbc/__default"></resource-ref>
<resource-ref ref="jdbc/FoxEngine"></resource-ref>
<resource-ref ref="jdbc/ProcessEngine"></resource-ref>
<resource-ref ref="jdbc/CycleDS"></resource-ref>
<resource-ref ref="eis/PlatformJobExecutorConnectionFactory"></resource-ref>
<resource-ref ref="eis/JcaExecutorServiceConnectionFactory"></resource-ref>
</server>
</servers>
<nodes>
Expand Down
10 changes: 10 additions & 0 deletions distro/gf31/assembly/src/start-camunda.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@echo off

echo "starting camunda BPM ${project.version} on Glassfish Application Server ${version.glassfish}"

cd server\glassfish3\glassfish\bin\
start startserv.bat

ping -n 15 localhost > NULL
start http://localhost:8080/camunda-welcome/index.html

18 changes: 18 additions & 0 deletions distro/gf31/assembly/src/start-camunda.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#! /bin/sh
echo "starting camunda BPM platform on Glassfish Application Server ${version.glassfish}";

if [ "`which firefox`" = "/usr/bin/firefox" ]; then
BROWSER="/usr/bin/firefox";
elif [ "`which chromium-browser`" = "/usr/bin/chromium-browser" ]; then
BROWSER="/usr/bin/chromium-browser";
else
BROWSER="empty";
fi

if [ "$BROWSER" = "empty" ]; then
( sleep 25; echo "We are sorry... We tried all we could do but we couldn't locate your default browser... \nIf you want to see our default website please open your browser and insert this URL:\nhttp://localhost:8080/camunda-welcome/index.html";) &
else
(sleep 5; $BROWSER "http://localhost:8080/camunda-welcome/index.html";) &
fi

/bin/sh ./server/glassfish3/glassfish/bin/startserv
81 changes: 50 additions & 31 deletions distro/gf31/distro/assembly.xml
Original file line number Diff line number Diff line change
@@ -1,37 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<assembly xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:maven:assembly:1.1.2">

<id>distro</id>

<formats>
<format>zip</format>
<format>tar.gz</format>
</formats>

<includeBaseDirectory>false</includeBaseDirectory>

<fileSets>
<fileSet>
<directory>../assembly/target/assembly-${project.version}/assembly-${project.version}</directory>
<outputDirectory />
<excludes>
<exclude>**/*.sh</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>../assembly/target/assembly-${project.version}/assembly-${project.version}</directory>
<outputDirectory />
<dependencySets>

<dependencySet>
<unpack>true</unpack>
<includes>
<include>**/*.sh</include>
<include>org.camunda.bpm.glassfish:camunda-glassfish-assembly</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
</fileSets>

<dependencySets>

<outputDirectory />
</dependencySet>

<dependencySet>
<outputDirectory />
<unpack>true</unpack>
<unpackOptions>
<includes>
Expand All @@ -42,7 +33,7 @@
<include>org.camunda.bpm.distro:camunda-sql-scripts:jar:*</include>
</includes>
</dependencySet>

<dependencySet>
<outputDirectory />
<unpack>true</unpack>
Expand All @@ -52,23 +43,51 @@
</includes>
</unpackOptions>
<includes>
<include>org.camunda.bpm.cycle:camunda-cycle-sql-scripts:jar:*</include>
<include>org.camunda.bpm.cycle:camunda-cycle-sql-scripts:jar:*</include>
</includes>
</dependencySet>


<dependencySet>
<includes>
<include>org.camunda.bpm.tasklist:camunda-tasklist:war:*</include>
</includes>
<outputDirectory>server/glassfish3/glassfish/domains/domain1/autodeploy</outputDirectory>
</dependencySet>

<dependencySet>
<includes>
<include>org.camunda.bpm.cycle:camunda-cycle-glassfish:war:*</include>
</includes>
<outputDirectory>server/glassfish3/glassfish/domains/domain1/autodeploy</outputDirectory>
</dependencySet>
</dependencySet>

<dependencySet>
<includes>
<include>org.camunda.bpm:camunda-engine-rest:war:*</include>
</includes>
<outputDirectory>server/glassfish3/glassfish/domains/domain1/autodeploy</outputDirectory>
</dependencySet>

<dependencySet>
<includes>
<include>org.camunda.bpm.webapp:camunda-webapp-glassfish:war:*</include>
</includes>
<outputDirectory>server/glassfish3/glassfish/domains/domain1/autodeploy</outputDirectory>
</dependencySet>

<dependencySet>
<includes>
<include>org.camunda.bpm.example:camunda-example-invoice:war:*</include>
</includes>
<outputDirectory>server/glassfish3/glassfish/domains/domain1/autodeploy</outputDirectory>
</dependencySet>

<dependencySet>
<includes>
<include>org.camunda.bpm.example:camunda-example-wait-states:war:*</include>
</includes>
<outputDirectory>server/glassfish3/glassfish/domains/domain1/autodeploy</outputDirectory>
</dependencySet>
</dependencySets>

<fileSets>
<fileSet>
<directory>../../camunda-welcome</directory>
<outputDirectory>server/glassfish3/glassfish/domains/domain1/autodeploy/camunda-welcome.war</outputDirectory>
</fileSet>
</fileSets>

</assembly>
55 changes: 39 additions & 16 deletions distro/gf31/distro/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,18 @@
<parent>
<groupId>org.camunda.bpm.glassfish</groupId>
<artifactId>camunda-glassfish</artifactId>
<version>7.0.0-alpha1</version>
<version>7.0.0-Final</version>
</parent>

<name>camunda BPM - Glassfish 3.1.x Distro</name>

<dependencies>

<dependency>
<!-- this dependency is to make sure that we are executed after the
integration tests have passed in the reactor -->
<groupId>org.camunda.bpm.qa</groupId>
<artifactId>camunda-qa</artifactId>
<groupId>org.camunda.bpm.glassfish</groupId>
<artifactId>camunda-glassfish-assembly</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>provided</scope>
<type>tar.gz</type>
</dependency>

<dependency>
Expand All @@ -29,15 +27,8 @@
<version>${project.version}</version>
<type>jar</type>
</dependency>

<dependency>
<groupId>org.camunda.bpm.tasklist</groupId>
<artifactId>camunda-tasklist</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>

<!-- cycle -->
<!-- cycle -->
<dependency>
<groupId>org.camunda.bpm.cycle</groupId>
<artifactId>camunda-cycle-glassfish</artifactId>
Expand All @@ -50,7 +41,39 @@
<artifactId>camunda-cycle-sql-scripts</artifactId>
<version>${project.version}</version>
</dependency>

<!-- rest -->

<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-engine-rest</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>

<!-- camunda webapp -->

<dependency>
<groupId>org.camunda.bpm.webapp</groupId>
<artifactId>camunda-webapp-glassfish</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>

<!-- sample applications -->
<dependency>
<groupId>org.camunda.bpm.example</groupId>
<artifactId>camunda-example-invoice</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>

<dependency>
<groupId>org.camunda.bpm.example</groupId>
<artifactId>camunda-example-wait-states</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
</dependencies>

<build>
Expand All @@ -69,7 +92,7 @@
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
<finalName>camunda-ee-glassfish-${project.version}</finalName>
<finalName>camunda-bpm-glassfish-${project.version}</finalName>
<attach>true</attach>
<appendAssemblyId>false</appendAssemblyId>
<outputDirectory>target/</outputDirectory>
Expand Down
12 changes: 3 additions & 9 deletions distro/gf31/ear/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.camunda.bpm.glassfish</groupId>
<artifactId>camunda-glassfish</artifactId>
<version>7.0.0-alpha1</version>
<version>7.0.0-Final</version>
</parent>

<build>
Expand All @@ -18,7 +18,7 @@
<configuration>
<version>6</version>
<defaultLibBundleDir>lib</defaultLibBundleDir>
<applicationName>camunda-camunda</applicationName>
<applicationName>camunda-bpm-platform</applicationName>
</configuration>
</plugin>
</plugins>
Expand All @@ -30,13 +30,7 @@
<artifactId>camunda-glassfish-service</artifactId>
<version>${project.version}</version>
<type>ejb</type>
</dependency>
<dependency>
<groupId>org.camunda.bpm.javaee</groupId>
<artifactId>camunda-jobexecutor-service</artifactId>
<version>${project.version}</version>
<type>ejb</type>
</dependency>
</dependency>

<!-- exclude engine from ear -->
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions distro/gf31/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-root</artifactId>
<relativePath>../..</relativePath>
<version>7.0.0-alpha1</version>
<version>7.0.0-Final</version>
</parent>

<artifactId>camunda-glassfish</artifactId>
<version>7.0.0-alpha1</version>
<version>7.0.0-Final</version>
<packaging>pom</packaging>

<name>camunda BPM - Glassfish 3.1.x</name>
Expand Down
2 changes: 1 addition & 1 deletion distro/gf31/service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.camunda.bpm.glassfish</groupId>
<artifactId>camunda-glassfish</artifactId>
<version>7.0.0-alpha1</version>
<version>7.0.0-Final</version>
</parent>

<dependencies>
Expand Down
79 changes: 79 additions & 0 deletions distro/gf31/service/src/main/resources/META-INF/bpm-platform.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<bpm-platform xmlns="http://www.camunda.org/schema/1.0/BpmPlatform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.camunda.org/schema/1.0/BpmPlatform http://www.camunda.org/schema/1.0/BpmPlatform ">

<job-executor>
<job-acquisition name="default" />
</job-executor>

<process-engine name="default">
<job-acquisition>default</job-acquisition>
<configuration>org.camunda.bpm.engine.impl.cfg.JtaProcessEngineConfiguration</configuration>
<datasource>jdbc/ProcessEngine</datasource>

<properties>
<property name="history">full</property>
<property name="databaseSchemaUpdate">true</property>
<property name="transactionManagerJndiName">java:appserver/TransactionManager</property>
<property name="authorizationEnabled">true</property>
<property name="jobExecutorDeploymentAware">true</property>
</properties>

<plugins>
<!-- plugin enabling Process Application event listener support -->
<plugin>
<class>org.camunda.bpm.application.impl.event.ProcessApplicationEventListenerPlugin</class>
</plugin>

<!-- LDAP CONFIGURATION -->
<!-- Uncomment this section in order to enable LDAP support for this process engine -->
<!-- Adjust configuration, see ( http://docs.camunda.com/guides/user-guide/#!/#bpmplatform/engine/identity/ldap ) -->
<!--
<plugin>
<class>org.camunda.bpm.identity.impl.ldap.plugin.LdapIdentityProviderPlugin</class>
<properties>
<property name="serverUrl">ldaps://localhost:4334/</property>
<property name="acceptUntrustedCertificates">false</property>
<property name="managerDn">uid=jonny,ou=office-berlin,o=camunda,c=org</property>
<property name="managerPassword">s3cr3t</property>
<property name="baseDn">o=camunda,c=org</property>
<property name="userSearchBase"></property>
<property name="userSearchFilter">(objectclass=person)</property>
<property name="userIdAttribute">uid</property>
<property name="userFirstnameAttribute">cn</property>
<property name="userLastnameAttribute">sn</property>
<property name="userEmailAttribute">mail</property>
<property name="userPasswordAttribute">userpassword</property>
<property name="groupSearchBase"></property>
<property name="groupSearchFilter">(objectclass=groupOfNames)</property>
<property name="groupIdAttribute">cn</property>
<property name="groupNameAttribute">cn</property>
<property name="groupMemberAttribute">member</property>
</properties>
</plugin>
-->

<!-- LDAP CONFIGURATION -->
<!-- The following plugin allows you to grant administrator authorizations to an existing LDAP user -->
<!--
<plugin>
<class>org.camunda.bpm.engine.impl.plugin.AdministratorAuthorizationPlugin</class>
<properties>
<property name="administratorUserName">admin</property>
</properties>
</plugin>
-->

</plugins>

</process-engine>

</bpm-platform>
24 changes: 12 additions & 12 deletions .../resources/META-INF/glassfish-ejb-jar.xml → .../resources/META-INF/glassfish-ejb-jar.xml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!-- <!DOCTYPE glassfish-ejb-jar PUBLIC "-//GlassFish.org//
DTD GlassFish Application Server 3.1 EJB 3.1//EN"
"http://glassfish.org/dtds/glassfish-ejb-jar_3_1-1.dtd"> -->
<glassfish-ejb-jar>
<enterprise-beans>
<ejb>
<ejb-name>JobExecutionHandlerMDB</ejb-name>
<mdb-resource-adapter>
<resource-adapter-mid>camunda-jobexecutor-rar</resource-adapter-mid>
</mdb-resource-adapter>
</ejb>
</enterprise-beans>
<!-- <!DOCTYPE glassfish-ejb-jar PUBLIC "-//GlassFish.org//
DTD GlassFish Application Server 3.1 EJB 3.1//EN"
"http://glassfish.org/dtds/glassfish-ejb-jar_3_1-1.dtd"> -->
<glassfish-ejb-jar>
<enterprise-beans>
<ejb>
<ejb-name>JobExecutionHandlerMDB</ejb-name>
<mdb-resource-adapter>
<resource-adapter-mid>camunda-jobexecutor-rar</resource-adapter-mid>
</mdb-resource-adapter>
</ejb>
</enterprise-beans>
</glassfish-ejb-jar>

This file was deleted.

This file was deleted.

15 changes: 9 additions & 6 deletions distro/jbossas71/assembly/assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<id>assemble</id>

<formats>
<format>dir</format>
<format>tar.gz</format>
</formats>

<includeBaseDirectory>true</includeBaseDirectory>
<includeBaseDirectory>false</includeBaseDirectory>

<dependencySets>
<dependencySet>
Expand All @@ -20,7 +20,7 @@
<unpackOptions>
<excludes>
<exclude>**/standalone/configuration/standalone.xml</exclude>
<exclude>**/standalone/configuration/standalone-full.xml</exclude>
<exclude>**/standalone/configuration/standalone-full.xml</exclude>
<exclude>**/bin/standalone.conf</exclude>
<exclude>**/bin/standalone.conf.bat</exclude>
</excludes>
Expand All @@ -30,7 +30,8 @@
<outputDirectory>lib</outputDirectory>
<includes>
<include>org.camunda.bpm.javaee:camunda-ejb-client:jar:${project.version}</include>
<include>org.camunda.bpm:*</include>
<include>org.camunda.bpm:*</include>
<include>org.camunda.bpm.identity:*</include>
<include>org.mybatis:mybatis:jar:*</include>
<include>com.fasterxml.uuid:java-uuid-generator:jar:*</include>
<include>joda-time:joda-time:jar:*</include>
Expand All @@ -51,22 +52,24 @@
<file>
<source>src/README.txt</source>
<filtered>true</filtered>
<lineEnding>crlf</lineEnding>
<outputDirectory></outputDirectory>
</file>
<file>
<source>src/start-camunda.bat</source>
<filtered>true</filtered>
<outputDirectory></outputDirectory>
</file>
<!-- <file>
<file>
<source>src/start-camunda.sh</source>
<filtered>true</filtered>
<outputDirectory></outputDirectory>
<fileMode>0755</fileMode>
</file> -->
</file>
<file>
<source>src/LICENSE-2.0.txt</source>
<filtered>true</filtered>
<lineEnding>crlf</lineEnding>
<outputDirectory></outputDirectory>
</file>
<file>
Expand Down
15 changes: 9 additions & 6 deletions distro/jbossas71/assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>

<description>
Assembles the fox platform and makes it ready for qa.
Assembles the camunda BPM platform and makes it ready for qa.
The assembly is installed to maven later in the reactor, if the integration tests pass successfully
</description>

Expand All @@ -12,7 +12,7 @@
<parent>
<groupId>org.camunda.bpm.jboss</groupId>
<artifactId>camunda-jboss</artifactId>
<version>7.0.0-alpha1</version>
<version>7.0.0-Final</version>
</parent>

<name>camunda BPM - jBoss7 Assembly</name>
Expand Down Expand Up @@ -40,7 +40,12 @@
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-engine</artifactId>
</dependency>


<dependency>
<groupId>org.camunda.bpm.identity</groupId>
<artifactId>camunda-identity-ldap</artifactId>
</dependency>

<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-engine-cdi</artifactId>
Expand Down Expand Up @@ -90,9 +95,7 @@
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
<!-- do not attach to the build -->
<finalName>assembly-${project.version}</finalName>
<attach>false</attach>
<attach>true</attach>
<appendAssemblyId>false</appendAssemblyId>
<outputDirectory>target/</outputDirectory>
<workDirectory>target/assembly/work</workDirectory>
Expand Down
47 changes: 23 additions & 24 deletions distro/jbossas71/assembly/src/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ This is a distribution of
camunda BPM platform v${project.version}

visit
http://www.camunda.org/implement.html
http://docs.camunda.org/


camunda BPM platform is licensed under the Apache License v2.0
Expand All @@ -16,32 +16,31 @@ the LGPL license.

Contents:

lib/
lib/
This directory contains the java libraries for application
development.
modules/
modules/
This directory contains additional modules for JBoss Application
erver 7. You can use these modules to patch a vanilla distribution
of JBoss Application Server.

server/
This directory contains a preconfigured distribution
of JBoss Application Server 7 with camunda BPM platform readily
installed.

run the
server/jboss-as-${version.jboss.as}/bin/standalone.{bat/sh}
script to start up the the server.

After starting the server, you can access the
following web applications:

http://localhost:8080/tasklist
http://localhost:8080/cockpit
http://localhost:8080/engine-rest
http://localhost:8080/cycle


server/
This directory contains a preconfigured distribution
of JBoss Application Server 7 with camunda BPM platform readily
installed.

run the
server/jboss-as-${version.jboss.as}/bin/standalone.{bat/sh}
script to start up the the server.

After starting the server, you can access the
following web applications:

http://localhost:8080/camunda
http://localhost:8080/engine-rest
http://localhost:8080/cycle

sql/
This directory contains the create and upgrade sql script
for the different databases.
Expand All @@ -50,8 +49,8 @@ Contents:
Execute the current upgrade script to make the database compatible
with the newest camunda BPM platform release.

==================
==================
camunda BPM platform version: ${project.version}
JBoss Application Server version: ${version.jboss.as}

Expand Down
61 changes: 58 additions & 3 deletions distro/jbossas71/assembly/src/jboss71/standalone-full.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@
<password>sa</password>
</security>
</datasource>
<datasource jta="true" jndi-name="java:jboss/datasources/FoxEngineDS" pool-name="FoxEngineDS" enabled="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:h2:./camunda-h2-dbs/camunda-engine;DB_CLOSE_DELAY=-1;MVCC=TRUE;DB_CLOSE_ON_EXIT=FALSE</connection-url>
<datasource jta="true" jndi-name="java:jboss/datasources/ProcessEngine" pool-name="ProcessEngine" enabled="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:h2:./camunda-h2-dbs/process-engine;DB_CLOSE_DELAY=-1;MVCC=TRUE;DB_CLOSE_ON_EXIT=FALSE</connection-url>
<driver>h2</driver>
<security>
<user-name>sa</user-name>
Expand Down Expand Up @@ -395,12 +395,67 @@
<subsystem xmlns="urn:org.camunda.bpm.jboss:1.1">
<process-engines>
<process-engine name="default" default="true">
<datasource>java:jboss/datasources/FoxEngineDS</datasource>
<datasource>java:jboss/datasources/ProcessEngine</datasource>
<history-level>full</history-level>
<properties>
<property name="jobExecutorAcquisitionName">default</property>
<property name="isAutoSchemaUpdate">true</property>
<property name="authorizationEnabled">true</property>
<property name="jobExecutorDeploymentAware">true</property>
</properties>
<plugins>

<!-- plugin enabling Process Application event listener support -->
<plugin>
<class>org.camunda.bpm.application.impl.event.ProcessApplicationEventListenerPlugin</class>
</plugin>

<!-- LDAP CONFIGURATION -->
<!-- Uncomment this section in order to enable LDAP support for this process engine -->
<!-- Adjust configuration, see ( http://docs.camunda.com/guides/user-guide/#!/#bpmplatform/engine/identity/ldap ) -->
<!--
<plugin>
<class>org.camunda.bpm.identity.impl.ldap.plugin.LdapIdentityProviderPlugin</class>
<properties>
<property name="serverUrl">ldaps://localhost:4334/</property>
<property name="acceptUntrustedCertificates">false</property>
<property name="managerDn">uid=jonny,ou=office-berlin,o=camunda,c=org</property>
<property name="managerPassword">s3cr3t</property>
<property name="baseDn">o=camunda,c=org</property>
<property name="userSearchBase">ou=employees</property>
<property name="userSearchFilter">(objectclass=person)</property>
<property name="userIdAttribute">uid</property>
<property name="userFirstnameAttribute">cn</property>
<property name="userLastnameAttribute">sn</property>
<property name="userEmailAttribute">mail</property>
<property name="userPasswordAttribute">userpassword</property>
<property name="groupSearchBase">ou=roles</property>
<property name="groupSearchFilter">(objectclass=groupOfNames)</property>
<property name="groupIdAttribute">cn</property>
<property name="groupNameAttribute">cn</property>
<property name="groupMemberAttribute">member</property>
</properties>
</plugin>
-->

<!-- LDAP CONFIGURATION -->
<!-- The following plugin allows you to grant administrator authorizations to an existing LDAP user -->
<!--
<plugin>
<class>org.camunda.bpm.engine.impl.plugin.AdministratorAuthorizationPlugin</class>
<properties>
<property name="administratorUserName">admin</property>
</properties>
</plugin>
-->
</plugins>
</process-engine>
</process-engines>
<job-executor>
Expand Down
61 changes: 58 additions & 3 deletions distro/jbossas71/assembly/src/jboss71/standalone.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@
<password>sa</password>
</security>
</datasource>
<datasource jta="true" jndi-name="java:jboss/datasources/FoxEngineDS" pool-name="FoxEngineDS" enabled="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:h2:./camunda-h2-dbs/camunda-engine;DB_CLOSE_DELAY=-1;MVCC=TRUE;DB_CLOSE_ON_EXIT=FALSE</connection-url>
<datasource jta="true" jndi-name="java:jboss/datasources/ProcessEngine" pool-name="ProcessEngine" enabled="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:h2:./camunda-h2-dbs/process-engine;DB_CLOSE_DELAY=-1;MVCC=TRUE;DB_CLOSE_ON_EXIT=FALSE</connection-url>
<driver>h2</driver>
<security>
<user-name>sa</user-name>
Expand Down Expand Up @@ -307,12 +307,67 @@
<subsystem xmlns="urn:org.camunda.bpm.jboss:1.1">
<process-engines>
<process-engine name="default" default="true">
<datasource>java:jboss/datasources/FoxEngineDS</datasource>
<datasource>java:jboss/datasources/ProcessEngine</datasource>
<history-level>full</history-level>
<properties>
<property name="jobExecutorAcquisitionName">default</property>
<property name="isAutoSchemaUpdate">true</property>
<property name="authorizationEnabled">true</property>
<property name="jobExecutorDeploymentAware">true</property>
</properties>
<plugins>

<!-- plugin enabling Process Application event listener support -->
<plugin>
<class>org.camunda.bpm.application.impl.event.ProcessApplicationEventListenerPlugin</class>
</plugin>

<!-- LDAP CONFIGURATION -->
<!-- Uncomment this section in order to enable LDAP support for this process engine -->
<!-- Adjust configuration, see ( http://docs.camunda.com/guides/user-guide/#!/#bpmplatform/engine/identity/ldap ) -->
<!--
<plugin>
<class>org.camunda.bpm.identity.impl.ldap.plugin.LdapIdentityProviderPlugin</class>
<properties>
<property name="serverUrl">ldaps://localhost:4334/</property>
<property name="acceptUntrustedCertificates">false</property>
<property name="managerDn">uid=jonny,ou=office-berlin,o=camunda,c=org</property>
<property name="managerPassword">s3cr3t</property>
<property name="baseDn">o=camunda,c=org</property>
<property name="userSearchBase">ou=employees</property>
<property name="userSearchFilter">(objectclass=person)</property>
<property name="userIdAttribute">uid</property>
<property name="userFirstnameAttribute">cn</property>
<property name="userLastnameAttribute">sn</property>
<property name="userEmailAttribute">mail</property>
<property name="userPasswordAttribute">userpassword</property>
<property name="groupSearchBase">ou=roles</property>
<property name="groupSearchFilter">(objectclass=groupOfNames)</property>
<property name="groupIdAttribute">cn</property>
<property name="groupNameAttribute">cn</property>
<property name="groupMemberAttribute">member</property>
</properties>
</plugin>
-->

<!-- LDAP CONFIGURATION -->
<!-- The following plugin allows you to grant administrator authorizations to an existing LDAP user -->
<!--
<plugin>
<class>org.camunda.bpm.engine.impl.plugin.AdministratorAuthorizationPlugin</class>
<properties>
<property name="administratorUserName">admin</property>
</properties>
</plugin>
-->
</plugins>
</process-engine>
</process-engines>
<job-executor>
Expand Down
21 changes: 9 additions & 12 deletions distro/jbossas71/assembly/src/start-camunda.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
#! /bin/sh
echo "starting camunda BPM platform ${project.version} on JBoss Application Server ${version.jboss.as}"
echo "starting camunda BPM ${project.version} on JBoss Application Server ${version.jboss.as}";

if [ `which firefox` = "/usr/bin/firefox" ]; then
if [ "`which firefox`" = "/usr/bin/firefox" ]; then
BROWSER="/usr/bin/firefox";
elif [ `which chromium-browser` = "/usr/bin/chromium-browser" ]; then
elif [ "`which chromium-browser`" = "/usr/bin/chromium-browser" ]; then
BROWSER="/usr/bin/chromium-browser";
else
BROWSER="empty";
fi

./server/jboss-as-${version.jboss.as}/bin/standalone.sh &
sleep 5

if [ $BROWSER = "empty" ]; then
echo "We are sorry... We tried all we could do but we couldn't locate your default browser...";
echo "If you want to see our default website please open your browser and insert this URL:";
echo "http://localhost:8080/";
if [ "$BROWSER" = "empty" ]; then
( sleep 15; echo "We are sorry... We tried all we could do but we couldn't locate your default browser... \nIf you want to see our default website please open your browser and insert this URL:\nhttp://localhost:8080/camunda-welcome/index.html";) &
else
$BROWSER "http://localhost:8080/camunda-welcome/index.html";
fi
(sleep 15; $BROWSER "http://localhost:8080/camunda-welcome/index.html";) &
fi

/bin/sh ./server/jboss-as-${version.jboss.as}/bin/standalone.sh
92 changes: 25 additions & 67 deletions distro/jbossas71/distro/assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,66 +11,15 @@

<includeBaseDirectory>false</includeBaseDirectory>

<fileSets>
<fileSet>
<directory>../assembly/target/assembly-${project.version}/assembly-${project.version}</directory>
<outputDirectory />
<excludes>
<exclude>**/*.sh</exclude>
<exclude>**/jboss-*/domain/tmp/auth</exclude>
<exclude>**/jboss-*/standalone/tmp/auth</exclude>
<exclude>**/*-users.properties</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>../assembly/target/assembly-${project.version}/assembly-${project.version}</directory>
<outputDirectory />
<includes>
<include>**/jboss-*/**/*.sh</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>../assembly/target/assembly-${project.version}/assembly-${project.version}</directory>
<outputDirectory />
<includes>
<include>**/*-users.properties</include>
</includes>
<fileMode>0600</fileMode>
</fileSet>
<fileSet>
<directory>../assembly/target/assembly-${project.version}/assembly-${project.version}</directory>
<outputDirectory />
<dependencySets>

<dependencySet>
<unpack>true</unpack>
<includes>
<include>**/jboss-*/domain/tmp/auth</include>
<include>**/jboss-*/standalone/tmp/auth</include>
<include>org.camunda.bpm.jboss:camunda-jboss-assembly</include>
</includes>
<directoryMode>0700</directoryMode>
</fileSet>
<fileSet>
<directory>../assembly/target/assembly-${project.version}/assembly-${project.version}</directory>
<outputDirectory />
<includes>
<include>**/jboss-*/domain/tmp/auth</include>
<include>**/jboss-*/standalone/tmp/auth</include>
</includes>
<directoryMode>0700</directoryMode>
</fileSet>
<fileSet>
<directory>../../camunda-welcome</directory>
<outputDirectory>server/jboss-as-${version.jboss.as}/standalone/deployments/camunda-welcome.war</outputDirectory>
</fileSet>
</fileSets>

<files>
<file>
<source>src/EMPTY_FILE</source>
<outputDirectory>server/jboss-as-${version.jboss.as}/standalone/deployments/</outputDirectory>
<destName>camunda-welcome.war.dodeploy</destName>
</file>
</files>

<dependencySets>
</dependencySet>

<dependencySet>
<outputDirectory />
Expand Down Expand Up @@ -104,13 +53,6 @@
</includes>
<outputDirectory>server/jboss-as-${version.jboss.as}/standalone/deployments</outputDirectory>
</dependencySet>

<dependencySet>
<includes>
<include>org.camunda.bpm.tasklist:camunda-tasklist:war:*</include>
</includes>
<outputDirectory>server/jboss-as-${version.jboss.as}/standalone/deployments</outputDirectory>
</dependencySet>

<dependencySet>
<includes>
Expand All @@ -128,24 +70,40 @@

<dependencySet>
<includes>
<include>org.camunda.bpm.cockpit:camunda-cockpit:war:*</include>
<include>org.camunda.bpm.webapp:camunda-webapp-jboss:war:*</include>
</includes>
<outputDirectory>server/jboss-as-${version.jboss.as}/standalone/deployments</outputDirectory>
</dependencySet>

<dependencySet>
<includes>
<include>org.camunda.bpm.tasklist:camunda-tasklist:war:*</include>
<include>org.camunda.bpm.example:camunda-example-invoice:war:*</include>
</includes>
<outputDirectory>server/jboss-as-${version.jboss.as}/standalone/deployments</outputDirectory>
</dependencySet>

<dependencySet>
<includes>
<include>org.camunda.bpm.example:camunda-example-invoice:war:*</include>
<include>org.camunda.bpm.example:camunda-example-wait-states:war:*</include>
</includes>
<outputDirectory>server/jboss-as-${version.jboss.as}/standalone/deployments</outputDirectory>
</dependencySet>

</dependencySets>

<fileSets>
<fileSet>
<directory>../../camunda-welcome</directory>
<outputDirectory>server/jboss-as-${version.jboss.as}/standalone/deployments/camunda-welcome.war</outputDirectory>
</fileSet>
</fileSets>

<files>
<file>
<source>src/EMPTY_FILE</source>
<outputDirectory>server/jboss-as-${version.jboss.as}/standalone/deployments/</outputDirectory>
<destName>camunda-welcome.war.dodeploy</destName>
</file>
</files>

</assembly>
25 changes: 16 additions & 9 deletions distro/jbossas71/distro/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.camunda.bpm.jboss</groupId>
<artifactId>camunda-jboss</artifactId>
<version>7.0.0-alpha1</version>
<version>7.0.0-Final</version>
</parent>

<name>camunda BPM - jBoss7 Distro</name>
Expand All @@ -22,6 +22,13 @@
<type>pom</type>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.camunda.bpm.jboss</groupId>
<artifactId>camunda-jboss-assembly</artifactId>
<version>${project.version}</version>
<type>tar.gz</type>
</dependency>

<dependency>
<groupId>org.camunda.bpm.distro</groupId>
Expand Down Expand Up @@ -51,32 +58,32 @@
</dependency>

<dependency>
<groupId>org.camunda.bpm.tasklist</groupId>
<artifactId>camunda-tasklist</artifactId>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-engine-rest</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>

<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-engine-rest</artifactId>
<groupId>org.camunda.bpm.webapp</groupId>
<artifactId>camunda-webapp-jboss</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>

<dependency>
<groupId>org.camunda.bpm.cockpit</groupId>
<artifactId>camunda-cockpit</artifactId>
<groupId>org.camunda.bpm.example</groupId>
<artifactId>camunda-example-invoice</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>

<dependency>
<groupId>org.camunda.bpm.example</groupId>
<artifactId>camunda-example-invoice</artifactId>
<artifactId>camunda-example-wait-states</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
</dependency>

</dependencies>

Expand Down
27 changes: 19 additions & 8 deletions distro/jbossas71/modules/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
<parent>
<groupId>org.camunda.bpm.jboss</groupId>
<artifactId>camunda-jboss</artifactId>
<version>7.0.0-alpha1</version>
<version>7.0.0-Final</version>
</parent>

<properties>
<org.jboss.shrinkwrap.resolver.version>1.0.0-beta-5</org.jboss.shrinkwrap.resolver.version>
</properties>

<dependencies>
<dependency>
<groupId>org.camunda.bpm.jboss</groupId>
Expand All @@ -28,7 +28,7 @@
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
</exclusion>
<exclusion>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
Expand All @@ -38,7 +38,11 @@
<artifactId>joda-time</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependency>
<dependency>
<groupId>org.camunda.bpm.identity</groupId>
<artifactId>camunda-identity-ldap</artifactId>
</dependency>
</dependencies>

<build>
Expand All @@ -50,7 +54,7 @@
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<phase>prepare-package</phase>
<goals>
<goal>run</goal>
</goals>
Expand All @@ -66,15 +70,15 @@
<regexpmapper from="^(.*)/([^/]+)/([^/]*)$$" to="\1/main/\3" handledirsep="yes" />
</copy>

<delete dir="target/modules/com/camunda/fox" />
<delete dir="target/modules/org/camunda/bpm" />

<!-- copy all files again, but this only matches fox files and this treatment makes is maven 2/3 compatible => timestamped snapshot -->
<copy todir="target/modules" flatten="false">
<fileset refid="maven.project.dependencies" />
<mapper>
<chainedmapper>
<regexpmapper from="^(.*)/([^/]+)/([^/]*)$$" to="\1/main/\3" handledirsep="yes" />
<regexpmapper from="^(.*)/((fox-[A-Za-z-]*)[0-9\.]*).*.jar$$" to="\1/\3${project.version}.jar" handledirsep="yes" />
<regexpmapper from="^(.*)/((camunda-[A-Za-z-]*)[0-9\.]*).*.jar$$" to="\1/\3${project.version}.jar" handledirsep="yes" />
</chainedmapper>
</mapper>
</copy>
Expand All @@ -97,7 +101,7 @@
<executions>
<execution>
<id>copy</id>
<phase>package</phase>
<phase>prepare-package</phase>
<goals>
<goal>copy</goal>
</goals>
Expand All @@ -113,6 +117,13 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<classesDirectory>${project.build.directory}/modules/</classesDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

<module name="org.mybatis.mybatis" />
<module name="com.fasterxml.uuid.java-uuid-generator"/>
<module name="org.livetribe.livetribe-jsr223" />
<module name="org.joda.time" slot="2.1" />

</dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<module xmlns="urn:jboss:module:1.0" name="org.camunda.bpm.identity.camunda-identity-ldap">
<resources>
<resource-root path="camunda-identity-ldap-@project.version@.jar" />
</resources>

<dependencies>

<module name="sun.jdk" />

<module name="javax.api" />
<module name="org.camunda.bpm.camunda-engine" />

</dependencies>
</module>
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
</resources>

<dependencies>

<module name="javax.api" />
<module name="javax.transaction.api" />
<module name="javax.enterprise.api" />
<module name="javax.inject.api" />

<module name="org.jboss.staxmapper" />
<module name="org.jboss.as.controller" />
<module name="org.jboss.as.threads" />
Expand All @@ -31,10 +31,12 @@
<module name="org.jboss.metadata" />
<module name="org.jboss.as.web" />
<module name="org.jboss.invocation" />

<module name="org.camunda.bpm.camunda-engine" />

<module name="org.livetribe.livetribe-jsr223" />

<module name="org.camunda.bpm.identity.camunda-identity-ldap" />

<!-- for LDAP plugin only -->
<module name="sun.jdk" />

</dependencies>
</module>

This file was deleted.

6 changes: 1 addition & 5 deletions distro/jbossas71/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,14 @@
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-root</artifactId>
<relativePath>../..</relativePath>
<version>7.0.0-alpha1</version>
<version>7.0.0-Final</version>
</parent>

<artifactId>camunda-jboss</artifactId>
<packaging>pom</packaging>

<name>camunda BPM - jBoss7</name>

<description>
This pom defines the modules for the JBoss distribution which is shipped as Fox Platform Comunity Edition (CE)
</description>

<modules>
<module>assembly</module>
<module>distro</module>
Expand Down
2 changes: 1 addition & 1 deletion distro/jbossas71/subsystem/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>org.camunda.bpm.jboss</groupId>
<artifactId>camunda-jboss</artifactId>
<version>7.0.0-alpha1</version>
<version>7.0.0-Final</version>
</parent>

<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/* 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.camunda.bpm.container.impl.jboss.config;

import java.util.ArrayList;
import java.util.List;

import org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseListener;
import org.camunda.bpm.engine.impl.bpmn.parser.FoxFailedJobParseListener;
import org.camunda.bpm.engine.impl.cfg.JtaProcessEngineConfiguration;
import org.camunda.bpm.engine.impl.jobexecutor.FoxFailedJobCommandFactory;
import org.camunda.bpm.engine.impl.persistence.StrongUuidGenerator;

/**
*
* @author Daniel Meyer
*
*/
public class ManagedJtaProcessEngineConfiguration extends JtaProcessEngineConfiguration {

@Override
protected void init() {
initCustomJobRetryStrategy();
super.init();
}

protected void initCustomJobRetryStrategy() {
// hook custom Failed Job Support
List<BpmnParseListener> customPostBPMNParseListeners = getCustomPostBPMNParseListeners();
if(customPostBPMNParseListeners==null) {
customPostBPMNParseListeners = new ArrayList<BpmnParseListener>();
setCustomPostBPMNParseListeners(customPostBPMNParseListeners);
}
customPostBPMNParseListeners.add(new FoxFailedJobParseListener());

setFailedJobCommandFactory(new FoxFailedJobCommandFactory());
}

protected void initIdGenerator() {
if (idGenerator == null) {
idGenerator = new StrongUuidGenerator();
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,249 @@
/* 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.camunda.bpm.container.impl.jboss.config;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.camunda.bpm.container.impl.metadata.spi.ProcessEnginePluginXml;
import org.camunda.bpm.engine.ProcessEngineException;

/**
* @author Daniel Meyer
* @author Thorben Lindhauer
*/
public class ManagedProcessEngineMetadata {

/** indicates whether the process engine should automatically create /
* update the database schema upon startup */
public static String PROP_IS_AUTO_SCHEMA_UPDATE = "isAutoSchemaUpdate";

/** indicates whether the identity module is used and if this tables are
* required */
public static String PROP_IS_IDENTITY_USED = "isIdentityUsed";

/** indicates whether the job executor should be automatically activated */
public static String PROP_IS_ACTIVATE_JOB_EXECUTOR = "isActivateJobExecutor";

/** the prefix to be used for all process engine database tables */
public static String PROP_DB_TABLE_PREFIX = "dbTablePrefix";

/** the name of the platform job executor acquisition to use */
public static String PROP_JOB_EXECUTOR_ACQUISITION_NAME = "jobExecutorAcquisitionName";

private boolean isDefault;
private String engineName;
private String datasourceJndiName;
private String historyLevel;
protected String configuration;
private Map<String, String> configurationProperties;
private Map<String, String> foxLegacyProperties;
private List<ProcessEnginePluginXml> pluginConfigurations;

/**
* @param isDefault
* @param engineName
* @param datasourceJndiName
* @param historyLevel
* @param configuration
* @param properties
* @param pluginConfigurations
*/
public ManagedProcessEngineMetadata(boolean isDefault, String engineName, String datasourceJndiName, String historyLevel, String configuration, Map<String, String> properties, List<ProcessEnginePluginXml> pluginConfigurations) {
this.isDefault = isDefault;
this.engineName = engineName;
this.datasourceJndiName = datasourceJndiName;
this.historyLevel = historyLevel;
this.configuration = configuration;
this.configurationProperties = selectProperties(properties, false);
this.foxLegacyProperties = selectProperties(properties, true);
this.pluginConfigurations = pluginConfigurations;
}

public boolean isDefault() {
return isDefault;
}

public void setDefault(boolean isDefault) {
this.isDefault = isDefault;
}

public String getEngineName() {
return engineName;
}

public void setEngineName(String engineName) {
this.engineName = engineName;
}

public String getDatasourceJndiName() {
return datasourceJndiName;
}

public void setDatasourceJndiName(String datasourceJndiName) {
this.datasourceJndiName = datasourceJndiName;
}

public String getHistoryLevel() {
return historyLevel;
}

public void setHistoryLevel(String historyLevel) {
this.historyLevel = historyLevel;
}

public String getConfiguration() {
return configuration;
}

public void setConfiguration(String configuration) {
this.configuration = configuration;
}

public Map<String, String> getConfigurationProperties() {
return configurationProperties;
}

public void setConfigurationProperties(Map<String, String> properties) {
this.configurationProperties = properties;
}

public Map<String, String> getFoxLegacyProperties() {
return foxLegacyProperties;
}

public void setFoxLegacyProperties(Map<String, String> foxLegacyProperties) {
this.foxLegacyProperties = foxLegacyProperties;
}

public List<ProcessEnginePluginXml> getPluginConfigurations() {
return pluginConfigurations;
}

public void setPluginConfigurations(List<ProcessEnginePluginXml> pluginConfigurations) {
this.pluginConfigurations = pluginConfigurations;
}

public boolean isIdentityUsed() {
Object object = getFoxLegacyProperties().get(PROP_IS_IDENTITY_USED);
if(object == null) {
return true;
} else {
return Boolean.parseBoolean((String) object);
}
}

public boolean isAutoSchemaUpdate() {
Object object = getFoxLegacyProperties().get(PROP_IS_AUTO_SCHEMA_UPDATE);
if(object == null) {
return true;
} else {
return Boolean.parseBoolean((String) object);
}
}

public boolean isActivateJobExecutor() {
Object object = getFoxLegacyProperties().get(PROP_IS_ACTIVATE_JOB_EXECUTOR);
if(object == null) {
return true;
} else {
return Boolean.parseBoolean((String) object);
}
}

public String getDbTablePrefix() {
Object object = getFoxLegacyProperties().get(PROP_DB_TABLE_PREFIX);
if(object == null) {
return null;
} else {
return (String) object;
}
}

public String getJobExecutorAcquisitionName() {
Object object = getFoxLegacyProperties().get(PROP_JOB_EXECUTOR_ACQUISITION_NAME);
if(object == null) {
return "default";
} else {
return (String) object;
}
}

/**
* validates the configuration and throws {@link ProcessEngineException}
* if the configuration is invalid.
*/
public void validate() {
StringBuilder validationErrorBuilder = new StringBuilder("Process engine configuration is invalid: \n");
boolean isValid = true;

if(datasourceJndiName == null || datasourceJndiName.isEmpty()) {
isValid = false;
validationErrorBuilder.append(" property 'datasource' cannot be null \n");
}
if(engineName == null || engineName.isEmpty()) {
isValid = false;
validationErrorBuilder.append(" property 'engineName' cannot be null \n");
}

for (int i = 0; i < pluginConfigurations.size(); i++) {
ProcessEnginePluginXml pluginConfiguration = pluginConfigurations.get(i);
if (pluginConfiguration.getPluginClass() == null || pluginConfiguration.getPluginClass().isEmpty()) {
isValid = false;
validationErrorBuilder.append(" property 'class' in plugin[" + i + "] cannot be null \n");
}
}

if(!isValid) {
throw new ProcessEngineException(validationErrorBuilder.toString());
}
}

private Map<String, String> selectProperties(Map<String, String> allProperties, boolean selectFoxProperties) {
Map<String, String> result = null;
if (selectFoxProperties) {
result = new HashMap<String, String>();
String isAutoSchemaUpdate = allProperties.get(PROP_IS_AUTO_SCHEMA_UPDATE);
String isActivateJobExecutor = allProperties.get(PROP_IS_ACTIVATE_JOB_EXECUTOR);
String isIdentityUsed = allProperties.get(PROP_IS_IDENTITY_USED);
String dbTablePrefix = allProperties.get(PROP_DB_TABLE_PREFIX);
String jobExecutorAcquisitionName = allProperties.get(PROP_JOB_EXECUTOR_ACQUISITION_NAME);

if (isAutoSchemaUpdate != null) {
result.put(PROP_IS_AUTO_SCHEMA_UPDATE, isAutoSchemaUpdate);
}
if (isActivateJobExecutor != null) {
result.put(PROP_IS_ACTIVATE_JOB_EXECUTOR, isActivateJobExecutor);
}
if (isIdentityUsed != null) {
result.put(PROP_IS_IDENTITY_USED, isIdentityUsed);
}
if (dbTablePrefix != null) {
result.put(PROP_DB_TABLE_PREFIX, dbTablePrefix);
}
if (jobExecutorAcquisitionName != null) {
result.put(PROP_JOB_EXECUTOR_ACQUISITION_NAME, jobExecutorAcquisitionName);
}
} else {
result = new HashMap<String, String>(allProperties);
result.remove(PROP_IS_AUTO_SCHEMA_UPDATE);
result.remove(PROP_IS_ACTIVATE_JOB_EXECUTOR);
result.remove(PROP_IS_IDENTITY_USED);
result.remove(PROP_DB_TABLE_PREFIX);
result.remove(PROP_JOB_EXECUTOR_ACQUISITION_NAME);
}
return result;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitPro

phaseContext.getServiceTarget()
.addService(serviceName, processApplicationModuleService)
.addDependency(phaseContext.getPhaseServiceName())
.setInitialMode(Mode.ACTIVE)
.install();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* 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.
Expand All @@ -22,8 +22,9 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;

import org.camunda.bpm.application.AbstractProcessApplication;
import org.camunda.bpm.application.ProcessApplicationInterface;
import org.camunda.bpm.application.impl.metadata.spi.ProcessArchiveXml;
import org.camunda.bpm.application.impl.metadata.spi.ProcessesXml;
import org.camunda.bpm.container.impl.jboss.deployment.marker.ProcessApplicationAttachments;
Expand Down Expand Up @@ -57,93 +58,100 @@


/**
* <p>This processor installs the process application into the container.</p>
*
* <p>First, we initialize the deployments for all process archives declared by the process application.
* It then registers a {@link MscProcessApplicationDeploymentService} for each process archive to be deployed.
* Finally it registers the {@link MscManagedProcessApplication} service which depends on all the deployment services
* to have completed deployment</p>
*
* <p>This processor installs the process application into the container.</p>
*
* <p>First, we initialize the deployments for all process archives declared by the process application.
* It then registers a {@link ProcessApplicationDeploymentService} for each process archive to be deployed.
* Finally it registers the {@link MscManagedProcessApplication} service which depends on all the deployment services
* to have completed deployment</p>
*
* @author Daniel Meyer
*
*
*/
public class ProcessApplicationDeploymentProcessor implements DeploymentUnitProcessor {

public static final int PRIORITY = 0x0000; // this can happen at the beginning of the phase

public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {

final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();

if(!ProcessApplicationAttachments.isProcessApplication(deploymentUnit)) {
return;
}

final ComponentDescription paComponent = getProcessApplicationComponent(deploymentUnit);
final ServiceName paViewServiceName = getProcessApplicationViewServiceName(paComponent);

Module module = deploymentUnit.getAttachment(Attachments.MODULE);
final String moduleName = module.getIdentifier().toString();
final ServiceName paStartServiceName = ServiceNames.forProcessApplicationStartService(moduleName);
final ServiceName noViewStartService = ServiceNames.forNoViewProcessApplicationStartService(moduleName);

List<ServiceName> deploymentServiceNames = new ArrayList<ServiceName>();

// deploy all process archives
List<ProcessesXmlWrapper> processesXmlWrappers = ProcessApplicationAttachments.getProcessesXmls(deploymentUnit);
for (ProcessesXmlWrapper processesXmlWrapper : processesXmlWrappers) {
for (ProcessesXmlWrapper processesXmlWrapper : processesXmlWrappers) {

ProcessesXml processesXml = processesXmlWrapper.getProcessesXml();
for (ProcessArchiveXml processArchive : processesXml.getProcessArchives()) {

ServiceName processEngineServiceName = getProcessEngineServiceName(processArchive);
Map<String, byte[]> deploymentResources = getDeploymentResources(processArchive, deploymentUnit, processesXmlWrapper.getProcessesXmlFile());

// add the deployment service for each process archive we deploy.
ProcessApplicationDeploymentService deploymentService = new ProcessApplicationDeploymentService(deploymentResources, processArchive);
ServiceName deploymentServiceName = ServiceNames.forProcessApplicationDeploymentService(deploymentUnit.getName(), processArchive.getName());
String processArachiveName = processArchive.getName();
if(processArachiveName == null) {
// use random name for deployment service if name is null (we cannot ask the process application yet since the component might not be up.
processArachiveName = UUID.randomUUID().toString();
}
ServiceName deploymentServiceName = ServiceNames.forProcessApplicationDeploymentService(deploymentUnit.getName(), processArachiveName);
ServiceBuilder<ProcessApplicationDeploymentService> serviceBuilder = phaseContext.getServiceTarget().addService(deploymentServiceName, deploymentService)
.addDependency(phaseContext.getPhaseServiceName())
.addDependency(processEngineServiceName, ProcessEngine.class, deploymentService.getProcessEngineInjector())
.addDependency(processEngineServiceName, ProcessEngine.class, deploymentService.getProcessEngineInjector())
.setInitialMode(Mode.ACTIVE);

if(paViewServiceName != null) {
// add a dependency on the component start service to make sure we are started after the pa-component (Singleton EJB) has started
serviceBuilder.addDependency(paComponent.getStartServiceName());
serviceBuilder.addDependency(paViewServiceName, ComponentView.class, deploymentService.getPaComponentViewInjector());
} else {
serviceBuilder.addDependency(noViewStartService, AbstractProcessApplication.class, deploymentService.getNoViewProcessApplication());
serviceBuilder.addDependency(noViewStartService, ProcessApplicationInterface.class, deploymentService.getNoViewProcessApplication());
}

Services.addServerExecutorDependency(serviceBuilder, deploymentService.getExecutorInjector(), false);

serviceBuilder.install();

deploymentServiceNames.add(deploymentServiceName);

}
}

AnnotationInstance postDeploy = ProcessApplicationAttachments.getPostDeployDescription(deploymentUnit);
AnnotationInstance preUndeploy = ProcessApplicationAttachments.getPreUndeployDescription(deploymentUnit);
// register the managed process application start service

// register the managed process application start service
ProcessApplicationStartService paStartService = new ProcessApplicationStartService(deploymentServiceNames, postDeploy, preUndeploy, module);
ServiceBuilder<ProcessApplicationStartService> serviceBuilder = phaseContext.getServiceTarget().addService(paStartServiceName, paStartService)
.addDependency(phaseContext.getPhaseServiceName())
.addDependency(ServiceNames.forDefaultProcessEngine(), ProcessEngine.class, paStartService.getDefaultProcessEngineInjector())
.addDependencies(deploymentServiceNames)
.setInitialMode(Mode.ACTIVE);

if(paViewServiceName != null) {
serviceBuilder.addDependency(paViewServiceName, ComponentView.class, paStartService.getPaComponentViewInjector());
} else {
serviceBuilder.addDependency(noViewStartService, AbstractProcessApplication.class, paStartService.getNoViewProcessApplication());
} else {
serviceBuilder.addDependency(noViewStartService, ProcessApplicationInterface.class, paStartService.getNoViewProcessApplication());
}

serviceBuilder.install();
}

public void undeploy(DeploymentUnit deploymentUnit) {

}

protected ServiceName getProcessApplicationViewServiceName(ComponentDescription paComponent) {
Expand All @@ -155,7 +163,7 @@ protected ServiceName getProcessApplicationViewServiceName(ComponentDescription
return next.getServiceName();
}
}

protected ComponentDescription getProcessApplicationComponent(DeploymentUnit deploymentUnit) {
ComponentDescription paComponentDescription = ProcessApplicationAttachments.getProcessApplicationComponent(deploymentUnit);
return paComponentDescription;
Expand All @@ -180,14 +188,14 @@ protected ServiceName getProcessEngineServiceName(ProcessArchiveXml processArchi
protected Map<String, byte[]> getDeploymentResources(ProcessArchiveXml processArchive, DeploymentUnit deploymentUnit, VirtualFile processesXmlFile) {

final Module module = deploymentUnit.getAttachment(MODULE);

Map<String, byte[]> resources = new HashMap<String, byte[]>();

// first, add all resources listed in the processe.xml
List<String> process = processArchive.getProcessResourceNames();
ModuleClassLoader classLoader = module.getClassLoader();
for (String resource : process) {

for (String resource : process) {
InputStream inputStream = null;
try {
inputStream = classLoader.getResourceAsStream(resource);
Expand All @@ -196,19 +204,19 @@ protected Map<String, byte[]> getDeploymentResources(ProcessArchiveXml processAr
IoUtil.closeSilently(inputStream);
}
}

// scan for process definitions
if(PropertyHelper.getBooleanProperty(processArchive.getProperties(), ProcessArchiveXml.PROP_IS_SCAN_FOR_PROCESS_DEFINITIONS, process.isEmpty())) {

//always use VFS scanner on JBoss
final VfsProcessApplicationScanner scanner = new VfsProcessApplicationScanner();
String resourceRootPath = processArchive.getProperties().get(ProcessArchiveXml.PROP_RESOURCE_ROOT_PATH);
URL processesXmlUrl = vfsFileAsUrl(processesXmlFile);
resources.putAll(scanner.findResources(classLoader, resourceRootPath, processesXmlUrl));
final VfsProcessApplicationScanner scanner = new VfsProcessApplicationScanner();

String resourceRootPath = processArchive.getProperties().get(ProcessArchiveXml.PROP_RESOURCE_ROOT_PATH);
URL processesXmlUrl = vfsFileAsUrl(processesXmlFile);
resources.putAll(scanner.findResources(classLoader, resourceRootPath, processesXmlUrl));
}
return resources;

return resources;
}

protected URL vfsFileAsUrl(VirtualFile processesXmlFile) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import java.util.List;
import java.util.Map;

import org.camunda.bpm.container.impl.jboss.config.ManagedProcessEngineMetadata;
import org.camunda.bpm.container.impl.jboss.deployment.marker.ProcessApplicationAttachments;
import org.camunda.bpm.container.impl.jboss.metadata.ManagedProcessEngineMetadata;
import org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController;
import org.camunda.bpm.container.impl.jboss.service.ServiceNames;
import org.camunda.bpm.container.impl.jboss.util.ProcessesXmlWrapper;
Expand Down Expand Up @@ -84,7 +84,7 @@ protected void startProcessEngine(ProcessEngineXml processEngineXml, DeploymentP
serviceBuilder.addDependency(phaseContext.getPhaseServiceName());

// add Service dependencies
MscManagedProcessEngineController.initializeServiceBuilder(configuration, service, serviceBuilder);
MscManagedProcessEngineController.initializeServiceBuilder(configuration, service, serviceBuilder, processEngineXml.getJobAcquisitionName());

// make this start on demand
serviceBuilder.setInitialMode(Mode.ACTIVE);
Expand All @@ -98,14 +98,14 @@ protected void startProcessEngine(ProcessEngineXml processEngineXml, DeploymentP
* into a {@link ManagedProcessEngineMetadata} */
@SuppressWarnings({ "unchecked", "rawtypes" })
protected ManagedProcessEngineMetadata transformConfiguration(ProcessEngineXml processEngineXml) {

boolean isDefault = processEngineXml.getName().equals("default");
String engineName = processEngineXml.getName();
String datasourceJndiName = processEngineXml.getDatasource();
String historyLevel = processEngineXml.getProperties().get("history");

return new ManagedProcessEngineMetadata(isDefault, engineName, datasourceJndiName, historyLevel, (Map) processEngineXml.getProperties());

return new ManagedProcessEngineMetadata(
processEngineXml.getName().equals("default"),
processEngineXml.getName(),
processEngineXml.getDatasource(),
processEngineXml.getProperties().get("history"),
processEngineXml.getConfigurationClass(),
(Map) processEngineXml.getProperties(),
processEngineXml.getPlugins());
}

public void undeploy(DeploymentUnit deploymentUnit) {
Expand Down
Loading