cancel
Showing results for 
Search instead for 
Did you mean: 

Custom serialized process variables activiti-rest getting "null"

abilashdivisote
Champ in-the-making
Champ in-the-making

Hi all, I'm new to activiti and bmpn concepts, I was trying to integrate Activiti-rest with my spring boot application, the issue is with custom serialized variable objects (inheriting ByteaArrayType or Serializable both tried). the  process variables are successfully persisting on mysql DB but when i make a rest call to list all of my process instance variables I'm getting the serialize object's value as "null", somebody please help me fix this 

1 REPLY 1

edsonrichter
Confirmed Champ
Confirmed Champ

To do something similar, I had to create a custom variable serializer.

Fortunately, that is really simples, and you can get plenty of documentation in official docs.

Your class should implement VariableType.

Then you have to declare it in Activiti.cfg.xml, something like

    <property name="customPreVariableTypes">
        <list>
            <bean class="br.com.simfreteV1.web.workflow.SimfreteTypeVariableSerializer" />
        </list>
    </property>