[jboss-user] [JBoss jBPM] - Assign a generic sub-process task in the parent process?

avbentem do-not-reply at jboss.com
Tue Mar 27 10:42:25 EDT 2007


I'd like to define my actors on process level, not on task level. Doing so I'd like re-use a sub-process for different actors who, in my opinion, are not really part of the same swimlane. Like both a helpdesk employee and the customer would need to fill in the same questionnaire at different points in the main process. The employee is, at some earlier stage, assigned from a pool of actors. 

Of course, before getting to the task I could outject some Actor that is used like:
<process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="survey">  
  |     : 
  |     <task-node name="survey">
  |         <task name="survey">
  |             <assignment actor-id="#{outjectedActor.id}"/>
  |         </task>
  |         :
  |     </task-node>
  | </process-definition>

Above, the survey process would be included in multiple places in my main process definition, like:
<process-state name="Customer survey">
  |     <sub-process name="survey" />  
  |     :
  | </process-state>
  | :
  | :
  | <process-state name="Employee survey">
  |     <sub-process name="survey" />  
  |     :
  | </process-state>

So, above I'd need to make sure to outject the (different) Actor in multiple places as well.

Alternatively maybe I should include some variable, which can then be retrieved in some component that is used in the assignment expression:
<task name="survey">
  |     <assignment actor-id="#{taskAssignerComponent.surveyActor.id}"/>
  | </task>
referred to by, for example,
<process-state name="Employee survey">
  |     <sub-process name="survey">  
  |         <variable name="surveySwimlane" .../>
  |     </sub-process>
  |     :
  | </process-state>

In either case, to directly outject the Actor property, or to invoke a getSurveyActor() method on some TaskAssigner component, I'd need to know who's filling in the survey, or which parent process invoked the generic sub-process. 

I wonder if there's a better way?

Thanks,
Arjan.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032064#4032064

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032064



More information about the jboss-user mailing list