regarding Payload builder and REST message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
This is regarding the action which has the below
Step 1 : Accept input via an Action.
Step 2: Use a Payload Builder to construct the payload.
Step 3: Make a POST REST API call to Ansible AWX along with payload from STEP 2 , which triggers a playbook execution and receive a response containing the AWX Job ID.
NOTE : this Step 3 can be slow because it needs to execute playbook approximately 3-4 minutes as we have bunch of Task.
The Service now needs to launch one more action to check the status of the AWX job id
Currently, we have a separate action to check the status of AWX job id is either success or failure we use service now loop “Do the following” to poll the AWX job status every 30 seconds until it completes (either success or failure), or until a flow variable reaches a defined threshold.
My question is: If I want to include this polling logic as Step 4 (i.e., immediately after the REST message is sent),
how can I achieve that within the same action or flow?
Should this polling remain as a separate action outside the main flow (as we have today), or is there a better way to integrate it directly after the REST call with a time delay?
Would appreciate your thoughts or suggestions on best practices for this kind of asynchronous job monitoring within ServiceNow flows.
i am looking at similar option like loop " do the following" inside action so that the REST API be made till it get the success or failure or max limit set
advantage of doing this , today our flow involved many steps which can span up to 100 steps in the flow
now combining the 3 steps in an action is the efficient way of doing and hence looking for option here