[
https://jira.jboss.org/jira/browse/JBPM-2581?page=com.atlassian.jira.plug...
]
Miguel Fossati commented on JBPM-2581:
--------------------------------------
More debug info:
I compared the case when the fork has only one transition (and it works fine):
ForkActivity:
// if there is exactly 1 transition to be taken, just use the incoming execution
} else if (forkingTransitions.size()==1) {
execution.take(forkingTransitions.get(0));
}
and its sets the propagation flag to EXPLICIT:
ExecutionImpl#take(transition):
setPropagation(Propagation.EXPLICIT);
Well, when there is more than one execution path, ForkActivity creates a child
concurrentExecution for each one, and executes them, but it does not set the propatation
flag of the parentExecution (wich is the fork one), wich remains as UNSPECIFIED.
for (Transition transition: forkingTransitions) {
// launch a concurrent path of execution
String childExecutionName = transition.getName();
ExecutionImpl concurrentExecution =
concurrentRoot.createExecution(childExecutionName);
concurrentExecution.setActivity(activity);
concurrentExecution.setState(Execution.STATE_ACTIVE_CONCURRENT);
concurrentExecution.take(transition);
if (concurrentRoot.isEnded()) {
break;
}
}
This propagation flag set as UNSPECIFIED causes the following code to execute, resulting
in re-evaluating the default transition, wich repeats the task in my Test:
ExecuteActivity.perform(ExecutionImpl execution):
if (execution.getPropagation()==Propagation.UNSPECIFIED) {
execution.proceed();
}
If after the ForkActivity for that launches the concurrentExecutions I set the
parentExecution to Propagation.EXPLICIT, it works fine.
Im really worried about this issue being a bug or not, as I am close to release to
production an app wich jbpm3 and jbpm4 coexisting.
Thanks in advance.
Problems with nested Forks
---------------------------
Key: JBPM-2581
URL:
https://jira.jboss.org/jira/browse/JBPM-2581
Project: jBPM
Issue Type: Task
Security Level: Public(Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.1, jBPM 4.0
Environment: Windows xp, Eclipse galileo and jbpm integred with spring and
hibernate.
Reporter: Sebastian Castellanos
Priority: Critical
Attachments: a.jpdl.xml, TestForkAndJoin.java, testForkAndJoin.jpdl.xml
Original Estimate: 3 days
Remaining Estimate: 3 days
First off, I apologize for not having made the unit tests, but do not have time at the
moment and I think it is a conceptual problem and a unit test would not provide much.
I am integrating jBPM version 4.1 and it proves there too.
The situation is this:
When launched a nested Fork1 another in the second Fork repeats one of its tasks.
In the xml it becomes clear what the situation.
Maybe it is a conceptual issue, and I who is mishandled.
I would be grateful if I can help, as I searched in different places this situation and
found no alternative but to post it here.
Greetings.
Sebastian.
--
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