public Object execute(Token token) { token.suspend(); return token; }
/** * suspends a process execution. */ public void suspend() { isSuspended = true; suspendJobs(); suspendTaskInstances(); // propagate to child tokens if (children != null) { for (Iterator iter = children.values().iterator(); iter.hasNext();) { Token child = (Token) iter.next(); child.suspend(); } } }
/** * suspends a process execution. */ public void suspend() { isSuspended = true; suspendJobs(); suspendTaskInstances(); // propagate to child tokens if (children != null) { for (Iterator iter = children.values().iterator(); iter.hasNext();) { Token child = (Token) iter.next(); child.suspend(); } } }
/** * suspends this execution. This will make sure that tasks, timers and messages related to * this process instance will not show up in database queries. * * @see #resume() */ public void suspend() { isSuspended = true; rootToken.suspend(); }
/** * suspends this execution. This will make sure that tasks, timers and messages related to * this process instance will not show up in database queries. * * @see #resume() */ public void suspend() { isSuspended = true; rootToken.suspend(); }
public Object execute(Token token) { token.suspend(); return token; }
public void handleAction(JbpmJsfContext context, ActionEvent event) { try { final FacesContext facesContext = FacesContext.getCurrentInstance(); final ELContext elContext = facesContext.getELContext(); final Object value = valueExpression.getValue(elContext); if (value == null) { context.setError("Suspend failed", "The value is null"); return; } if (value instanceof TaskInstance) { ((TaskInstance)value).suspend(); context.addSuccessMessage("Task instance suspended"); } else if (value instanceof Token) { ((Token)value).suspend(); context.addSuccessMessage("Token suspended"); } else if (value instanceof ProcessInstance) { ((ProcessInstance)value).suspend(); context.addSuccessMessage("Process instance suspended"); } else { context.setError("Suspend failed", "The value type is not recognized"); return; } context.getJbpmContext().getSession().flush(); context.selectOutcome("success"); } catch (Exception ex) { context.setError("Suspend failed", ex); return; } } }