I try to use process variable, instead of DB-based mutex, to implement the same thing but it did not work during a concurrency test. The biz logic always sneaks through and executed more than once
//////////////////////////////////
public void execute(DelegateExecution execution) {
synchronized (execution) {
Boolean done = (Boolean) execution.getVariable("ConclusionDone");
if ( done) {
return;
}
execution.setVariable("ConclusionDone", true);
}
// do biz logic
}
Does that mean the variable attached to the execution/process committed in an asynchronized approach. Can someone confirm it?