Set Parameter to Subflow's Environment Variables from a Function

I have a Subflow named: Get Price Factor. That subflow has 2 Environment Variables named cost and sku.
Now before the subflow is called, there's a function named "Get Item Cost".
I want to set both cost and sku from the function "Get Item Cost".
Is this possible?

No that is not possible. Environment Variables cannot be changed dynamically at runtime.

If you want dynamic information in the subflow, you need to pass it in with the message.

Bummer, I was hoping some solution to it.
Which is better? Pass it with the message or set a flow variable which I can access in the subflow?

If you set it as a flow context variable then you have to figure out how to get each instance to see its own value and not everyone else's.

It depends on the exact scenario, but in general passing it in with the message is the better way to do it.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.