Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
My scenario is that I have a "Run If" connection that I want to access a context variable as part of the condition.
The overall goal: Define a path from a tLoop that will only execute if the iteration limit was exceeded (telling me that it did not find anything)
Here is the job with the Run If connection
My condition logic is
((Integer)globalMap.get("tLoop_1_CURRENT_ITERATION")) == ( (Integer)maxIterations )
Which generates this error
Originally I used 'Ctrl+Space' to select the context variable
However with just the context variable name
((Integer)globalMap.get("tLoop_1_CURRENT_ITERATION")) == maxIterations
Which produced the same exact error above.
Removing the "Run If" connection and related tWarn allows me to run the job successfully
How do I access a context variable in a "Run If" connection?
I tried globalMap but that defeats the purpose. I would have to access it to put it out there.
To use context variable, the expression is: context.varName, so, try
context.maxIterations
Regards
Shong
To use context variable, the expression is: context.varName, so, try
context.maxIterations
Regards
Shong
Thank you Shong.
When I did ctrl-space and selected that context variable the first time it only returned varName so I thought in that component that was expected. Thought I tried your suggestion prior but just tried it again and it seems to work - thank you for the incredibly quick turn-around