AnsweredAssumed Answered

How to assign user to task

Question asked by tiennd on Nov 20, 2006
Latest reply on May 9, 2007 by sofie24
Please take a look at my process definition and task model below:
[img]http://demo.dtn.com.vn/download/processimage.jpg[/img]

There're 4 steps in the process and I want users to be able to assign different user in each step. I deployed the definition successfully but only in the first step, I can select user to assign to, the subsequent steps, there's no select box to choose user.

Process definition:

<?xml version="1.0" encoding="UTF-8"?>
<process-definition
  xmlns="urn:jbpm.org:jpdl-3.1"  name="wf:testProcess">
 
   <swimlane name="initiator"></swimlane>
   <swimlane name="secretary">
      <assignment actor-id="#{bpm_assignee.properties['cm:userName']}" />
   </swimlane>
   <swimlane name="manager">
      <assignment actor-id="#{bpm_assignee.properties['cm:userName']}" />  
   </swimlane>
   <swimlane name="chief">
      <assignment actor-id="#{bpm_assignee.properties['cm:userName']}" />  
   </swimlane>
   <swimlane name="officer">
      <assignment actor-id="#{bpm_assignee.properties['cm:userName']}" /> 
   </swimlane>
  
   <start-state name="start">
      <task name="wf:enterDocTask" swimlane="initiator"></task>
      <transition name="" to="preProcessDoc"></transition>
   </start-state>
   <task-node name="preProcessDoc">
      <task name="wf:preProcessDocTask" swimlane="secretary"></task>
      <transition name="processDocTrans" to="processDoc"></transition>
   </task-node>
   <task-node name="processDoc">
      <task name="wf:processDocTask" swimlane="manager"></task>
      <transition name="reviewTrans" to="check"></transition>
   </task-node>
   <task-node name="check">
      <task name="wf:checkTask" swimlane="chief"></task>
      <transition name="publishTrans" to="publish"></transition>
   </task-node>
   <task-node name="publish">
      <task name="wf:publishTask" swimlane="officer"></task>
      <transition name="" to="end"></transition>
   </task-node>
   <end-state name="end"></end-state>  
</process-definition>

Task model:

   <type name="wf:enterDocTask">
         <parent>bpm:startTask</parent>
         <mandatory-aspects>
            <aspect>bpm:assignee</aspect>
         </mandatory-aspects>
      </type>

      <type name="wf:preProcessDocTask">
         <parent>bpm:workflowTask</parent>
         <overrides>
            <property name="bpm:packageItemActionGroup">
               <default>edit_package_item_actions</default>
            </property>
         </overrides>
       <mandatory-aspects>
            <aspect>bpm:assignee</aspect>
         </mandatory-aspects>
      </type>
     
      <type name="wf:processDocTask">
         <parent>bpm:workflowTask</parent>
         <overrides>
            <property name="bpm:packageItemActionGroup">
               <default>edit_package_item_actions</default>
            </property>
         </overrides>
       <mandatory-aspects>
            <aspect>bpm:assignee</aspect>
         </mandatory-aspects>
      </type>
     
      <type name="wf:reviewTask">
         <parent>bpm:workflowTask</parent>
         <overrides>
            <property name="bpm:packageItemActionGroup">
               <default>edit_package_item_actions</default>
            </property>
         </overrides>
      </type>

      <type name="wf:checkTask">
         <parent>bpm:workflowTask</parent>
         <overrides>
            <property name="bpm:packageItemActionGroup">
               <default>edit_package_item_actions</default>
            </property>
         </overrides>
      </type>  

Outcomes