<?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 transaction example question (from user guide) in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/transaction-example-question-from-user-guide/m-p/158014#M112150</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; In the example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // here you can do transactional stuff in your domain model&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // and it will be combined in the same transaction as &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // the startProcessInstanceByKey to the Activiti RuntimeService&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;public class UserBean {&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; /** injected by Spring */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; private RuntimeService runtimeService;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; @Transactional&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; public void hello() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; runtimeService.startProcessInstanceByKey("helloProcess");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; public void setRuntimeService(RuntimeService runtimeService) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.runtimeService = runtimeService;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Question:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In the example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Originated transaction started, once @Transactional encountered in the user bean.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then Process transaction context taken from the originated transaction.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it working in opposite way, example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Suppose we have a process instance, starting NOT in the bean, like in the example above,but that uses this UserBean from, say, some ServiceTask within the process.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is transaction context taken from the process instance and used in the method call of UserBean?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Mar 2014 15:15:02 GMT</pubDate>
    <dc:creator>beep02</dc:creator>
    <dc:date>2014-03-19T15:15:02Z</dc:date>
    <item>
      <title>transaction example question (from user guide)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/transaction-example-question-from-user-guide/m-p/158014#M112150</link>
      <description>&amp;nbsp;&amp;nbsp;&amp;nbsp; In the example:&amp;nbsp;&amp;nbsp;&amp;nbsp; // here you can do transactional stuff in your domain model&amp;nbsp;&amp;nbsp;&amp;nbsp; // and it will be combined in the same transaction as &amp;nbsp;&amp;nbsp;&amp;nbsp; // the startProcessInstanceByKey to the Activiti RuntimeServicepublic class UserBean {&amp;nbsp; /** injected by Spring */&amp;nbsp; private RuntimeService runtimeService;&amp;nbsp; @</description>
      <pubDate>Wed, 19 Mar 2014 15:15:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/transaction-example-question-from-user-guide/m-p/158014#M112150</guid>
      <dc:creator>beep02</dc:creator>
      <dc:date>2014-03-19T15:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: transaction example question (from user guide)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/transaction-example-question-from-user-guide/m-p/158015#M112151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes. If the bean is marked with @Transactional, and activiti has been configured with a correct and working transactionManager, this will use the same transaction&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2014 12:32:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/transaction-example-question-from-user-guide/m-p/158015#M112151</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2014-03-24T12:32:45Z</dc:date>
    </item>
  </channel>
</rss>

