AnsweredAssumed Answered

Process state is not getting changed in callback context but it is changed after callback end

Question asked by nal_raj on Oct 27, 2015
Latest reply on Oct 28, 2015 by jbarrez
PF Attached Test-Case in activiti-example.zip , run with 5.18.0 and 5.9 by changing dependency in pom.xml

https://github.com/nal-raj/Activiti-demo ->(Project and issue-PPT)

I have created sample demo to reproduce that issue, which we were talking long time (https://forums.activiti.org/comment/31757#comment-31757)
Now Issue is more apparent that- > "Process state is not getting changed in callback context but it is changed after callback end ".

Behavior quite different in 5.18.0 as compared to 5.9.0

In Activiti 5.18.0 -> When we callback "Items" flow from "Order" flow for Signout state (After taskService.complete(taskID)) We tried to get its output before callback end..I can see that "Items" flow's state is not changed, its still previous state i.e. "InProgress". Once callback end , state is getting changed.

But in Activiti 5.9 -> State getting changed before callback end and obviously after callback end .

Now I want same behavior in activiti 5.18.0 as well, because before callback end, based on state changed..i am executing some other business logic.

Test case will not fail in either case i.e. Activiti 5.9 and Activiti 5.18.0 , because assert in test case executes after callback… SO that i have printed output in console.

Please help.

Outcomes