IBM Verify

 View Only

 Pass JS global variables in a decision branch scenario

Jump to  Best Answer
Jonatan Wålegård's profile image
Jonatan Wålegård posted Thu June 19, 2025 02:27 AM

Hi!

I have a decision that points to a mapping rule, which returns a result for the authentication policy to determine which branch should be initialized.

The issue I'm facing is that after the decision mapping rule has been executed, any global variables created within it are no longer available when I enter the selected branch — which, of course, is by design.

Is there a clean workaround to make these variables available inside the branches as well?
Would it be possible to store them somewhere temporarily — like in a kind of "proxy" or "middle ground" — so they can be accessed when executing the branches?

JACK YARBOROUGH's profile image
JACK YARBOROUGH  Best Answer

Hello Jonatan,

It seems the decision context has a 'state' variable that can be used to pass information between instances of the Branching mapping rules:

https://www.ibm.com/docs/en/sva/11.0.0?topic=policies-decision

This variable is also usable in infomap mechanisms so I believe it's the same variable but different contexts. Can you try to use this 'state' variable and confirm whether that meets your use-case?