Passing properties into a FlowCallout

Not applicable

The FlowCallout policy appears to support the ability to pass properties into the shared flow. Can anyone provide an example of how to do this?

The policy XML I have looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<FlowCallout async="false" continueOnError="false" enabled="true" name="FC-Fault-Handling-Default-v1">
  <DisplayName>FC-Fault-Handling-Default-v1</DisplayName>
  <FaultRules/>
  <Properties>
  </Properties>
  <SharedFlowBundle>fault-handling-default-v1</SharedFlowBundle>
</FlowCallout>

How do I use the properties tag? The documentation doesn't mention this tag.

thanks

0 3 372
3 REPLIES 3

Hi @robinwilkins

The <Properties> element is not supported by the FlowCallout policy, which is why it's not mentioned in the documentation. I presume the policy XML you have shared originated from the UI, which seems to unfortunately add this element in (legacy behaviour), causing some confusion. Please also see this related question posted on the community.

To pass values (variables) to a shared flow, I suggest using an AssignMessage or JavaScript policy prior to invoking the shared flow. Including a step in your shared flow to validate the values (existence at a minimum) is a good pattern to follow.

I also recommend a variable naming convention to be used in this case. For example, you could prefix the variables with sharedflow.<flow_name>. , giving you something like sharedflow.fault-handling-default-v1.basepath.

Thanks Omid. This is what we have done, it just seems a shame to need to create 2 separate policies: one to set up the variables, and the second to call the shared flow.

Hi, I am interested to know how you have used this value in the shared flow , I wanted to use a similar stratergy to get to the sharedFlow fault handling a value from the proxy. Can you share please