diff --git a/modules/activiti-cactus/pom.xml b/modules/activiti-cactus/pom.xml
index 0f1d8608415efffefade87c6052d8ba7d7687d1c..b5a669ed4656eb55e7561537355fe596618b80be 100644
--- a/modules/activiti-cactus/pom.xml
+++ b/modules/activiti-cactus/pom.xml
@@ -12,7 +12,7 @@
org.activiti
activiti-root
../..
- 5.9-SNAPSHOT
+ 5.10-SNAPSHOT
diff --git a/modules/activiti-camel/pom.xml b/modules/activiti-camel/pom.xml
index 34e820bd6c7a5e9992bda3881fb1114b9f5bd30a..fb2f83d51c2d3043a4955668de4d7870005d9e19 100644
--- a/modules/activiti-camel/pom.xml
+++ b/modules/activiti-camel/pom.xml
@@ -12,7 +12,7 @@
org.activiti
activiti-root
../..
- 5.9-SNAPSHOT
+ 5.10-SNAPSHOT
diff --git a/modules/activiti-cdi/pom.xml b/modules/activiti-cdi/pom.xml
index 4eccbc75da56e46ea709dc0ca0ee518ec1730066..ae29e5640d583d6e3bea525e36ab0de412efc8e4 100644
--- a/modules/activiti-cdi/pom.xml
+++ b/modules/activiti-cdi/pom.xml
@@ -12,7 +12,7 @@
org.activiti
activiti-root
../..
- 5.9-SNAPSHOT
+ 5.10-SNAPSHOT
diff --git a/modules/activiti-cxf/pom.xml b/modules/activiti-cxf/pom.xml
index b1b72ff6d5a23e5d9b1d7bbc4dd0f11a837f61f7..cc82ff7f4a3ea020e431aa4ad6750969c3769817 100644
--- a/modules/activiti-cxf/pom.xml
+++ b/modules/activiti-cxf/pom.xml
@@ -11,7 +11,7 @@
org.activiti
activiti-root
../..
- 5.9-SNAPSHOT
+ 5.10-SNAPSHOT
diff --git a/modules/activiti-engine/pom.xml b/modules/activiti-engine/pom.xml
index 79cdb0ad6e6a28461ec12898667371e45ea3efbc..0d1752fd065d62cf2855b56080ea63eb7d15413d 100644
--- a/modules/activiti-engine/pom.xml
+++ b/modules/activiti-engine/pom.xml
@@ -11,7 +11,7 @@
org.activiti
activiti-root
../..
- 5.9-SNAPSHOT
+ 5.10-SNAPSHOT
diff --git a/modules/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/CallActivityBehavior.java b/modules/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/CallActivityBehavior.java
index 10f33f23b9d5790822aa4878d1051e829afc9622..57693b77db92cea2efbde01eabb3550552921ea1 100644
--- a/modules/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/CallActivityBehavior.java
+++ b/modules/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/CallActivityBehavior.java
@@ -58,7 +58,7 @@ public class CallActivityBehavior extends AbstractBpmnActivityBehavior implement
public void execute(ActivityExecution execution) throws Exception {
- if ((processDefinitonKey == null) && (processDefinitionExpression != null)) {
+ if (processDefinitionExpression != null) {
processDefinitonKey = (String) processDefinitionExpression.getValue(execution);
}
diff --git a/modules/activiti-engine/src/test/java/org/activiti/engine/test/bpmn/callactivity/CallActivityAdvancedTest.java b/modules/activiti-engine/src/test/java/org/activiti/engine/test/bpmn/callactivity/CallActivityAdvancedTest.java
index c6599a03c98a4aed391dfb54a72c05c54c569828..0f1a2b0abda897655a2ea08f19d2d927b668809d 100644
--- a/modules/activiti-engine/src/test/java/org/activiti/engine/test/bpmn/callactivity/CallActivityAdvancedTest.java
+++ b/modules/activiti-engine/src/test/java/org/activiti/engine/test/bpmn/callactivity/CallActivityAdvancedTest.java
@@ -138,6 +138,65 @@ public class CallActivityAdvancedTest extends PluggableActivitiTestCase {
taskService.complete(taskB.getId());
assertEquals(0, runtimeService.createExecutionQuery().count());
}
+
+ @Deployment(resources = { "org/activiti/engine/test/bpmn/callactivity/CallActivity.testCallSequentialSubProcess.bpmn20.xml",
+ "org/activiti/engine/test/bpmn/callactivity/CallActivity.testCallSimpleSubProcessWithExpressions.bpmn20.xml",
+ "org/activiti/engine/test/bpmn/callactivity/simpleSubProcess.bpmn20.xml",
+ "org/activiti/engine/test/bpmn/callactivity/simpleSubProcess2.bpmn20.xml"})
+ public void testCallSequentialSubProcessWithExpressions() {
+
+ ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("callSequentialSubProcess");
+
+ // FIRST sub process calls simpleSubProcess
+
+ // one task in the subprocess should be active after starting the process
+ // instance
+ TaskQuery taskQuery = taskService.createTaskQuery();
+ Task taskBeforeSubProcess = taskQuery.singleResult();
+ assertEquals("Task before subprocess", taskBeforeSubProcess.getName());
+
+ // Completing the task continues the process which leads to calling the
+ // subprocess. The sub process we want to call is passed in as a variable
+ // into this task
+ taskService.setVariable(taskBeforeSubProcess.getId(), "simpleSubProcessExpression", "simpleSubProcess");
+ taskService.complete(taskBeforeSubProcess.getId());
+ Task taskInSubProcess = taskQuery.singleResult();
+ assertEquals("Task in subprocess", taskInSubProcess.getName());
+
+ // Completing the task in the subprocess, finishes the subprocess
+ taskService.complete(taskInSubProcess.getId());
+ Task taskAfterSubProcess = taskQuery.singleResult();
+ assertEquals("Task after subprocess", taskAfterSubProcess.getName());
+
+ // Completing this task end the process instance
+ taskService.complete(taskAfterSubProcess.getId());
+
+
+ // SECOND sub process calls simpleSubProcess2
+
+ // one task in the subprocess should be active after starting the process
+ // instance
+ taskQuery = taskService.createTaskQuery();
+ taskBeforeSubProcess = taskQuery.singleResult();
+ assertEquals("Task before subprocess", taskBeforeSubProcess.getName());
+
+ // Completing the task continues the process which leads to calling the
+ // subprocess. The sub process we want to call is passed in as a variable
+ // into this task
+ taskService.setVariable(taskBeforeSubProcess.getId(), "simpleSubProcessExpression", "simpleSubProcess2");
+ taskService.complete(taskBeforeSubProcess.getId());
+ taskInSubProcess = taskQuery.singleResult();
+ assertEquals("Task in subprocess 2", taskInSubProcess.getName());
+
+ // Completing the task in the subprocess, finishes the subprocess
+ taskService.complete(taskInSubProcess.getId());
+ taskAfterSubProcess = taskQuery.singleResult();
+ assertEquals("Task after subprocess", taskAfterSubProcess.getName());
+
+ // Completing this task end the process instance
+ taskService.complete(taskAfterSubProcess.getId());
+ assertProcessEnded(processInstance.getId());
+ }
@Deployment(resources = {
"org/activiti/engine/test/bpmn/callactivity/CallActivity.testTimerOnCallActivity.bpmn20.xml",
diff --git a/modules/activiti-engine/src/test/resources/org/activiti/engine/test/bpmn/callactivity/CallActivity.testCallSequentialSubProcess.bpmn20.xml b/modules/activiti-engine/src/test/resources/org/activiti/engine/test/bpmn/callactivity/CallActivity.testCallSequentialSubProcess.bpmn20.xml
new file mode 100644
index 0000000000000000000000000000000000000000..aa87ff69b0cf07d00a6ab2f8cc80cb7a2c7534ef
--- /dev/null
+++ b/modules/activiti-engine/src/test/resources/org/activiti/engine/test/bpmn/callactivity/CallActivity.testCallSequentialSubProcess.bpmn20.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+ 2
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/activiti-engine/src/test/resources/org/activiti/engine/test/bpmn/callactivity/simpleSubProcess2.bpmn20.xml b/modules/activiti-engine/src/test/resources/org/activiti/engine/test/bpmn/callactivity/simpleSubProcess2.bpmn20.xml
new file mode 100644
index 0000000000000000000000000000000000000000..fcff7af6b1a8483932f44b7119e8ec5f415ec8ff
--- /dev/null
+++ b/modules/activiti-engine/src/test/resources/org/activiti/engine/test/bpmn/callactivity/simpleSubProcess2.bpmn20.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/activiti-mule/pom.xml b/modules/activiti-mule/pom.xml
index 24dbde236db23360f90dd23831f94aa8b669ef1d..6483944db6a89e094d2b74511198a972b2bdecc2 100644
--- a/modules/activiti-mule/pom.xml
+++ b/modules/activiti-mule/pom.xml
@@ -11,7 +11,7 @@
org.activiti
activiti-root
../..
- 5.9-SNAPSHOT
+ 5.10-SNAPSHOT
diff --git a/modules/activiti-osgi/pom.xml b/modules/activiti-osgi/pom.xml
index 2067a26285f944a5291ea60a9521d0f6b1381863..9f23534b3a4ec9998a29c6afe0d9d30553d4b9f9 100644
--- a/modules/activiti-osgi/pom.xml
+++ b/modules/activiti-osgi/pom.xml
@@ -12,7 +12,7 @@
org.activiti
activiti-root
../..
- 5.9-SNAPSHOT
+ 5.10-SNAPSHOT
diff --git a/modules/activiti-spring/pom.xml b/modules/activiti-spring/pom.xml
index e6c93dec30f0801818c733936c05695534461b26..0f0b342a992b9c18a3d34236aca1f744114ee602 100644
--- a/modules/activiti-spring/pom.xml
+++ b/modules/activiti-spring/pom.xml
@@ -10,7 +10,7 @@
org.activiti
activiti-root
../..
- 5.9-SNAPSHOT
+ 5.10-SNAPSHOT
diff --git a/modules/activiti-upgrade/pom.xml b/modules/activiti-upgrade/pom.xml
index af07951b696c33633a8d81f0a152e093360aa47e..ec3bca1ef9a1972b83959d9bdf4c7d24a57f685f 100644
--- a/modules/activiti-upgrade/pom.xml
+++ b/modules/activiti-upgrade/pom.xml
@@ -6,7 +6,7 @@
Activiti - Upgrade
org.activiti
activiti-upgrade
- 5.9-ALWAYS-SNAPSHOT
+ 5.10-ALWAYS-SNAPSHOT
true
diff --git a/modules/activiti-webapp-explorer2/pom.xml b/modules/activiti-webapp-explorer2/pom.xml
index 7f54a1a19d1cab1dc2fd4a775b6eb9e396e63fd4..e46e3904cc353b79ce9df7dd66fe37f67fb91446 100644
--- a/modules/activiti-webapp-explorer2/pom.xml
+++ b/modules/activiti-webapp-explorer2/pom.xml
@@ -12,7 +12,7 @@
org.activiti
activiti-root
../..
- 5.9-SNAPSHOT
+ 5.10-SNAPSHOT
diff --git a/modules/activiti-webapp-rest2/pom.xml b/modules/activiti-webapp-rest2/pom.xml
index 3149d200e2411401f2635c0dd2cc8adf92a71884..e4657ac00a31d75ec5086e21b87a41a746bbc564 100644
--- a/modules/activiti-webapp-rest2/pom.xml
+++ b/modules/activiti-webapp-rest2/pom.xml
@@ -10,7 +10,7 @@
org.activiti
activiti-root
../..
- 5.9-SNAPSHOT
+ 5.10-SNAPSHOT
diff --git a/pom.xml b/pom.xml
index 530764f8859486e6e9fdb56012dff40740bbc8c1..0c90dc26e56332ff4714980e21c3949b707da680 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,7 +8,7 @@
activiti-root
pom
- 5.9-SNAPSHOT
+ 5.10-SNAPSHOT
3.0.3.RELEASE
3.1.0