cancel
Showing results for 
Search instead for 
Did you mean: 

Need to store my own objects in the system

sinabdeev
Champ in-the-making
Champ in-the-making
Hi,
I am using activiti-rest.war
I need to store my own objects in the system. These objects are surveys. Each survey contain list of question. A question is a par: question itself and answer.
I suppose to work with my own objects from Java Service Task.
How can store such list of surveys in the system.

Please, point me into appropriate article in the guide or book.

Thanks.
1 REPLY 1

hari
Star Contributor
Star Contributor
Hi,

You may refer to this here -> http://activiti.org/userguide/index.html#apiVariables
You can use execution.setVariable(String variableName, Object value) to store your variables.
Say for example you have a list of survey entries that you want to store then you can have a surveyEntries array list of type Survey objects and you can add these variables to the process instance using
execution.setVariable("SurveyList",surveyEntries);