Workflow REST Message Activity Escaping Characters
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2018 03:13 PM
Hello,
I have a REST Message that when called from a Workflow, escapes special characters.
When I run a test directly from the HTTP Method (by clicking the 'Test' UI Action and manually setting the variables), it works fine and creates this record:
But when I run the exact same method from a Workflow via a REST activity (both by using the 'Test Inputs' UI action and manually setting the variables, or by running the workflow and letting the variables get pulled from record fields), it gets inputted like this:
The REST Message has these headers:
Can anyone point me in the right direction? I'm not too well versed on this.
- Labels:
-
Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2018 11:43 PM
Hi Jamie,
So is the request being sent correctly and received properly in 3rd party.
Which http method is used here?
Also how are you setting the variables is it through variable substitution and in workflow you are using REST message activity or run script to trigger the rest endpoint.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2018 04:06 PM
Hi bawiskar,
I am using a POST to insert a record.
When I set the variables manually through the HTTP Method directly and do a Test Run, it works fine.
I am using a Workflow activity (custom REST web service, selecting the same HTTP Method, pictured below) with variable substitution. If I let it get the variables from the current Workflow record, or if I manually set them and test via the Test Input UI Action, it won't handle the character correctly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2018 10:41 PM
Hi Jamie,
If the worklfow activity doesn't allow you to escape characters, then why not use Run Script and escape that character.
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2018 03:43 PM