AnsweredAssumed Answered

Assign task to the users defined by the Initiator

Question asked by noohulalthaf on Dec 30, 2017
Latest reply on Jan 3, 2018 by douglascrp

I have two association defined in aspect in my custom workflow model:

 

<aspect name="hxwf:multiassignaspect">
<associations>
<association name="hxwf:firstassignee">
<title>first assignee</title>
<source>
<mandatory>false</mandatory>
<many>false</many>
</source>
<target>
<class>cm:person</class>
<mandatory>true</mandatory>
<many>false</many>
</target>
</association>
<association name="hxwf:secondassignee">
<title>second assignee</title>
<source>
<mandatory>false</mandatory>
<many>false</many>
</source>
<target>
<class>cm:person</class>
<mandatory>true</mandatory>
<many>false</many>
</target>
</association>
</associations>

</aspect>

 

In my bpm Process Definition 

 

 

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
<process id="multiassignee" name="Multi Assignee" isExecutable="true">
<startEvent id="startevent1" name="Start" activiti:formKey="hxwf:starttask"></startEvent>
<userTask id="usertask1" name="First Assignee" activiti:assignee="${hxwf_firstassignee.properties.userName}">

</userTask>
<userTask id="usertask2" name="Second Assignee" activiti:assignee="${hxwf_secondassignee.properties.userName}"></userTask>
<sequenceFlow id="flow2" sourceRef="usertask1" targetRef="usertask2"></sequenceFlow>
<endEvent id="endevent1" name="End"></endEvent>
<sequenceFlow id="flow3" sourceRef="usertask2" targetRef="endevent1"></sequenceFlow>
<sequenceFlow id="flow4" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
</process>

 

But the workflow haven't started and giving me the error as '' 

 

Unknown property used in expression: ${hxwf_firstassignee.properties.userName}

 

I need to assign the task to first assignee when initiator starts workflow , then it goes to second assignee. Please help me to achieve that. Thanks in advance

Outcomes