04-13-2017 04:42 AM
04-13-2017 11:18 AM
For future reference, for those who have the same question.
This was answered on StackOverflow earlier - that answer is as follows.
"Yes you can do it by using assignment event"
<userTask id="test" name="Assignb" activiti:assignee="userName" activiti:formKey="<<formKey>>">
<extensionElements>
<activiti:taskListener event="assignment" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string><![CDATA[
var currAssignee = task.assignee;
//gives current task assignee
logger.log(currAssignee );
]]></activiti:string></activiti:field>
</activiti:taskListener>
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string><![CDATA[var currAssignee = task.assignee;]]></activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
Hope this helps other in the future,
-JEarles
bp3
04-13-2017 11:18 AM
For future reference, for those who have the same question.
This was answered on StackOverflow earlier - that answer is as follows.
"Yes you can do it by using assignment event"
<userTask id="test" name="Assignb" activiti:assignee="userName" activiti:formKey="<<formKey>>">
<extensionElements>
<activiti:taskListener event="assignment" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string><![CDATA[
var currAssignee = task.assignee;
//gives current task assignee
logger.log(currAssignee );
]]></activiti:string></activiti:field>
</activiti:taskListener>
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string><![CDATA[var currAssignee = task.assignee;]]></activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
Hope this helps other in the future,
-JEarles
bp3
Explore our Alfresco products with the links below. Use labels to filter content by product module.