Hi,
I have developed a simple BPMN file using modeller. This is my flow -
-
User Task that receives JSON request as input during the start up of the process instance
-
Check a condition based on one of the values from the JSON request
-
If yes, call a REST API POST using the JSON request sent initially.
I am unable to read the JSON values in my service task for REST. I have tried various ways to do that. Somehow I am able to read the value during my condition check but not later in the task.
Attaching my BPMN file. Please let me know where am I wrong or what is the right way to achieve my case?
The calls I am using are as follows -
-
localhost:8080/engine-rest/deployment/create (attaching the BPMN file here)
-
localhost:8080/engine-rest/process-definition/key/RestDemo1/start
{“variables”:
{
“age” : {“value” : 30, “type”: “Integer”},
“name” : {“value” : “qwer”, “type”: “String”},
“sal”: {“value” : 45000, “type”: “Long”},
“addr”:{“value” : “MI3”, “type”: “String”}
},
“withVariablesInReturn”: true
} -
localhost:8080/engine-rest/task/{id}/complete
(empty JSON body)
RestDemo1.bpmn (7.5 KB)