/** * looks for the first token-variable-map that is found up the token-parent hierarchy. */ public TokenVariableMap getTokenVariableMap(Token token) { TokenVariableMap tokenVariableMap = null; if (tokenVariableMaps != null) { if (tokenVariableMaps.containsKey(token)) { tokenVariableMap = (TokenVariableMap) tokenVariableMaps.get(token); } else if (!token.isRoot()) { tokenVariableMap = getTokenVariableMap(token.getParent()); } } return tokenVariableMap; }
public String getFullName() { if (isRoot()) return "/"; StringBuffer nameBuilder = new StringBuffer(); for (Token token = this; token.hasParent(); token = token.getParent()) { String tokenName = token.getName(); if (tokenName != null) nameBuilder.insert(0, tokenName); nameBuilder.insert(0, '/'); } return nameBuilder.toString(); }
public String getFullName() { if (isRoot()) return "/"; StringBuffer nameBuilder = new StringBuffer(); for (Token token = this; token.hasParent(); token = token.getParent()) { String tokenName = token.getName(); if (tokenName != null) nameBuilder.insert(0, tokenName); nameBuilder.insert(0, '/'); } return nameBuilder.toString(); }
/** * looks for the first token-variable-map that is found up the token-parent hierarchy. */ public TokenVariableMap getTokenVariableMap(Token token) { TokenVariableMap tokenVariableMap = null; if (tokenVariableMaps != null) { if (tokenVariableMaps.containsKey(token)) { tokenVariableMap = (TokenVariableMap) tokenVariableMaps.get(token); } else if (!token.isRoot()) { tokenVariableMap = getTokenVariableMap(token.getParent()); } } return tokenVariableMap; }
/** * notifies a parent that one of its nodeMap has ended. */ private void notifyParentOfTokenEnd() { if (isRoot()) { processInstance.end(); } else if (parent != null && !parent.hasActiveChildren()) { parent.end(); } }
/** * notifies a parent that one of its nodeMap has ended. */ private void notifyParentOfTokenEnd() { if (isRoot()) { processInstance.end(); } else if (parent != null && !parent.hasActiveChildren()) { parent.end(); } }
/** * searches for the first token-variable-map for the given token and creates it on the root * token if it doesn't exist. */ public TokenVariableMap getOrCreateTokenVariableMap(Token token) { if (token == null) { throw new JbpmException("can't get variables for token 'null'"); } // if the given token has a variable map TokenVariableMap tokenVariableMap = null; if ((tokenVariableMaps != null) && (tokenVariableMaps.containsKey(token))) { tokenVariableMap = (TokenVariableMap) tokenVariableMaps.get(token); } else if (!token.isRoot()) { tokenVariableMap = getOrCreateTokenVariableMap(token.getParent()); } else { tokenVariableMap = createTokenVariableMap(token); } return tokenVariableMap; }
/** * searches for the first token-variable-map for the given token and creates it on the root * token if it doesn't exist. */ public TokenVariableMap getOrCreateTokenVariableMap(Token token) { if (token == null) { throw new JbpmException("can't get variables for token 'null'"); } // if the given token has a variable map TokenVariableMap tokenVariableMap = null; if ((tokenVariableMaps != null) && (tokenVariableMaps.containsKey(token))) { tokenVariableMap = (TokenVariableMap) tokenVariableMaps.get(token); } else if (!token.isRoot()) { tokenVariableMap = getOrCreateTokenVariableMap(token.getParent()); } else { tokenVariableMap = createTokenVariableMap(token); } return tokenVariableMap; }