I have a business process defined with bpmn2 standard and I want to set up a custom object into a Script Task and pass it to a Human Task. There are three process variables:
and here is the piece of process:
Into Set Object there is the following code:
toBeApproved = new com.myteam.pocapproval.ObjectToBeApproved();
toBeApproved.setCountry(country);
toBeApproved.setAmount(amount);
The problem is that the process variable toBeApproved
, after the script task, won't be filled when I start the process passing only country
and amount
via rest API /server/containers/{id}/processes/{pId}/instances
.
I solved appending this kcontext.setVariable("toBeApproved",toBeApproved);
to the script task.