Camunda data storage

In camunda, if a lot of data are associated with a task, should we try to capture the data in the task itself? or the data has to be stored in a separate table and use Camunda only to track the status?

For instance: In the below process, as part of registration, I want to capture (name, address, state, country, etc) then these data should be embedded somehow in camunda registration task itself? (or) a separate table to store the data?

What is the best practice?

1 Like

@Minisha_M, Data which are required for process execution can be stored in camunda data store. Other than that you can store in the other datasource of business application.

Form fields captured in user task forms are stored in camunda database, you can’t mark it as transient and related ticket can be found here, Transient Variable Availability.

For each active task instances, the variables are stored in ACT_RU_VARIABLE table, and the variables of completed task instances are stored in ACT_HI_VARINST table.

This post might answer your query,

1 Like

In general, I would follow the advice from the post by @hassang that only the information that the process needs itself to correctly coordinate what’s going on should be added to the variables. I created a post a while ago that describes this: http://airquill.io/2014/06/29/storing-data-in-processes/ The basic idea behind this thinking is to keep the process lean and focussed and deal with all of the concerns of the domain it’s working with in the application itself.

3 Likes

Can someone help me with, how to store the business data in a separate DB, while passing the process-related data to Camunda workflow? Thanks in advance.

you can use service tasks and write custom codes to store appropriate data in a database like mysql or postgresql.

@mrdavoodi64 Thanks for the reply. I’m actually looking for a segregate solution, like workflow engine do not have any dependency over the backend. They are isolated.