AnsweredAssumed Answered

Flexible task assignment

Question asked by birgir on Feb 22, 2008

I have a process where I would ideally like to have each task either assigned to a group/team or an individual depending on a javascript process variable.

Sounds simple but I have had problems getting this to work.

Is it not possible to assign all tasks to their default groups in the process definition and use taskInstance.actorId = the_user_name to re-assign dynamically within the same task ?

What I want to do is something along these lines. Pretty simple, but havent been succesfull. Any suggestions.

<task-node name="review">
<task name="piwf:artistPool" swimlane="some_group" />
       <event type="node-enter">
           <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
                    var actor = executionContext.getVariable("actor")
                    if(actor != null)
                        // The task goes off the to-do list of some_group and appears for the actor
                        taskInstance.actorId = actor;

</task-node >