/** Suspend (pause) Token */ public static void suspendToken(long tokenId) throws WorkflowException { log.debug("suspendToken({})", tokenId); JbpmContext jbpmContext = JBPMUtils.getConfig().createJbpmContext(); try { org.jbpm.graph.exe.Token t = jbpmContext.getToken(tokenId); t.suspend(); jbpmContext.getSession().flush(); } catch (JbpmException e) { throw new WorkflowException(e.getMessage(), e); } finally { jbpmContext.close(); } log.debug("suspendToken: void"); }