cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Issue Passing WF Variables in Web Request Action

Jump to solution

I'm using the web request action to POST to a RESTful web service.  Within the web request action configuration, the JSON content is constructed similar to:

{

     "Variable1" : "Variable1",

     "Variable2" : "Variable2"

}

For some reason, the variable values (in red above), which were constructed using the "Insert Reference", are not resolving to the corresponding variable value (which was set in a previous step).  The variables seems to be set correctly however, as "Log in History List" actions confirm the values. 

However the web service call will succeed with hard coded values like:

{

     "Variable1" : "ABC",

     "Variable2" : "123"

}

Has anyone run seen something similar?

0 Kudos
Reply
4 Replies
mapeacock
Nintex Newbie

Re: Issue Passing WF Variables in Web Request Action

Jump to solution

Hi Stan,

Are you including the inverted commas in your feed to the service? I havent worked with JSON and Workflow (yet), but I wonder whether this has something to do with the interaction of the commas and the variable inserted.

Try it without the commas around the actual variable or perhaps construct the entire variable declaration as a variable that you can just insert in to the JSON as example below :

{

     {WorkflowVariable:Variable1},

     {WorkflowVariable:Variable2}

}

cheers,

Mark

View solution in original post

0 Kudos
Reply
Automation Master
Automation Master

Re: Issue Passing WF Variables in Web Request Action

Jump to solution

Which action do you use to build the JSON content ?

0 Kudos
Reply
Not applicable

Re: Issue Passing WF Variables in Web Request Action

Jump to solution

Mark,

Many thanks, it worked after listing out the entire variable declaration such as:

{

     "Variable1" : "{WorkflowVariable:Variable1}",

     "Variable2" : "{WorkflowVariable:Variable2}"

}

0 Kudos
Reply
mapeacock
Nintex Newbie

Re: Issue Passing WF Variables in Web Request Action

Jump to solution

Thanks Stan,

Glad I could help!

Cheers,

Mark

0 Kudos
Reply