/** * Returns the last child. */ protected FlowExpression getLastChild () { return getExpressionPool().fetch(getLastChildId()); }
.fetch(getEnvironmentId());
/** * A shortcut method for retrieving the parent of this expression * from the pool. */ protected FlowExpression fetchParent () { return getExpressionPool().fetch(this.getParent()); }
/** * Returns the environment that this expression is tied to. */ public Environment fetchEnvironment () { return (Environment)getExpressionPool().fetch(this.getEnvironmentId()); }
/** * Fetches the applied workitem. */ protected InFlowWorkItem fetchWorkitem (final ApplicationContext context, final FlowExpressionId workitemId) { final ParticipantExpression pe = (ParticipantExpression)Definitions.getExpressionPool(context) .fetch(workitemId); return (InFlowWorkItem)pe.getAppliedWorkitem().clone(); }
/** * This method fetches the child (it should be currently only a raw * expression) and stores it in the rawChild field. */ protected void fetchRawChild () { final RawExpression re = (RawExpression)getExpressionPool().fetch(getChildExpressionId()); this.setRawChild((RawExpression)re.clone()); }
/** * A recursive method : recurses until the environment is the one * containing the variable, it then returns this environment. */ public Environment lookupContainingEnvironment (final String variableName) { if (this.variables.containsKey(variableName)) return this; if (this.getId().equals(EngineEnvironmentId.ID)) return null; final Environment env = (Environment)getExpressionPool() .fetch(getEnvironmentId()); if (env == null) { if (log.isDebugEnabled()) { log.debug ("lookupContainingEnvironment() did not find env "+ getEnvironmentId()); } return null; } return env.lookupContainingEnvironment(variableName); }
(RawExpression)getExpressionPool().fetch(fei);
public void run () { try { final FlowExpression child = getExpressionPool() .fetch(ForgetExpression.this.getChildExpressionId()); child.setParent(null); getExpressionPool().apply(child.getId(), forgottenWi); } catch (final Throwable t) { log.info ("apply() error in forgotten child (branch)", t); } } }).start();
final FlowExpression re = getExpressionPool().fetch(this.subId);
/** * apply(), for a DefineExpression, will simply bind the template * of the definition and reply to the parent expression. */ public void apply (final InFlowWorkItem wi) throws ApplyException { log.debug("apply()"); //openwfe.org.Utils.logStackTrace(log, "apply()"); final FlowExpression requester = getExpressionPool() .fetch(wi.getLastExpressionId()); final String name = this.lookupAttribute("name", wi); final Object oTemplate = this.eval(wi); if (name == null) // // lambda definition { ValueUtils.setResult(wi, oTemplate); } else // // classical definition { requester.bindVariable(name, oTemplate); } applyToParent(wi); }