How to call scripted rest api in workflow

Rama26
Tera Contributor

Hi,

I created scripted rest api and provided endpoint to 3rd party.. how can I call scripted rest api in workflow.  Once the response is success then only workflow process further

 

5 REPLIES 5

You have indicated that your code you are calling is configured to

return response;

So all you should need to do is extract the status value from the response payload and map it to your workflow scratchpad variable, setting true or false depending on the status.
Then reference the workflow scratchpad variable in the wait condition.

The response object is s a little odd as it contains an element[] which doesn't seem necessary, as I would assume there can be only 1 response per payload?