Hello,
I've tried a very basic example of serializable variable in jbpm and it throws :
Error getting variable map: An exception of type "org.jbpm.JbpmException" was thrown. The message is: couldn't deserialize object
This action is triggered on "task-start" event
package com.action.creation;
import java.util.Vector;
import org.jbpm.graph.def.ActionHandler;
import org.jbpm.graph.exe.ExecutionContext;
public class BasicAction implements ActionHandler {
private static final long serialVersionUID = 9087034555867614310L;
public void execute(ExecutionContext executionContext) throws Exception {
Vector myVector = new Vector();
myVector.add("elem1");
myVector.add("elem2");
executionContext.getContextInstance().createVariable("myVector",myVector);
}
}
<c:forEach var="elem" items="#{var['myVector']}" >
<h:outputText value="$elem"/>
</c:forEach>
Sorry, this example worked.
But as soon as the class of the variable is my own, it throws the exception, although the class implements Serializable ans has a generated serial serialVersionUID.