Hi Team,
We need to pass a variable from API proxy to Shared flow.
1. We used assign to store the variable.
<AssignVariable>
<Name>flow.xyz.ABCD</Name>
<value>'Hello'</value>
</AssignVariable>
2. We pass the variable in Paraneter in the Flow Callout as mentioned below:
<Parameter name="ApigeeTransactionID">{flow.xyz.ABCD}</Parameter>
3. In the shared flow, we are using the variable passed from the API proxy to Shared flow
Hi @Amit Vij,
Variables assigned in your proxy flow will be available to the shared flow. In your example, `messageid` will be available without having to pass it as a separate value. Similarly for `flow.xyz.ABCD`. You can also pass parameters as you've shown.
However, there are a few errors in your policies:
See docs and examples for more details here: https://docs.apigee.com/api-platform/reference/policies/assign-message-policy#assignvariable
Hope that helps!
Kurt is correct, AND, there is also a mechanism to set variables just for the scope of the SharedFlow.
<FlowCallout name="String-Handler"> <DisplayName>String Handler</DisplayName> <Parameters> <Parameter name="input">this is a message template {system.time}</Parameter> <Parameter name="operations">concatenate tolowercase</Parameter> <Parameter name="outputVariable">string.handler.output</Parameter> </Parameters> <SharedFlowBundle>StringHandler</SharedFlowBundle> </FlowCallout>
See the reference documentation for FlowCallout, specifically for the Parameters element, for more information.
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |