ForEachFork explanation

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2007 01:33 PM
I can't figure out how the foreach variable is set in the org.alfresco.repo.workflow.jbpm.ForEachFork class
Is there some magic that gets the <foreach> dom element from the workflow process definition? Is it Spring AOP or JBPM Spring modules?
I see the same this same thing with actors and pooledactors in AlfrescoAssignment
Is there some magic that gets the <foreach> dom element from the workflow process definition? Is it Spring AOP or JBPM Spring modules?
<node name="submitparallelreview"> <action class="org.alfresco.repo.workflow.jbpm.ForEachFork"> <foreach>#{bpm_assignees}</foreach> <var>reviewer</var> </action> <transition name="review" to="parallelreview" /></node>
I see the same this same thing with actors and pooledactors in AlfrescoAssignment
Labels:
- Labels:
-
Archive
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2007 07:16 AM
jBPM provides support for mapping action sub-elements into the action class implementation.
ForEachFork and AlfrescoAssignment make use of org.dom4j.Element mapping. You'll notice in ForEachFork there is a class member called 'foreach' of type org.dom4j.Element, and another member called 'var' of type String. jBPM maps the sub-elements of <action> to the class members (by name).
See http://docs.jboss.com/jbpm/v3/userguide_single/#configurationofdelegations
ForEachFork and AlfrescoAssignment make use of org.dom4j.Element mapping. You'll notice in ForEachFork there is a class member called 'foreach' of type org.dom4j.Element, and another member called 'var' of type String. jBPM maps the sub-elements of <action> to the class members (by name).
See http://docs.jboss.com/jbpm/v3/userguide_single/#configurationofdelegations

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2007 08:03 AM
I see now. I didn't understand how private instance variables could be set from outside the object without accessor methods. It must be done in one of the base classes (JBPMSpringActionHandler, ..)
There is some confusion in the jbpm docs, though. In one place (16.2.3) it says the default configuration type is to call the default constructor. But in 16.2.3.1 it says the default config-type is “field†which would give the behavior I see.
Thanks!
There is some confusion in the jbpm docs, though. In one place (16.2.3) it says the default configuration type is to call the default constructor. But in 16.2.3.1 it says the default config-type is “field†which would give the behavior I see.
Thanks!
