Hi All,
I need to create a json payload inside a workflow to send to an external Rest API.
I used the org.camunda.spin.Spin.JSON
according to the camunda documentation.
Below is my script
var SpinJSON = org.camunda.spin.Spin.JSON;
var jsonObject = SpinJSON("{}");
var customerId = execution.getVariable("CustomerId");
var eventType = execution.getVariable("ifsBpaProjectionOperation");
jsonObject.prop("CustomerId", customerId);
jsonObject.prop("event_type", eventType);
execution.setVariable("varJsonBody", jsonObject.toString());
In the Debug mode, everything looks fine
Trigger for this is an event and we are trying to sync customer records with a 3rd party system
But in the execution, it gives an unexpected server eror
Looks like it Spin.Json prop() doesn’t work. Is this a bug?
IFS version: 24.1.3