AnsweredAssumed Answered

DelegateTask.setAssignee in TaskListener.notify() or TaskListener Expression will not affect ACT_HI_TASKINST

Question asked by danteknight on Nov 6, 2018

Hi All,


Activiti Version  : 6.0.0

I try to customize Assignee by using TaskListener ,  after doing this , I found ACT_RU_TASK work as expected but the _ASSIGNEE in table ACT_HI_TASKINST is still null. Here is the code below :


<userTask activiti:exclusive="true" id="MultiInstaceTask" name="MultiInstaceTaskN">
               <activiti:taskListener event="create" expression="${testFlowService.setAssginee(currentOp,task)}" />
         <multiInstanceLoopCharacteristics isSequential="true">
         <completionCondition><![CDATA[${testFlowService.isEnded(currentOp,needFinal) == true}]]></completionCondition>

I defined a multiInstace UserTask and use taskListener expression on "create" event,executing testFlowService.setAssginee to set the assignee:


public void setAssignee(String currentOp, DelegateTask delegateTask){
String leader = testMapper.getLeader(currentOp);

As a result, I found field ASSIGNEE in ACT_RU_TASK changed as expected but _ASSIGNEE in ACT_HI_TASKINST  is still null, and this information is important to me .



Do I miss anything for this scenario ?