Behavior of CallActivity when deploying new versions

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2013 05:51 AM
Hi
If i have a deployment with a process (process1) containing a CallActivity starting another process (process2) then deploy a new version of these processes, what will the existing process instances of process1 start when reaching the CallActivity starting process2. The version from the old deployment, from which the process instance is started, or the new version?
The reason that I am asking is that we have this situation where we have added some new parameters to process2 and now all existing instances from the old version is failing when starting(and executing) process2 with the message that the new property does not exist.
If i have a deployment with a process (process1) containing a CallActivity starting another process (process2) then deploy a new version of these processes, what will the existing process instances of process1 start when reaching the CallActivity starting process2. The version from the old deployment, from which the process instance is started, or the new version?
The reason that I am asking is that we have this situation where we have added some new parameters to process2 and now all existing instances from the old version is failing when starting(and executing) process2 with the message that the new property does not exist.
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2013 06:10 AM
A call-activity by default, calls the latest version of the process that is configured in "calledElement".

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2013 06:12 AM
A call-activity by default, calls the latest version of the process that is configured in "calledElement".
What are the possibilities for having it call a older version?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2013 07:38 AM
public void execute(ActivityExecution execution) throws Exception {
String processDefinitonKey = this.processDefinitonKey;
if (processDefinitionExpression != null) {
processDefinitonKey = (String) processDefinitionExpression.getValue(execution);
}
ProcessDefinitionImpl processDefinition = Context
.getProcessEngineConfiguration()
.getDeploymentManager()
.findDeployedLatestProcessDefinitionByKey(processDefinitonKey);
PvmProcessInstance subProcessInstance = execution.createSubProcessInstance(processDefinition);
You'll have to extend the CallActivityBehavior to use, for example, a fixed processDefinition ID instead of a key in the field processDefinitionExpression (which corresponds to the BPMN calledElement). You can easily alter the ActivityBehaviorFactory used by the latests parser in order to accomplish this. If you're not able to wait for the 5.12 version, you'll have to use a BPMNParseListener and replace the ActivitiyBehaviour yourself when the process us parsed.
