How we can assure Async Business rule run and how we can see the business rules results

randeepnath
Mega Contributor

Hi

I have created a REST outbound service API and while testing i successfully called the 3rd party API. Using the preview script usage script i created a Businessrule in Async.

But when i am inserting data into table, I am not able to see any information on   Async Business Rule updates. How can i make sure system calls the async call and it run successsfully or not ?

Please advice on this.. and why i make async business rule because of i am getting error while i am using onbefore - getting error message saying   " Illegal request .... Use an async business rule to perform outbound HTTP requests. "

Thanks in advance

Please correct me in my steps

4 REPLIES 4

Brad Tilton
ServiceNow Employee
ServiceNow Employee

When you use an async it pushes the job into the scheduler, so if you need some immediate feedback to the user that the call was successful you might want to use an after. If you're just testing and want to make sure it worked you could write the response to a log.


randeepnath
Mega Contributor

Thanks Brad,



That means, Do i need to create a scheduler for my async process, Or servicenow itself will have their own scheduler ?


ServiceNow has a scheduler that handles everything, you're just not going to see real time feedback in that case, so I would add some logging to make sure you got a response.


To add logging to the business rule use gs.log("enter text here");



GlideSystem - ServiceNow Wiki