Hi everyone,
I am trying to get a variable value from "java script policy" to "assign message policy" and setting it there in flow variable.
java script-
var resoursepath = 'SetWorkOrderState'; context.setVariable("resoursepath", resoursepath);
assign variable policy-
<AssignVariable> <Name>path</Name> <Value><!-- what goes here? --></Value> </AssignVariable> </AssignMessage>
I want to know what should sit in the value tag to fetch the variable from js policy.
Thanks in advance.
Solved! Go to Solution.
context.setVariable("resourcepath", 'value-for-resourcepath-variable');
This directly sets the resourcepath flow variable to a value.
if you want to use AssignMessage to refer to that variable, you can use something like this:
<AssignMessage name='policy-name-here'> ... <AssignVariable> <Name>some-other-variable</Name> <Ref>resourcepath</Ref> <!-- refer to previously set var --> </AssignVariable> </AssignMessage>
context.setVariable("resourcepath", 'value-for-resourcepath-variable');
This directly sets the resourcepath flow variable to a value.
if you want to use AssignMessage to refer to that variable, you can use something like this:
<AssignMessage name='policy-name-here'> ... <AssignVariable> <Name>some-other-variable</Name> <Ref>resourcepath</Ref> <!-- refer to previously set var --> </AssignVariable> </AssignMessage>
Thanks Priyadarshi. It helped me find my way.