JTA Transaction Integration
Embedded Process Engine
The process engine transaction management can integrate with JTA and Jakarta Transactions. To use transaction manager integration, you need to use the
org.eximeebpms.bpm.engine.impl.cfg.JtaProcessEngineConfigurationfor JTA integration only.org.eximeebpms.bpm.engine.impl.cfg.JakartaTransactionProcessEngineConfigurationfor Jakarta Transactions integration only.org.eximeebpms.bpm.engine.cdi.CdiJtaProcessEngineConfigurationfor additional CDI expression resolution support.
The process engine requires access to an implementation of javax.transaction.TransactionManager or jakarta.transaction.TransactionManager respectively.
To achieve JTA transaction integration on these containers, users should use the Spring Framework Abstraction and configure the process engine using the
SpringProcessEngineConfiguration.
Shared Process Engine
The shared process engine distributions for Java EE and Jakarta EE Application Servers (Wildfly, JBoss EAP) provide JTA or Jakarta Transactions integration out of the box.
Example
The following example shows how to integrate your custom business logic into a transaction of the process engine:
@Named
@Dependent
public class MyBean {
@Inject
public RuntimeService runtimeService;
@Transactional
public void doSomethingTransactional() {
// Here you can do transactional stuff in your domain model and it will be
// combined in the same transaction as the the following RuntimeService API
// call to start a process instance:
runtimeService.startProcessInstanceByKey("my-process");
}
}
