-
1. Re: Assign a generic sub-process task in the parent process?
kukeltje Mar 27, 2007 10:51 AM (in response to avbentem)we did it like in the second solution (not using seam yet). So not sure there is a better way. We don't have many problems with this.
-
2. Re: Assign a generic sub-process task in the parent process?
avbentem Mar 29, 2007 5:22 AM (in response to avbentem)I guess I could use TaskInstance#setSwimlaneInstance to change the swimlane on the fly.
The documentation states that the actor is "remembered in the process for all subsequent tasks that are in the same swimlane". I hope this also applies to sub-processes. If so, then I can set a specific Actor for the employee and customer swimlanes at the beginning of the process. Next, within the sub-processes I would then alternate the swimlane using #setSwimlanceInstance (well -- if I can get to the parent process, given a sub-process). jBPM would then still know which Actor was assigned to that specific swimlane.
Just for the archives: see also the post "asign swimlanes in execution time".
I'll give it a try; any thoughts on this? For example I wonder if I could abandon an existing SwimlaneInstance when changing the swimlane on the fly. In other words: I wonder if I need to do some clean-up when the process ends, if I changed swimlane instances myself?
To be continued...
Arjan. -
3. Re: Assign a generic sub-process task in the parent process?
kukeltje Mar 29, 2007 8:49 AM (in response to avbentem)Additional info reagarding the assignment in swimlanes
-
4. Re: Assign a generic sub-process task in the parent process?
avbentem Mar 29, 2007 9:57 AM (in response to avbentem)"kukeltje" wrote:
<a href="http://jira.jboss.com/jira/browse/JBPM-743">Additional info reagarding the assignment in swimlanes</a>
Thanks!
But so far no luck setting the swimlane to start with; no matter where I try to get my event handler invoked, the injected TaskInstance is always null when invoked from a parent process.
For example:<process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="survey"> : <task-node name="survey"> <task name="survey"> <!-- The same results for task-start or task-assign --> <event type="task-create"> <action name=".." expression="#{taskAssigner.setSwimlane}" /> </event> </task> : </task-node> </process-definition>
And likewise when setting the event handler on the task-node:<process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="survey"> : <task-node name="survey"> <event type="node-enter"> <action name=".." expression="#{taskAssigner.setSwimlane}" /> </event> <task name="survey"> : </task> : </task-node> </process-definition>
When starting the sub-process directly (so, not from within some process-state in a parent process) then I do get a TaskInstance injected though...
Like I said: to be continued... I hope!
Arjan. -
5. Re: Assign a generic sub-process task in the parent process?
avbentem Apr 23, 2007 3:50 AM (in response to avbentem)
The only option that seems doable is<process-state name="Employee survey"> <sub-process name="survey"> <variable name="surveySwimlane" .../> </sub-process> : </process-state>
So, I've issued a feature request to allow for setting Actor or Swimlane on process level: JBPM-955.