- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2017 09:42 AM
I have created a REST message to an in-house created API. When I test the message using the test functionality from the HTTP Method, it works as expected, however when I call it from a Workflow using the REST Message WF Activity the endpoint URL is being truncated. The URL is 132 characters long, but it is being truncated at 120 characters.
Is there some setting that needs to be changed to allow a REST message with an endpoint longer than 120 characters to be submitted from a workflow?
Thanks in advance,
Chris
Solved! Go to Solution.
- Labels:
-
Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2017 11:45 AM
Ok, It seem to be something related to the URL limit that browser can handle? I am not very sure about it, may be you should try sending the message in a Run script activity after calling the API.
Thanks
Please Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2017 10:32 AM
Hi Chris,
In the workflow activity variable table (wf_activity_variable), You can search for Label=REST Endpoint and modify the max length of its variable to 200. It should update the size of endpoint in your workflow rest message as well.
I also checked the endpoint on Rest Message record is 200 characters long.
Thanks
Please Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2017 10:59 AM
Hi Allykutty,
Thanks for your reply.
I'm not actually using that field in the WF activity. The endpoint is being supplied by the REST Message that I had created previously. I am only passing variables to the REST message:
The current value for the length of the REST Endpoint field in my system is 100, however the message that is hitting the API is 120 characters long.
Thanks
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2017 11:45 AM
Ok, It seem to be something related to the URL limit that browser can handle? I am not very sure about it, may be you should try sending the message in a Run script activity after calling the API.
Thanks
Please Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2017 07:04 AM
Thanks for the suggestion Alikutty, and I apologize for misspelling your name in my previous post. The call to the API via the scripted REST message was successful and not truncated. I think I will open an Incident in HI because this does seem to be an issue when using the workflow activity, but the scripted method is a good workaround.
For reference on the scripted REST message:
Scripting Outbound REST - ServiceNow Wiki