/** * tells if this token has child tokens that have not yet ended. */ public boolean hasActiveChildren() { // try and find at least one child token that is still active (not ended) if (children != null) { for (Iterator iter = children.values().iterator(); iter.hasNext();) { Token child = (Token) iter.next(); if (!child.hasEnded()) return true; } } return false; }
/** * tells if this token has child tokens that have not yet ended. */ public boolean hasActiveChildren() { // try and find at least one child token that is still active (not ended) if (children != null) { for (Iterator iter = children.values().iterator(); iter.hasNext();) { Token child = (Token) iter.next(); if (!child.hasEnded()) return true; } } return false; }
public Map getActiveChildren() { Map activeChildren = new HashMap(); if (children != null) { for (Iterator iter = children.entrySet().iterator(); iter.hasNext();) { Map.Entry entry = (Map.Entry) iter.next(); Token child = (Token) entry.getValue(); if (!child.hasEnded()) { String childName = (String) entry.getKey(); activeChildren.put(childName, child); } } } return activeChildren; }
public Map getActiveChildren() { Map activeChildren = new HashMap(); if (children != null) { for (Iterator iter = children.entrySet().iterator(); iter.hasNext();) { Map.Entry entry = (Map.Entry) iter.next(); Token child = (Token) entry.getValue(); if (!child.hasEnded()) { String childName = (String) entry.getKey(); activeChildren.put(childName, child); } } } return activeChildren; }
protected void cancelToken(Token token) { // recursively cancel children cancelTokens(token.getChildren().values()); // cancel tasks cancelTasks(getTasksForToken(token)); if (!token.hasEnded()) { // end token but do not propagate to parent // to prevent inadvertent termination token.end(false); } if (log.isDebugEnabled()) log.debug("cancelled " + token); }
protected void cancelToken(Token token) { // recursively cancel children cancelTokens(token.getChildren().values()); // cancel tasks cancelTasks(getTasksForToken(token)); if (!token.hasEnded()) { // end token but do not propagate to parent // to prevent inadvertent termination token.end(false); } if (log.isDebugEnabled()) log.debug("cancelled " + token); }
for (Iterator iter = children.values().iterator(); iter.hasNext();) { Token child = (Token) iter.next(); if (!child.hasEnded()) { child.end();
for (Iterator iter = children.values().iterator(); iter.hasNext();) { Token child = (Token) iter.next(); if (!child.hasEnded()) { child.end();
throw new JbpmException("token is locked by " + lock); if (hasEnded()) { throw new JbpmException("token has ended");
throw new JbpmException("token is locked by " + lock); if (hasEnded()) { throw new JbpmException("token has ended");
if (superProcessToken != null && !superProcessToken.hasEnded()) {
if (superProcessToken != null && !superProcessToken.hasEnded()) {