Object result = levelResult.get(expr.getStringValue());
return new Token(EXPR, result==null ? "" : result.toString());
} else if (type == THREADSAFE_MODULE) {
try {
InputModule im = module.getModule();
Object result = im.getAttribute(expr.getStringValue(), null, objectModel);
return new Token(EXPR, result==null ? "" : result.toString());
} catch(ConfigurationException confEx) {
throw new PatternException("Cannot get variable '" + expr.getStringValue() +
"' in expression '" + this.originalExpr + "'", confEx);
}
} else if (type == STATEFUL_MODULE) {
InputModule im = null;
String moduleName = module.getStringValue();
try {
im = (InputModule) this.manager.lookup(InputModule.ROLE + '/' + moduleName);
Object result = im.getAttribute(expr.getStringValue(), null, objectModel);
return new Token(EXPR, result==null ? "" : result.toString());
} catch(ServiceException e) {
throw new PatternException("Cannot get module '" + moduleName +
"' in expression '" + this.originalExpr + "'", e);