ProcessInstance was updated by another transaction concurrently

Hello,

When completing a task i am getting the following exception:
“ProcessInstance [2505] was updated by another transaction concurrently”, but this only happens in DEV environment, in my local environment it does not happen. The database is postgres and local and DEV env share the same, however, when this occurrs, only DEV is running.

The task i am finishing is an user task

userTask id=“fichaCliente” name=“Ficha de Cliente” />

with attributes aynchornous false and exclusive true.

The orange part is the “path” that is executed when the task is finished:

I am not sure what more info i could share, if anyone can help me, i would appreciate that.

Does your DEV environment have multiple nodes? There might be something that is showing up because due to the number of nodes and an increase in async executors.

Some thoughts:

  • Your diagram is very hard to follow, the number of gateways spread across the diagram leads me to believe this would be much cleaner written as CMMN.
  • User tasks are not typically marked as asynchronous, since they force a wait point on their own. I’m not sure it would do anything but it might be causing the issue.
  • If you add a LoggingListener (new in 6.5.0) to the engine configuration, you can get some additional information in the log about the transactions that failed. Note: It will increase your logging significantly.
    @Bean
    EngineConfigurationConfigurer<SpringProcessEngineConfiguration> processEngineConfigurationEngineConfigurationConfigurer(){
        return engineConfiguration -> {
            engineConfiguration.setLoggingListener(loggingNodes -> {
                loggingNodes.stream().forEach(jsonNodes -> logger.info(jsonNodes.toString()));
            });
        };
    }

Hello, @wwitt,

I as able to find the problem. I agree that our process is complex but this was the first implementation of a BPM with flowable by our team and we didn’t have much knowledge at the time.

However, i set Asynchronous attribute in the parallel gateway (in the orange line) and everything worked perfectly.

Thanks for the help!