Suppose I've set a variable called "url" in my API Proxy flow, maybe using AssignMessage/AssignVariable, or via Javascript context.setVariable(), or implicitly in some other way.
If I then call messageContext.getMessage().getVariable("url") from within Java Callout class, will I be able to retrieve the variable value?
Solved! Go to Solution.
You dont need the getMessage()
You can get your variables direcrly off the context for instance messageContext.getVariable("foo");
I would be careful about setting variables with names that may be reserved like url. For instance i would set my var to local_url or script_url. This avoids a scenerio where you can't overwrite a variable and it doesnt fail giving you a false sense of the variable being set.