Hi,
the exception says:
org.flowable.engine.common.api.FlowableException: couldn't find a variable type that is able to serialize [object Array]
at org.flowable.engine.impl.variable.DefaultVariableTypes.findVariableType(DefaultVariableTypes.java:62)
at org.flowable.engine.impl.persistence.entity.VariableScopeImpl.createVariableInstance(VariableScopeImpl.java:863)
at org.flowable.engine.impl.persistence.entity.ExecutionEntityImpl.createVariableInstance(ExecutionEntityImpl.java:531)
at org.flowable.engine.impl.persistence.entity.VariableScopeImpl.createVariableLocal(VariableScopeImpl.java:784)
at org.flowable.engine.impl.persistence.entity.VariableScopeImpl.setVariable(VariableScopeImpl.java:662)
at org.flowable.engine.impl.persistence.entity.VariableScopeImpl.setVariable(VariableScopeImpl.java:654)
You can easily add new type support in ProcessEngineConfiguration.
See org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl#initVariableTypes
public void initVariableTypes() {
if (variableTypes == null) {
variableTypes = new DefaultVariableTypes();
if (customPreVariableTypes != null) {
for (VariableType customVariableType : customPreVariableTypes) {
variableTypes.addType(customVariableType);
}
}
variableTypes.addType(new NullType());
variableTypes.addType(new StringType(getMaxLengthString()));
variableTypes.addType(new LongStringType(getMaxLengthString() + 1));
The example in the jUnit test is org.flowable.examples.variables.VariablesTest#testBasicVariableOperations
Regards
Martin