01: package org.jbpm.command;
02:
03: import java.util.Date;
04: import java.util.Iterator;
05:
06: import org.hibernate.Query;
07: import org.jbpm.JbpmContext;
08: import org.jbpm.graph.exe.ProcessInstance;
09:
10: /**
11: *
12: * @author Bernd Ruecker (bernd.ruecker@camunda.com)
13: *
14: */
15: public class CancelTokenCommand extends AbstractCancelCommand implements
16: Command {
17:
18: private static final long serialVersionUID = 7145293049356621597L;
19:
20: private long tokenId;
21:
22: public CancelTokenCommand() {
23: }
24:
25: public CancelTokenCommand(long tokenId) {
26: this .tokenId = tokenId;
27: }
28:
29: public Object execute(JbpmContext jbpmContext) throws Exception {
30: this .jbpmContext = jbpmContext;
31: cancelToken(jbpmContext.getGraphSession().loadToken(tokenId));
32: this .jbpmContext = null;
33: return null;
34: }
35:
36: public long getTokenId() {
37: return tokenId;
38: }
39:
40: public void setTokenId(long tokenId) {
41: this.tokenId = tokenId;
42: }
43:
44: }
|