I am setting LoanObj1 (simple pojo with Just STrings) and LoanObj2(complex pojo with List and Maps) using belong code and set it in the excution.setVariable
ObjectValue objectValue = Variables.objectValue(object)
.serializationDataFormat(Variables.SerializationDataFormats.JSON)
.create();
Also i am able to read both the POJO excution.getVariable in deletegate classes .But when i am trying to read
LoanObj2 loanObj2 = (LoanObj2) execution.getVariableLocal("loanObj2");
IT works fine except when i try to read the LoanObj2 in MessageEndEvent.java class as shown below
I am able to read LoanObj1.Also i am able to read LoanObj2 if choose ASYNCHRNOUS AFTER .But i dont want to choose ASYNCHRNOUS AFTER as I need to execute Step 3 in background thread.
How to read LOanObj2
Error message
org.camunda.bpm.engine.ProcessEngineException:
Cannot deserialize object in variable 'LoanObj2':
SPIN/JACKSON-JSON-01006 Cannot deserialize '{"requestI...' to java type '[simple type, class com.LoanObj2'
Screenshot from 2023-01-11 17-28-58|690x253
