I am using the newest version of the Zeebe HTTP worker to invoke existing endpoints. We do not control these endpoints so have to deal with the complex structure of data returned.
The Zeebe HTTP worker puts the response of service in a variable called “body”. I am attempting to define a mapping which will take the response from variable “body” and output this into a new variable as follows:
Could someone please help me understand what is going on here? I am using a two step process to clarify intent.
After these mappings have been performed, I am still expected to see the content of “body” in the workflow instance variable stack? Specifically, if this instance of “body” was used as output mapping, should I still be expect to see the exact value in the variable stack?
I’m sorry but I have problems to follow your problem. Please discuss the behavior with your concrete example.
Which JSON does the HTTP service returns?
Which variables are returned by the worker?
What output and input mappings are defined on the task?
Which variables do you expect in the workflow instance?
I cannot share the internals of the JSON returned but the snapshot posted above gives the overall structure. The worker returns the correct JSON but the failure is happening during mapping.
I have been able to get around the error with this change to the output mapping:
This mapping does not work because the source does not reference a variable from the job complete command. It is not possible to use a variable that is created by a previous target mapping.
Yes. If the task has an output mapping then only the defined variables are propagated. The other variables are discarded.