AnsweredAssumed Answered

Transaction propagation issues

Question asked by drams on May 6, 2013
Latest reply on May 13, 2013 by frederikheremans1
We are using two seperate (XA) datasources, one with our business data and one with our Activiti scheme.
We are passing the same JTA transaction manager to Activti through the SpringProcessEngineConfiguration.

It seems that Activiti is creating a new transaction when starting a workflow so we can't see that data that is already persisted in the running transaction.

How can we force Activiti to use the current existing transaction? 
We are running on a JBoss 5.2 platform and using an Oracle database.

Our configuration:


@Inject
  @Named("dataSourceBpm")
  private DataSource dataSourceBpm;

  @Bean
  public SpringProcessEngineConfiguration processEngineConfiguration() {
    SpringProcessEngineConfiguration processEngineConfiguration = new SpringProcessEngineConfiguration();

    processEngineConfiguration.setDataSource(dataSourceBpm);
    processEngineConfiguration.setTransactionManager(transactionManager);
    processEngineConfiguration.setDatabaseSchemaUpdate("true");
    processEngineConfiguration.setJobExecutorActivate(true);
    processEngineConfiguration.setTransactionsExternallyManaged(true);

    processEngineConfiguration.setHistoryLevel(HistoryLevel.AUDIT);
    return processEngineConfiguration;
  }

Outcomes