How to assign user to task

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2006 04:09 AM
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:
Task model:
[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>
Labels:
- Labels:
-
Archive
7 REPLIES 7

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2006 07:42 AM
Hi,
You need to configure the UI dialog for each of your new tasks to allow the user to select the next workflow participant.
e.g.
in web-client-config-properties.xml, add the following for your "Pre Process" task…
<config evaluator="node-type" condition="wf
reProcessDocTask" replace="true">
<property-sheet>
<separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
<show-property name="bpm:workflowDescription" component-generator="TextAreaGenerator" />
<separator name="sep2" display-label-id="users_and_roles" component-generator="HeaderSeparatorGenerator" />
<show-association name="bpm:assignee" />
</property-sheet>
</config>
and repeat for your other tasks. Each task dialog can display/edit its own set of properties.
Just one comment on your definition. I see you're re-using bpm_assignee in each of the tasks. That's ok with your serial process, however, the bpm_assignee will be overwritten in each step. If you want to maintain all the assignees during the workflow, and refer to them later on, you can use a different association name for each.
You need to configure the UI dialog for each of your new tasks to allow the user to select the next workflow participant.
e.g.
in web-client-config-properties.xml, add the following for your "Pre Process" task…
<config evaluator="node-type" condition="wf

<property-sheet>
<separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
<show-property name="bpm:workflowDescription" component-generator="TextAreaGenerator" />
<separator name="sep2" display-label-id="users_and_roles" component-generator="HeaderSeparatorGenerator" />
<show-association name="bpm:assignee" />
</property-sheet>
</config>
and repeat for your other tasks. Each task dialog can display/edit its own set of properties.
Just one comment on your definition. I see you're re-using bpm_assignee in each of the tasks. That's ok with your serial process, however, the bpm_assignee will be overwritten in each step. If you want to maintain all the assignees during the workflow, and refer to them later on, you can use a different association name for each.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2006 01:26 AM
Thank you, David. It's working now.
Thank you for the comment, I will need to define aspects for each step.
Thank you for the comment, I will need to define aspects for each step.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2006 07:00 AM
Btw, you don't have to define an aspect. You can just add an association directly to your task definitions.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2006 10:10 AM
Can you explain (with an example if it's possible) how to define a different association name for each assignee in the workflow.
Thank you very much for the response.
Hope it will be quick!
Ciao!
Thank you very much for the response.
Hope it will be quick!
Ciao!

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2006 11:51 AM
You can define a model something like…
<model … <type name="wf:submitTask"> … <associations> <association name="wf:reviewer"> <title>Reviewer</title> <source> <mandatory>false</mandatory> <many>false</many> </source> <target> <class>cm:person</class> <mandatory>true</mandatory> <many>false</many> </target> </association> <association name="wf:manager"> <title>Manager</title> <source> <mandatory>false</mandatory> <many>false</many> </source> <target> <class>cm:person</class> <mandatory>true</mandatory> <many>false</many> </target> </association> </associations> </type></model>
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2007 08:31 AM
Hi,
I've tried everything in this post.
The first reviewer can add other reviewers to the workflow, but the workflow is never send to those reviewers.
Any idea what went wrong?
Sofie
I've tried everything in this post.
The first reviewer can add other reviewers to the workflow, but the workflow is never send to those reviewers.
Any idea what went wrong?
Sofie
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2007 08:56 AM
I'm sorry I forgot the code:
workflowModel.xml
web-client-config-properties.xml
workflowModel.xml
<type name="wf:checkBillTask"> <parent>bpm:startTask</parent> <!– <overrides> <property name="bpm:packageItemActionGroup"> <default>edit_package_item_actions</default> </property> </overrides> –> <mandatory-aspects> <aspect>bpm:assignees</aspect> </mandatory-aspects> </type>
web-client-config-properties.xml
<config evaluator="node-type" condition="wf:checkBillTask" replace="true"> <property-sheet> <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" /> <show-property name="bpm:taskId" /> <show-property name="bpm:description" component-generator="TextAreaGenerator" read-only="true"/> <show-property name="bpm:dueDate" read-only="true"/> <show-property name="bpm:priority" read-only="true" /> <show-property name="bpm:status" /> <separator name="sep2" display-label-id="users_and_roles" component-generator="HeaderSeparatorGenerator" /> <show-association name="bpm:assignees" /> </property-sheet> </config>
