I have this declared as my start task for a workflow:
<startEvent id="StartWriteMessage" name="Start" activiti:formKey="elpwf:startAndAssignUser">
<extensionElements>
<activiti:taskListener xsi:type="xsd:anyType" event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field xsi:type="xsd:anyType" name="script">
<activiti:string xsi:type="xsd:anyType">execution.setVariable('elpwf_assignUser', task.getVariable('elpwf_assignUser'));</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
<outgoing>SequenceFlow_1</outgoing>
</startEvent>When I start the workflow and use the Alfresco WorkflowService to get the start task instance like this:
WorkflowTask task = workflowService.getStartTask(workflowInstanceId);
String name = task.getName();
logger.debug("task name is:{}",name);That is printing "elpwf:startAndAssignUser" and I am obviously expecting "Start" (The name in the deffinition) and not the formKey.
What am I doing wrong?