I want to set a variable value dynamically in in RaiseFault Policy. for example -
<AssignVariable>
<Name>raiseFaultSource</Name>
<Value>{someflowvariable}</Value>
</AssignVariable>
so that I can use “raiseFaultSource” variable value in fault rules. is it possible?
Everything in Value is taken as string literal.
I have tried using to reference flow variable, but it doesn’t work as well.
Found that using without {} is working. so -
<AssignVariable>
<Name>raiseFaultSource</Name>
<Ref>someflowvariable</Ref>
</AssignVariable>
2 Likes
Thank you Jitender for posting solution of the issue.
1 Like
Yes, and if you want a full message template, then you can use the Template element:
<AssignVariable>
<Name>nameOfVariableToSet</Name>
<Template>{FlowVar1}.{FlowVar2}.foobar.{FlowVar3}</Template>
</AssignVariable>
With AssignVariable, there are 3 options:
- Value - sets a string literal
- Ref - assign the value of one variable to another variable
- Template - assign the result of a message template to a variable