PostClientFlow calling shared flow

I have a postClientFlow which calls a sharedflow as a flow callout. In the Shared flow , I have two policies, a js policy(to calculate proxy and target execution times) and a external service call out. When I try to use the variables set from the js policy in the external service call out, I am not seeing , the external service called. Neither do I see the transactions in the debug session. So I want to confirm, if the approach I am taking is correct. The question is

in a shared flow being called out from post client flow, can I have a javascript set a variable, with the intent of using that variable in the external service call out within that shared flow?

Solved Solved
1 1 232
1 ACCEPTED SOLUTION

in a shared flow being called out from post client flow, can I have a javascript set a variable, with the intent of using that variable in the external service call out within that shared flow?

A JS policy won't execute within the context of a PostClientFlow. Per the documentation,

screenshot-20231023-163510.png

So you need to set any variables you need, before the PostClientFlow begins. See also, the Parameter element for the FlowCallout. which allows you to pass context variables as named parameters to the FC.  It might be useful if you'd like to be explicit about which data the FlowCallout depends on.

View solution in original post

1 REPLY 1

in a shared flow being called out from post client flow, can I have a javascript set a variable, with the intent of using that variable in the external service call out within that shared flow?

A JS policy won't execute within the context of a PostClientFlow. Per the documentation,

screenshot-20231023-163510.png

So you need to set any variables you need, before the PostClientFlow begins. See also, the Parameter element for the FlowCallout. which allows you to pass context variables as named parameters to the FC.  It might be useful if you'd like to be explicit about which data the FlowCallout depends on.