cancel
Showing results for 
Search instead for 
Did you mean: 

Force commit of process variable

lpavone
Champ in-the-making
Champ in-the-making
Hi all,
I have a question about if it's possible to force the commit of process variables in listeners executions?
I'm gonna explain my issue:
- I have a process with task "A" and task "B"… when "A" is completed, a flow execution listener (called F1 for instance) is attached in the flow taken from task "A" to "B"… after that, a task listener is executed on "create" event for task "B"…
the problem is when task listener is executed…in that moment, all the changes made for the flow listener hadn't been committed and I need use it in the task listener.
I got a null value in a process variable, but when task listener is finished, now I can see in the database the process variables committed.
Is there any solution for that???

thanks in advance!
2 REPLIES 2

trademak
Star Contributor
Star Contributor
Hi,

When you make the user task asynchronous (async="true") the task listener will be executed by the job executor and the process state will be committed before it's executed.

Best regards,

lpavone
Champ in-the-making
Champ in-the-making
thanks a lot!!