AnsweredAssumed Answered

Process and Task variables storage

Question asked by frankee787 on Oct 19, 2011
Latest reply on Oct 19, 2011 by trademak
Dear All,
  This is about a design choice. In all process backed applications which involves "Human Task" etc, there will definitely be process variables and task variables. These variables will hold values which are either filled in by the end user(eg: leave dates) or sometimes generated by the system(eg: document reference numbers). I understand these variables are stored as key value pairs in the Activiti database.

Question:
   1)What is the best practices when choosing the structure of these process variable? Should they just be flat key,value pairs or key,domain-object pairs? Any rule of thumb in choosing?
    2)At times it would be required to provide search across these variable values. Storing them as key,value pairs or key,domain-object pairs make it hard to search across them since there is no relational structure. How can you work around this and what is the best practice to handle this ?

Note:
  The "TaskQuery taskVariableValueEquals(String variableName, Object variableValue)" searches for task which have variables with variableName and values as variableValue . But could the query performance keep degrading as the number of process instances keep increasing?

Happened to see this article by Joram.
http://www.jorambarrez.be/blog/2008/04/03/some-real-life-jbpm-action/

The speed in completion of processes is good. However, how would querying for tasks and task which contain a specific variable value behave. I am really interested in knowing how this can be tuned .



Regards,
Franklin

Outcomes