How to call scripted rest api in workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2022 09:36 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2022 12:33 AM
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?