[jboss-user] [jBPM] - Questions on JBPM 4.4.
Abdelilah Essiari
do-not-reply at jboss.com
Wed Oct 13 05:41:32 EDT 2010
Abdelilah Essiari [http://community.jboss.org/people/AESSIARI] created the discussion
"Questions on JBPM 4.4."
To view the discussion, visit: http://community.jboss.org/message/566219#566219
--------------------------------------------------------------
I am evaluating JBPM 4.4 (JPDL) for my project and I have ran into a couple of issues:
One is that a mix of exclusive continuations are asynchronous continuations does not quite work.
Upon a close look at AcquireJobsCmd.java, it becomes aparrent:
a) more than one exclusive job can execute in different transactions.
b) an exclusive job concurrently with an asynchrouns job is running.
This defeats my understanding of what exclusive means. I have tentatively modified AcquireJobsCmd.java by ensuring
that a and b do not happen. This important in my case as I have an assign statement that needs to update a process
variable inside a forEach with asynchronous java continuations as shown below. This only works after I made my changes.
<variable history="false" name="GlobalMap" type="serializable">
<map>
</map>
</variable>
<foreach g="160,261,48,48" in="#{dataSources}" name="foreach" var="dataSource">
<transition to="do lookup"/>
</foreach>
<java continue="async" class="test.JavaService" g="327,259,98,50" method="lookup" name="do lookup" var="returnVar">
<arg>
<object expr="#{dataSource}"/>
</arg>
<arg>
<string value="kw"/>
</arg>
<transition continue="exclusive" to="copy" />
java>
<assign from-expr="#{returnVar}" name="copy" to-expr="#{GlobalMap[dataSource]}">
<transition to="join"/>
</assign>
<join g="567,259,80,40" multiplicity="2" name="join">
<transition to="do materialize"/>
</join>
...
The other question is that +returnVar+ is actually mapped to the parent execution. It should map to the forked execution as is the variable +dataSource+. Shouldn't it?
In any case the tentative fix for this was easy. Just changed a one line in JavaActivity.java.
if (variableName!=null) {
// execution.setVariable(variableName, returnValue);
execution.createVariable(variableName, returnValue);
}
Hope to hear from someone. Thanks in advance.
aes.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/566219#566219]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20101013/22835a28/attachment.html
More information about the jboss-user
mailing list