[
http://jira.jboss.com/jira/browse/JBPM-955?page=comments#action_12364059 ]
Arjan van Bentem commented on JBPM-955:
---------------------------------------
also with a mapped-name that allows for translation of the swimlane
instance to be stored under a different name in the sub process instance.
A mapping is indeed good to have, as a sub-process might of course define multiple tasks,
each of which could have its own swimlane (or assignment) as well. Sorry for not getting
it after your first comment, and excuse me for giving yet another example just to be sure.
So, I assume you're proposing:
<process-definition name="hire">
<swimlane name="candidate" />
<swimlane name="colleague" />
<swimlane name="manager" />
...
<process-state name="initial interview">
<sub-process name="interview" />
<!-- First interview: assessment by future colleague -->
<swimlane name="colleague" mapped-name="interviewer"
/>
<swimlane name="candidate" mapped-name="interviewee"
/>
...
</process-state>
...
<process-state name="second interview">
<sub-process name="interview" />
<!-- Second interview: assessment by future manager -->
<swimlane name="manager" mapped-name="interviewer"
/>
<swimlane name="candidate" mapped-name="interviewee"
/>
...
</process-state>
...
<process-definition>
...using
<process-definition name="interview">
<!-- NOTE: no need for expression here, such as "#{interviewer}" --
right? -->
<swimlane name="interviewer" />
<swimlane name="interviewee" />
...
<task swimlane="interviewer">
...
</task>
<task swimlane="interviewee">
...
</task>
...
</process-definition>
Right? That looks good! It would also allow for sub-processes within sub-processes. Maybe
a future GPD could even ensure the swimlanes are set by the calling process-state. The
above would surely cover my needs and is much better than my proposal, which I
couldn't even make clear so you should forget about ;-)
If you're indeed proposing the above for <swimlane>, then what about doing the
same for <assignment> -- would that make sense at all, and would it be doable? I
guess this would only make (some) sense for pooled-actors, but would look much better
using swimlanes:
<process-state name="initial interview">
<sub-process name="interview-using-actor" />
<assignment pooled-actors="colleagues-pool"
mapped-name="interviewer-pool" />
<assignment actor-id="candidate-actor"
mapped-name="interviewee-actor" />
<assignment expression="previous --> group(hierarchy) -->
member(boss)" mapped-name="supervisor" />
...
</process-state>
...and
<process-definition name="interview-using-actor">
...
<task>
<!-- NOTE: unlike the swimlane, using "#{..}" here -->
<assignment pooled-actors="#{interviewer-pool}" />
...
</task>
<task>
<!-- NOTE: unlike the swimlane, using "#{..}" here -->
<assignment actor-id="#{interviewee-actor}" />
...
</task>
...
</process-definition>
There might be better ways to do this (such as some custom Java classes to set the
variable value), and probably most is covered using swimlanes like you propose?
Thanks for reading this ;-)
Arjan.
jBPM: support setting Actor or Swimlane on process level (to re-use
sub-processes)
----------------------------------------------------------------------------------
Key: JBPM-955
URL:
http://jira.jboss.com/jira/browse/JBPM-955
Project: JBoss jBPM
Issue Type: Feature Request
Components: Core Engine
Affects Versions: jBPM jPDL 3.2
Environment: All
Reporter: Arjan van Bentem
Assigned To: Tom Baeyens
Priority: Minor
Currently, an Actor or Swimlane is assigned within the task definition. When using
sub-processes it would be very convenient to make the assignments in the parent process,
such as in the parent <process-state>, or maybe even in the outermost
<process-definition>.
For example: both a helpdesk employee and the customer would need to fill in the same
questionnaire at different points in the main process. The steps to fill in the
questionnaire would be a generic sub-process, in which (at design time) one would not know
the Swimlane nor Actor. This would require a way to set the swimlane in the parent's
process-state:
<!-- multiple references to the same sub-process, for different swimlanes -->
<process-state name="Customer survey" swimlane="client">
<sub-process name="survey" />
</process-state>
:
:
<process-state name="Employee survey" swimlane="employer">
<sub-process name="survey" />
</process-state>
... or
<process-state name="Employee survey">
<assignment actor-id="..."/>
<sub-process name="survey" />
</process-state>
... or maybe even at an even higher level, where jBPM would iterate up into the chain,
possibly though nested sub-processes, until some assignment is found?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira