Access and Update Local Environment in Java
Access Local Environment in Java
MbMessage localEnv = inAssembly.getLocalEnvironment();
MbElement nameVar = localEnv.getRootElement().getFirstElementByPath("Name");
String name = nameVar.getValueAsString();
Update Local Environment in Java
MbMessage newEnv = new MbMessage(localEnv);
newEnv.getRootElement().createElementAsFirstChild(MbElement.TYPE_NAME_VALUE,"Name","James");
outAssembly = new MbMessageAssembly(inAssembly,newEnv,inAssembly.getExceptionList(),inAssembly.getMessage());
getOutputTerminal("out").propagate(outAssembly);
No comments:
Post a Comment