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 :

bpmn:

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

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);
delegateTask.setAssignee(leader);
}

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 .

ACT_RU_TASK :

ACT_HI_TASKINST  :

Do I miss anything for this scenario ?

 

 

Regards

   Jingchao

Outcomes