We’re trying to write Unit test cases using JUnit in our project.
I’m following the below example to write cases, without using the camund.cfg.xml.
While trying to start the process instance, we need to pass certain complex objects(custom POJO) as variables as shown below:
public class Custom {
private String a;
private String b;
private String c;
private String d;
}
final ProcessInstance processInstance = runtimeService()
.startProcessInstanceByKey(PRODUCTION_PROCESS_KEY,
withVariables(
CaseVariables.Custom, custom,
CaseVariables.User, user,
CaseVariables.State, State));
However, when I run the test, I get following error:
Exception while closing command context: Cannot find serializer for value ‘Untyped value ‘custom.pojo’, isTransient = false’.
We have Spin added as the dependency in our POM.xml.
Request you to please help me understand what is going wrong here.