AnsweredAssumed Answered

TaskListener event call two times

Question asked by sarkar92 on Aug 5, 2013
Latest reply on Aug 5, 2013 by frederikheremans1
I am using activiti 5.12

Below the "UserTask" which i have in my process….


<userTask id="usertask1" name="Service Request" activiti:assignee="${assignee}">
        <extensionElements>
          <activiti:formProperty id="fullName" name="Full Name" expression="${fullName}" writable="false"></activiti:formProperty>
          <activiti:formProperty id="email" name="Email" expression="${email}" writable="false"></activiti:formProperty>
          <activiti:formProperty id="department" name="Department" expression="${department}" writable="false"></activiti:formProperty>
          <activiti:formProperty id="requestFor" name="Request For" expression="${requestFor}" writable="false"></activiti:formProperty>
          <activiti:formProperty id="serviceID" name="Service ID" expression="${serviceID}" writable="false"></activiti:formProperty>
          <activiti:formProperty id="orderID" name="Order ID" expression="${orderID}" writable="false"></activiti:formProperty>
          <activiti:formProperty id="requestType" name="Request Type" expression="${requestType}" writable="false"></activiti:formProperty>
          <activiti:formProperty id="decision" name="Do you approve the request ?" type="enum">
            <activiti:value id="true" name="Yes"></activiti:value>
            <activiti:value id="false" name="No"></activiti:value>
          </activiti:formProperty>
          <activiti:taskListener event="complete" class="net.sysvana.workflow.common.EndListener"></activiti:taskListener>
          <activiti:taskListener event="assignment" class="net.sysvana.workflow.common.SettingTaskOwner"></activiti:taskListener>
        </extensionElements>
      </userTask>


the problem is at the time of assigning user  a task "TaskListener" event "assignment" autometically called at set owner of that task.
but when user complete their task after calling the event "complete",  "TaskListener" again call the event "assignment".

I dont know why this happening???

Outcomes