I am using activiti-spring-boot-starter-basic version 5.22.0. I Have two enpoints in my controller. 1: Initializes a user task and goes into a wait state. 2: completes the user task. I have stored a serializable object before creating a user task in the 1st endpoint and stored it as a process instance variable. When I am trying to retain the serializable variable in the second endpoint with the same process instance id as used in first endpoint I get the object but the values of all the attributes in the object are being retained as null.
I have tried two methods
1. I tried using runtimeService.getVariable(instanceid,"variableName")
2. I used management service and accessed "ACT_GE_BYTEARRAY", obtained the byte_array data and converted it into Object
both the methods above gives the same results
(NOTE: The attributes of my object are not transient)
Is this a bug or m I doing something wrong?
Can we not retain serializable objects values in activiti for long?
Hello,
How are you setting the variables first? Did you add them as data objects ?
Did you check activiti_ru_variable table for the values. Also, make sure the data type you use should match when you try to retrieve. The null values are obtained only if the activiti_ru_variable table have the variable value as null.
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.