I made this change & now it it works:
I wanted to know whether the variable “amount” will then be classified as integer / long in the further process or as a string. For this reason I added a gateway. Seems to work anyway and the data type is Integer / Double at the end of the process. I just wondered why that is.
But process is working, thank you!
Another question:
How would the query / code via REST-API look like if I post the two variables directly into the human task (“Check Payment”). I know how to start a process right from the start via REST, but is it also possible to start the process in the middle and skip previous steps? If not, is there still a chance to implement variables in an existing process?
I didn’t find anything suitable in the documentation. For example, I tried the following:
url = ‘http://localhost:8080/engine-rest/process-definition/key/ed069466-9237-11eb-a3d3-1cbfc00f9269/start’
myobj = {“workerId”: “1”,
“variables”: {“amount”: {“value”: 11.111, “type”: “double”},
“item”: {“value”: “test”, “type”: “string”}}
}
x = requests.post (url, json = myobj)
So the process instance ID in the URL which I started with:
url = ‘http://localhost:8080/engine-rest/process-definition/key/payment-retrieval/start’
myobj = {
“variables”: {“amount”: {“value”:11.111,“type”:“double”},
“item”: {“value”:“test”, “type”:“string”} }
}
x = requests.post(url, json = myobj)