Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

retryWaitSeconds - Two blocks of calls

Huddos
Regular Contributor
Regular Contributor

Hi,

In the developer's documentation it states the below:

retryWaitSeconds - Use this attribute to specify the sleep time interval between the two blocks of calls, so that the dependent second call is processed after completing the calls in the first block.

How do I define two blocks of calls in createticketjson as the retryWaitSeconds is not working when added to connectionjson for SNOW REST connection.

I currently have below, I need a delay between each call, in particular submit_order needs to wait a number of seconds after order_now adds the item to the SNOW cart. 

{
"ticketidPath": "call3.message.result.request_number",
"cartidPath": "call2.message.result.cart_id",
"usersysidPath": "call1.message.result.sys_id",
"call": [
{
"name": "call1",
"callOrder": 0,
"connection": "userAuth",
"url": "https://xxx.service-now.com/api/now/table/sys_user?sysparm_query=user_name%3D${user.username}&syspar...",
"httpMethod": "GET",
"httpParams": "{}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"statusCode": [
500,
403,
409,
412
]
}
},
{
"name": "call2",
"callOrder": 1,
"connection": "${response.call1.message.result[0].size() == 0 ? '' : 'userAuth'}",
"url": "${(task.tasktype==3 || task.tasktype==6) ? 'https://xxx.service-now.com/api/sn_sc/servicecatalog/items/498cb9f3e0e206000f720ccf56a5bb52/order_no...' : 'https://xxx.service-now.com/api/sn_sc/servicecatalog/items/0c9883e4db8d79504775be32f3961954/order_no...'}",
"httpMethod": "POST",
"httpParams": "{\"sysparm_quantity\":\"1\",\"variables\":{\"SomeoneElse\":\"Someone Else\",\"RequestedFor\":\"${response.call1.message.result[0].sys_id}\",\"sysparm_requested_for\":\"${response.call1.message.result[0].sys_id}\",\"action\":\"${(task.tasktype==3 || task.tasktype==6) ?'Request access':''}\",\"Software_PC_Serial\":\"${(task.tasktype==3 || task.tasktype==6) ? 'NA' : ''}\",\"Short Description\":\"${(task.tasktype==3 || task.tasktype==6) ? 'HR21 Kiosk':''}\",\"TellUsAbout\":\"${(task.tasktype==3 || task.tasktype==6) ?'Automatically raised by Saviynt Joiner workflow' : 'Automatically raised by Saviynt Leaver workflow'}\",\"UserAccountManagement_workflow\":\"${(task.tasktype==3 || task.tasktype==6) ? '' : 'pre_delete'}\"}}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"message": "",
"statusCode": [
500,
400,
401
]
}
},
{
"name": "call3",
"callOrder": 2,
"connection": "${response.call1.message.result[0].size() == 0 ? '' : 'userAuth'}",
"url": "https://xxx.service-now.com/api/sn_sc/servicecatalog/cart/submit_order",
"httpMethod": "POST",
"httpParams": "",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"statusCode": [
500,
400,
401
]
}
}
]
}

This is comms from Servicenow Support:

The submit_order API calls should have at least 3 secs of time interval to avoid this scenario of duplicate requests being created for the same user. Which will eventually help servicenow to pass the checks points (if any), process the existing submit_cart API call in progress before another submit_cart API call being made.

 

TIA Huddos

0 REPLIES 0