Support dynamic sub-process-key
--------------------------------
Key: JBPM-2819
URL:
https://jira.jboss.org/jira/browse/JBPM-2819
Project: jBPM
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.3
Environment: Win 32
Reporter: Al Nadein
I believe 3.2 had a support for dynamic subprocesses. I.E. I could specify in main
process:
<sub-process g="97,277,114,49" name="Subprocess1"
sub-process-key="#{actionlist}" >
<transition g="-40,-17" name="have-created-all" to="Have
Created All Sub-processes?"/>
</sub-process>
and then pass a value for "actionlist" in a map of variables.
Can't do this any longer in 4.3
This is my change:
org.jbpm.jpdl.internal.activitySubProcessActivity::execute()
FROM:
if (subProcessId!=null) {
processDefinition = repositorySession.findProcessDefinitionById(subProcessId);
} else{
processDefinition = repositorySession.findProcessDefinitionByKey(subProcessKey);
}
TO:
if (subProcessId!=null) {
processDefinition = repositorySession.findProcessDefinitionById(subProcessId);
} else {
if(subProcessKey.matches("#\\{\\w+\\}")){
subProcessKey = subProcessKey.substring(2, subProcessKey.length() - 1);
subProcessKey = (String)executionImpl.getVariable(subProcessKey);
}
processDefinition = repositorySession.findProcessDefinitionByKey(subProcessKey);
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira