<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Activiti 6 async process - transaction control in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/activiti-6-async-process-transaction-control/m-p/41015#M17198</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;1. I have simple proces where the first serivce task (interface JavaDelegate) is set as async (so the whole process is asynchronic).&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;Activiti 6 with Spring Boot and I use spring-boot-starter-data-jpa.&lt;/P&gt;&lt;P&gt;3. I have one more table of my own in the same database schema as Activiti. So I also use one @Repository bean class with&amp;nbsp;@Transactional annotation.&lt;/P&gt;&lt;P&gt;When I try to make a selection on this table, I get an error:&amp;nbsp;&lt;STRONG&gt;javax.persistence.TransactionRequiredException: no transaction is in progress.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;3.&amp;nbsp;Note: If I start the process synchronously (the first User Task &lt;STRONG&gt;is not marked&lt;/STRONG&gt; as async), everything works fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My setup:&lt;/P&gt;&lt;PRE&gt;SpringProcessEngineConfiguration cfg = &lt;SPAN&gt;new &lt;/SPAN&gt;SpringProcessEngineConfiguration()&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;HikariDataSource ds = (HikariDataSource) &lt;SPAN&gt;dataSource&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;cfg.setDatabaseSchema(&lt;SPAN&gt;activitiUserName&lt;/SPAN&gt;)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;cfg.setAsyncExecutorActivate(&lt;SPAN&gt;true&lt;/SPAN&gt;)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;cfg.setDataSource(ds)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;cfg.setProcessEngineName(&lt;SPAN&gt;processEngineName&lt;/SPAN&gt;)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;cfg.setHistoryLevel(HistoryLevel.&lt;SPAN&gt;FULL&lt;/SPAN&gt;)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;cfg.setDatabaseSchemaUpdate(ProcessEngineConfiguration.&lt;SPAN&gt;DB_SCHEMA_UPDATE_TRUE&lt;/SPAN&gt;)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;cfg.setTransactionManager(&lt;SPAN&gt;txManager&lt;/SPAN&gt;)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;cfg.setBeans(&lt;SPAN&gt;new &lt;/SPAN&gt;SpringBeanFactoryProxyMap(&lt;SPAN&gt;applicationContext&lt;/SPAN&gt;))&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;ProcessEngine engine = cfg.buildProcessEngine()&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Please tell me why I have trouble retrieving data from the table in the asynchronous process?&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jun 2020 09:23:13 GMT</pubDate>
    <dc:creator>artur17</dc:creator>
    <dc:date>2020-06-23T09:23:13Z</dc:date>
    <item>
      <title>Activiti 6 async process - transaction control</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/activiti-6-async-process-transaction-control/m-p/41015#M17198</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;1. I have simple proces where the first serivce task (interface JavaDelegate) is set as async (so the whole process is asynchronic).&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;Activiti 6 with Spring Boot and I use spring-boot-starter-data-jpa.&lt;/P&gt;&lt;P&gt;3. I have one more table of my own in the same database schema as Activiti. So I also use one @Repository bean class with&amp;nbsp;@Transactional annotation.&lt;/P&gt;&lt;P&gt;When I try to make a selection on this table, I get an error:&amp;nbsp;&lt;STRONG&gt;javax.persistence.TransactionRequiredException: no transaction is in progress.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;3.&amp;nbsp;Note: If I start the process synchronously (the first User Task &lt;STRONG&gt;is not marked&lt;/STRONG&gt; as async), everything works fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My setup:&lt;/P&gt;&lt;PRE&gt;SpringProcessEngineConfiguration cfg = &lt;SPAN&gt;new &lt;/SPAN&gt;SpringProcessEngineConfiguration()&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;HikariDataSource ds = (HikariDataSource) &lt;SPAN&gt;dataSource&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;cfg.setDatabaseSchema(&lt;SPAN&gt;activitiUserName&lt;/SPAN&gt;)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;cfg.setAsyncExecutorActivate(&lt;SPAN&gt;true&lt;/SPAN&gt;)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;cfg.setDataSource(ds)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;cfg.setProcessEngineName(&lt;SPAN&gt;processEngineName&lt;/SPAN&gt;)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;cfg.setHistoryLevel(HistoryLevel.&lt;SPAN&gt;FULL&lt;/SPAN&gt;)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;cfg.setDatabaseSchemaUpdate(ProcessEngineConfiguration.&lt;SPAN&gt;DB_SCHEMA_UPDATE_TRUE&lt;/SPAN&gt;)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;cfg.setTransactionManager(&lt;SPAN&gt;txManager&lt;/SPAN&gt;)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;cfg.setBeans(&lt;SPAN&gt;new &lt;/SPAN&gt;SpringBeanFactoryProxyMap(&lt;SPAN&gt;applicationContext&lt;/SPAN&gt;))&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;ProcessEngine engine = cfg.buildProcessEngine()&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Please tell me why I have trouble retrieving data from the table in the asynchronous process?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2020 09:23:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/activiti-6-async-process-transaction-control/m-p/41015#M17198</guid>
      <dc:creator>artur17</dc:creator>
      <dc:date>2020-06-23T09:23:13Z</dc:date>
    </item>
  </channel>
</rss>

