cancel
Showing results for 
Search instead for 
Did you mean: 

Determine who carried out work for pooled task

boneill
Star Contributor
Star Contributor
Hi Guys,

I have an activiti workflow that has a pooled task (architecture Review).  So the task can be carried out by anyone in the assigned group.  The user can select Approve or Reject etc.    See type for task below.

My requirement is that the next task that occurs will be performed by the same user that carried out the Architecture Review task.  How can I determine who carried out the previous task.  I have noted that bpm_assignee only has a value if a member of the pooled group "Accepts" the task prior to working  on it.  However no value is present if the user just pushsed approve button.

<type name="seedim:archReview">
            <parent>bpm:activitiOutcomeTask</parent>
            <properties>
                <property name="seedim:archReviewOutcome">
                    <type>d:text</type>
                    <default>Approve</default>
                    <constraints>
                        <constraint name="seedim:archReviewOutcomeOptions" type="LIST">
                            <parameter name="allowedValues">
                                <list>
                                    <value>Approve</value>
                                    <value>Reject</value>
                                </list>
                            </parameter>
                        </constraint>
                    </constraints>
                </property>
            </properties>
            <overrides>
                <property name="bpm:packageItemActionGroup">
                    <default>edit_and_remove_package_item_actions</default>
                </property>
                <property name="bpm:outcomePropertyName">
                    <default>{http://www.seedim.com.au/model/workflow/1.0}archReviewOutcome</default>
                </property>
            </overrides>
        </type>

Regards
2 REPLIES 2

boneill
Star Contributor
Star Contributor
Hi Guys,

Can anyone from Alfresco help me with this.  It seems like a common requirement when using  a pooled task.  Is there a way of determining who was the performer of a pooled task on completion of the task.  

Regards

jmiranda
Champ in-the-making
Champ in-the-making
Hi

You can save who completed the task, after that, you can get the name, email… :

   <task-node name="Test">
     <task name="wf:test" swimlane="anyone">
               <event type="task-end">
                    <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
                        <script>
                           <variable name="wf_mytask" access="write"/>
                           <expression>
                               wf_mytask = taskInstance.actorId;                               
                            </expression>
                        </script>
                    </action>
                </event>    
     </task>
      <transition name="toNext" to="next">                  
         <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
            <script>
               <expression>         
                                          var email = people.getPerson(wf_mytask).properties.email;
                                          var name = people.getPerson(wf_mytask).properties.firstName+" "+people.getPerson(wf_mytask).properties.lastName;
                                        </expression>
                               </script>
                        </action>
                 </transition>

Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.