<?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 Data from a table in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/data-from-a-table/m-p/187770#M140900</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, we have integrated our application with Activiti (V 5.17) and we are using Activiti REST for all the tasks (starting the process, adding process variables…etc).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One of the process definitions that we are going to create need to fetch data from a database table.&amp;nbsp; This data will be same for all the process instances.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One of the options I thought was adding a Java Service task in the Process Definition that will fetch the necessary data from the table and store the same in a process variable.&amp;nbsp; But I see two issues with this approach.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Since the data is same for all the process instances, I will be calling the database for every process instance that I create, which is not efficient.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. The data is name/value pairs and I can store this as a Map in Process variable (from Java Service Task).&amp;nbsp; But this will be stored as a Serializable object in Activiti DB which I will not be able to easily utilize in a step in process (I want to show this data in a drop-down).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kindly suggest a better approach.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Oct 2015 09:28:02 GMT</pubDate>
    <dc:creator>anjan</dc:creator>
    <dc:date>2015-10-07T09:28:02Z</dc:date>
    <item>
      <title>Data from a table</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/data-from-a-table/m-p/187770#M140900</link>
      <description>Hi, we have integrated our application with Activiti (V 5.17) and we are using Activiti REST for all the tasks (starting the process, adding process variables…etc).One of the process definitions that we are going to create need to fetch data from a database table.&amp;nbsp; This data will be same for all the</description>
      <pubDate>Wed, 07 Oct 2015 09:28:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/data-from-a-table/m-p/187770#M140900</guid>
      <dc:creator>anjan</dc:creator>
      <dc:date>2015-10-07T09:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: Data from a table</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/data-from-a-table/m-p/187771#M140901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Anjan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are many possibilities. At least two of them:&lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;&lt;LI&gt;Spring bean&lt;/LI&gt;&lt;LI&gt;JPA integration&lt;/LI&gt;&lt;/UL&gt;&lt;SPAN&gt;Read activiti doc please.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2015 08:40:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/data-from-a-table/m-p/187771#M140901</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2015-10-08T08:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: Data from a table</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/data-from-a-table/m-p/187772#M140902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;1. If the data is the same for all instances, why not add your own cache for it that is used in the service task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. In that case, i'd store it as a json string&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2015 08:50:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/data-from-a-table/m-p/187772#M140902</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2015-10-08T08:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Data from a table</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/data-from-a-table/m-p/187773#M140903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Martin, I thought about JPA integration.&amp;nbsp; But my use case is just a read from the table, so I thought JPA might be an overkill.&amp;nbsp; But I will think about it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Joram, caching is a good idea.&amp;nbsp; Are you suggesting me to add this cache on the JVM where Activiti is running (our application and Activiti are running in a separate JVM)?&amp;nbsp; If so, can you please throw some light on how to do this.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2015 09:17:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/data-from-a-table/m-p/187773#M140903</guid>
      <dc:creator>anjan</dc:creator>
      <dc:date>2015-10-08T09:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: Data from a table</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/data-from-a-table/m-p/187774#M140904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Joram, are you suggesting that I can keep the json string as an instance variable in my Java Service Task.&amp;nbsp; If the variable is not initialized, initialize the same, otherwise re-use it.&amp;nbsp; Is it advisable to keep instance variable in the Java Service Task.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2015 11:47:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/data-from-a-table/m-p/187774#M140904</guid>
      <dc:creator>anjan</dc:creator>
      <dc:date>2015-10-08T11:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: Data from a table</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/data-from-a-table/m-p/187775#M140905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;anjan: service tasks are stateless, so you'd have to make it a bit smarter than just a static value, but it all depends on your use case of course.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My comment about json was for the 'storing as Serializable': storing as serializable is not a good idea, hence why i suggested a json representation. However, reading your post, it seems you don't need to have it as a process variable, but some smart caching logic should suffice.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 10:28:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/data-from-a-table/m-p/187775#M140905</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2015-10-13T10:28:20Z</dc:date>
    </item>
  </channel>
</rss>

