Outbound REST Post Request
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2018 04:34 AM
Hello, I have set up an outbound POST REST request to a third party endpoint. When I test this within my developer instance it returns a valid response. I am sending no parameters.
I have created a business rule and copied the code implementation script. However, when I try and run the same request from the business rule I get a HTTP status 500 response returned from my endpoint.
If I run the request using execute() I get "Illegal access to outbound HTTP in getFileDrop. Use an async business rule to perform outbound HTTP requests."
To repeat, the call works from the 'test' button link within SN, but not when called from the business rule it fails. My thinking is that the request for this Post has some sort SSL Handshake error when rule form the business rule?
Can anyone help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2018 11:52 AM
Its a after a table insert to a new table I created; I created a form for the table with the submit button for the new record; the business rule was created linked to the table. I believe my script is triggered after the insert event. I have made different calls to the same endpoint which work?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2018 12:12 PM
Can you attach a screenshot of the BR config? Normally it's not a problem using post in a BR

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2018 11:57 AM
Are you suppose to send some parameters in below code which you are not sending? Also try with execute() instead of executeAsync()
var r = new sn_ws.RESTMessageV2('x_256847_deltek_po.Deltek', 'GetFileDrop');
var response = r.execute();
var responseBody = response.getBody();
var httpStatus = response.getStatusCode();
gs.addInfoMessage( httpStatus );
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2018 12:06 PM
Hi Sanjiv,
No, for this post I do not need to pass any parameters. I have set it up in outbound Integrations, with a valid Basic Auth user account and tested it there - all good. Also ran it in Postman and other non SN clients - all good.
When I run form the business rule as execute() I get an error: "Illegal access to outbound HTTP in getFileDrop. Use an async business rule to perform outbound HTTP requests."
?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2018 12:15 PM
When you try Business Rule and use executeAsync, what is the error you see in the ecc queue?
Please mark this response as correct or helpful if it assisted you with your question.