Unable to deserialize process plan from JSON - Flow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2019 01:46 PM
I am running into an issue with Flow.
I have a flow set up to trigger when a new incident is created. In the flow I have an action that gets a string from a body of text. The test it gets back is between two words.
From there I pass that onto an action that runs a power shell script. The action takes a single string and runs it on our mid server.
Individually, each action runs successfully. I have been able to narrow it down to the combination of passing the field "Addtional Comments" to the first action (get a single string from the body) and passing that string to the powershell action. I then get
Cancelled : error="unable to deserialize process plan from JSON"
with the error on the PowerShell step.
If I remove the pill that I pass in to the text function and paste in the body of the Additional Comments, everything runs fine.
Not sure what would be causing the flow to not allow this to work.Any help would be great. (I have already tried KB0688902)
Build name: London
Build date: 08-12-2019_1850

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2019 06:11 PM
I would suggest adding an action step with the inputs of the additional comments data pill.
You can use this action step to deserialize the variable as the error suggests, then you can pass the corrected string output to your next step.
var outputVariable = JSON.parse( inputVariable );
Cheers,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2020 01:21 AM
Yeah , there has been issues with passing additional comments using data pill'on london.
Can you may be define an action with takes trigger record (call it as "record") as an input and returns output comments as string. Call this action from flow before your "Get comment text" and pass returned string comments in Body of "Get comment text"
Action Input: record of type reference.incident
Action script :
var lastComment = inputs.record.comments.getJournalEntry(1);
outputs.latestcomment = lastComment;