cancel
Showing results for 
Search instead for 
Did you mean: 

Direct Task Assignment

tfitzpatrick
Champ in-the-making
Champ in-the-making
I have a need to directly assign a task to a user from a variable and was looking for an example.

I have tried a number of variations of something like this:

taskInstance.actorId = varUser;

unfortunately the combinations of assignments that I have used has caused the workflows to go off into space and only the Admin can see it. (the most frustrating part of this, is that I know I did the assignment a month or so ago and lost track of the syntax)

Any chance anyone would have an example like this?

Regards,

Tom
2 REPLIES 2

tfitzpatrick
Champ in-the-making
Champ in-the-making
Solved:

The goal was to take a value determined in another node and pass that along the workflow so that the next node would be assigned to the right person.  The variable that I used was "Next Participant".  After looking deeper into the issue, I found a couple of other ways that I can accomplish the same thing which I need to explore in greater detail…

    <swimlane name="Peer">
        <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
           <!– <actor>#{people.getPerson("tom").properties["cm:userName"]}</actor> –>
           <actor>#{people.getPerson(NextParticipant).properties["cm:userName"]}</actor>
        </assignment>
    </swimlane>
   
   <task-node name="Awaiting Doc Review">
       <task name="ygrd:awaitingDocReview" swimlane="Peer"/>

tfitzpatrick
Champ in-the-making
Champ in-the-making
As mentioned in my earlier posts there are a number of ways to directly assign a task to a user and below you will find another solution.

   <task-node name="Awaiting Doc Review">
         <task name="ygrd:awaitingDocReview">
            <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
               <actor>#{people.getPerson(NextParticipant).properties["cm:userName"]}</actor>
            </assignment>