- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2016 11:36 AM
Hi All,
I have an Outbound REST message to post. I have created it within the scoped application and i have table in the same scope. I am trying to run a business rule script to run this REST Message whenever there is a record inserted. Am setting the body in a perfect manner still its not happening. [httpStatus is 0]. When i try the same body in the rRST message "Test" functionality its working perfectly. May i know what is the issue.? Please let me know . ctomasipradeepksharma kalai
var r = new sn_ws.RESTMessageV2('rest message name', 'post');
var body = '{"JSON Body comes here"}';
r.setRequestBody(body);
var response = r.execute();
var responseBody = response.getBody();
var httpStatus = response.getStatusCode();
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2016 05:44 AM
I wasn't aware of that either. Thank you for sharing Abu.
The only reason I can think of for blocking it is because REST, but default is a synchronous operation. For example, if it takes 10 seconds to get a response from the remote REST host, your browser is stuck waiting in a before/after business rule and presents a poor user experience. Async rules process in the background so the user doesn't have to wait.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2016 03:33 AM
Do any one have suggestions please.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2016 03:37 AM
I haven't worked much in scoped app but I would suggest that prefix the script include name with 'global.' and give it a try.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2016 02:49 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2016 01:04 AM
Hi Sir,
When i reached Servicenow team, they intimated that using any REST Message in After/Before business rule in a scoped application is blocked by Servicenow. Even they aren't aware about about the exact reason. But, the same works well in "Async" BR. Curious to know the reason why it is blocked by servicenow. Any inputs/suggestions will help me. Thanks