<?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 Re: flow and db transaction? in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/flow-and-db-transaction/m-p/2978#M902</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vipi, jus remember, Activiti is a general purpose workflow engine. People use it for high speed straight through processing, user based processes, data translation and mediation and god know how many other things. Think of it as a general purpose state machine with a visual state definition language.&lt;BR /&gt;Many processes have no need to updating external systems, and those that do, tend to use services to abstract the business logic from the crud or boiler plate code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are looking for a general purpose SQL JavaDelegate, you can write one in &amp;lt; 20 lines of code using Springs JDBCTemplate classes (&lt;A class="link-titled" href="https://docs.spring.io/spring/docs/current/spring-framework-reference/html/jdbc.html" title="https://docs.spring.io/spring/docs/current/spring-framework-reference/html/jdbc.html" rel="nofollow noopener noreferrer"&gt;19.&amp;nbsp;Data access with JDBC&lt;/A&gt;&amp;nbsp;). Setup inputs as the schema name, sql and list of parameters and transform the resultset into JSON and you have a simple general purpose service that you can throw anything at. IMO, this isnt a good approach as it puts CRUD logic into the business process, but it is an option if you are just trying to hack something together (can't say I havent use the approach).&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Jan 2017 15:40:19 GMT</pubDate>
    <dc:creator>gdharley</dc:creator>
    <dc:date>2017-01-13T15:40:19Z</dc:date>
    <item>
      <title>flow and db transaction?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/flow-and-db-transaction/m-p/2975#M899</link>
      <description>Hello guys,Please help me to get rid of my darkness. I am new to Activiti and BPMN and i am apologizing for this in advance. I have installed eclipse activiti designer, i have managed to get activiti-explorer 5.22 up &amp;amp;&amp;nbsp;running on jboss together with activit-rest ,all works fine, db is&amp;nbsp;oracle. Bu</description>
      <pubDate>Thu, 12 Jan 2017 12:46:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/flow-and-db-transaction/m-p/2975#M899</guid>
      <dc:creator>vipi_voxa</dc:creator>
      <dc:date>2017-01-12T12:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: flow and db transaction?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/flow-and-db-transaction/m-p/2976#M900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Vipl,&lt;/P&gt;&lt;P&gt;Certainly a script task can handle the update, but that is not really the intent of a script task.&lt;/P&gt;&lt;P&gt;What you need to do is either create a JavaDelegate to be called as a service task or a Spring bean that can be called as a delegateExpression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's likely within your process you will have a number of database CRUD operations, so you may choose to write a generic service task, or a separate one for each table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A second option is to hook into the iBatis layer to create custom ibatis mappings and create associated persistence entities or you can use the managementService.executeCustomSql() (&lt;A class="link-titled" href="https://www.activiti.org/userguide/#advanced.custom.sql.queries" title="https://www.activiti.org/userguide/#advanced.custom.sql.queries" rel="nofollow noopener noreferrer"&gt;Activiti User Guide - execute custom sql&lt;/A&gt;&amp;nbsp;) call.&lt;BR /&gt;The limitation you have with the iBatis approach is that the tables must live in the Activiti database (or have views exposed there).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The third approach (probably my favorite) is to take advantage of the activiti JPA interface (&lt;A class="link-titled" href="https://www.activiti.org/userguide/#_jpa" title="https://www.activiti.org/userguide/#_jpa" rel="nofollow noopener noreferrer"&gt;Activiti User Guide - JPA&lt;/A&gt;&amp;nbsp;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see, there are multiple approaches depending on your scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2017 22:01:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/flow-and-db-transaction/m-p/2976#M900</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2017-01-12T22:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: flow and db transaction?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/flow-and-db-transaction/m-p/2977#M901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Greg for detailed explanations and useful links!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it all seems a bit cumbersome from a first look, especially if i am looking not just for crud operations (just provided &amp;nbsp;very simplistic example for the start) on table but rather calling sql package methods.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2017 15:06:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/flow-and-db-transaction/m-p/2977#M901</guid>
      <dc:creator>vipi_voxa</dc:creator>
      <dc:date>2017-01-13T15:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: flow and db transaction?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/flow-and-db-transaction/m-p/2978#M902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vipi, jus remember, Activiti is a general purpose workflow engine. People use it for high speed straight through processing, user based processes, data translation and mediation and god know how many other things. Think of it as a general purpose state machine with a visual state definition language.&lt;BR /&gt;Many processes have no need to updating external systems, and those that do, tend to use services to abstract the business logic from the crud or boiler plate code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are looking for a general purpose SQL JavaDelegate, you can write one in &amp;lt; 20 lines of code using Springs JDBCTemplate classes (&lt;A class="link-titled" href="https://docs.spring.io/spring/docs/current/spring-framework-reference/html/jdbc.html" title="https://docs.spring.io/spring/docs/current/spring-framework-reference/html/jdbc.html" rel="nofollow noopener noreferrer"&gt;19.&amp;nbsp;Data access with JDBC&lt;/A&gt;&amp;nbsp;). Setup inputs as the schema name, sql and list of parameters and transform the resultset into JSON and you have a simple general purpose service that you can throw anything at. IMO, this isnt a good approach as it puts CRUD logic into the business process, but it is an option if you are just trying to hack something together (can't say I havent use the approach).&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2017 15:40:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/flow-and-db-transaction/m-p/2978#M902</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2017-01-13T15:40:19Z</dc:date>
    </item>
  </channel>
</rss>

