our following problem seems very simple but extremely fundamental. I actually cannot believe that all other Activiti-Users really live with that...We use Activiti 5.22.
In our Business Process, there is a ServiceTask that writes a process variable and on the gateway that comes directly afterwards, that process variable is checked to decide if we continue left or right.
In terms of transactions, the condition is checked within the same transaction as the ServiceTask that wrote the PV. We have „ReadCommitted“ isolation level for our XA-Datasource but any data written from the same TX should of course be visible. For us, this is NOT the case.
Instead, we have to add an artificial empty ServiceTask that is just marked as „async = true“ so that the transaction gets committed before the evaluation of the condition takes place.
The point is, that it is very ugly to pollute the Business process models with lots of those artificial ServiceTasks. This cannot be the way executable BPMN was meant to be.
Any ideas for avoiding the artificial ServiceTasks are welcome!