AnsweredAssumed Answered

Data from a table

Question asked by anjan on Oct 7, 2015
Latest reply on Oct 13, 2015 by jbarrez
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.  This data will be same for all the process instances. 

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.  But I see two issues with this approach.

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.

2. The data is name/value pairs and I can store this as a Map in Process variable (from Java Service Task).  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).

Kindly suggest a better approach.

Outcomes