Advanced Workflow Task Asignation
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2009 12:16 PM
Is it possible to assign people to a Workflow after the <start-state> node? If it is, how could it be done?
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2009 11:23 AM
Yes,
To assign someone to a workflow through the workflow I've done something like this:
In a task, write a script similar to this:
Then when you want to assign the a task to that person, you could do so like this:
Not really sure if that's what you're looking for but hope it helps.
To assign someone to a workflow through the workflow I've done something like this:
In a task, write a script similar to this:
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript"> <script> <expression> var currentUser = (person.properties["userName"]); wf_NextParticipant = currentUser; </expression> <variable name="wf_NextParticipant" access="read,write"/> </script> </action>
All that is doing is setting the name of the current user to a variable. You could do the same with a property.Then when you want to assign the a task to that person, you could do so like this:
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment"> <actor>#{people.getPerson(NextParticipant).properties["cm:userName"]}</actor> </assignment>
Not really sure if that's what you're looking for but hope it helps.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2009 01:38 PM
Yes, that's what I was looking for, now what could it be done on the interface of the workflow so that it lists the Users and/or groups the task will be assigned to?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2009 07:49 AM
To make sure I am following you, you're looking for away to make a drop down of users in a task, so someone can assign tasks?
