Scenario is I have FLow1, FLow2, Flow3 bpmn20.xml with interrelated states. There is Sign-Out state in all flow.
Code configure like, If i want to signout flow1, it callback to FLow2 to signout and Flow2 callback to flow3.
Individually all flows getting sign out but from callback its not.
It's getting executed , but when i am trying to retrieve its state …i found its previous state as new state is not getting save in DB
THings working fine with Activiti 5.9 not with 5.18.0
Please see code
Called flow1 sign out->(Callback Flow2)-> Flow2 Signout-> (Callback FLow3) flow 3 signing out as follows.
getProcessHelper().signal( processId, signalFlow3Signout ); and Signal API as follows
public void signal( String processId, String signal ) {
ProcessInstance instance = runtimeService.createProcessInstanceQuery()
.processInstanceId( processId )
.singleResult();
runtimeService.setVariable( processId, USER_SIGNAL, signal );
Task task = taskService.createTaskQuery().executionId( instance.getId() ).singleResult();
String state = task.getName();
LOGGER.info( "State Change :: signal() :: Signal for State change - state: " + state + ", for execution id : "
+ instance.getId() + ", All states getProcessInstanceId: " + instance.getProcessInstanceId() + " Signal :"
+ signal );
taskService.complete( task.getId() );
instance = runtimeService.createProcessInstanceQuery().processInstanceId( processId ).singleResult();
task = taskService.createTaskQuery().executionId( instance.getId() ).singleResult();
LOGGER.info( "State Change :: signal() :: After Changed state: " + task.getName() + " for processId id : "
+ instance.getId() );
}
I am doing taskService.complete( task.getId() ); and in next step when trying to get changed state…I found state is previous one not (Sign-Out) but if i will call getProcessHelper().signal( processId, signalFlow3Signout ); standaloneits working fine to me. Then why not from callback function? Do i need to update above(Signal API)