1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.scxml.model;
18
19 import java.util.Collection;
20
21 import org.apache.commons.logging.Log;
22 import org.apache.commons.scxml.ErrorReporter;
23 import org.apache.commons.scxml.EventDispatcher;
24 import org.apache.commons.scxml.SCInstance;
25 import org.apache.commons.scxml.SCXMLExpressionException;
26
27 /***
28 * The class in this SCXML object model that corresponds to the
29 * <cancel> SCXML element.
30 *
31 */
32 public class Cancel extends Action {
33
34 /***
35 * Serial version UID.
36 */
37 private static final long serialVersionUID = 1L;
38
39 /***
40 * Constructor.
41 */
42 public Cancel() {
43 super();
44 }
45
46 /***
47 * The ID of the send message that should be cancelled.
48 */
49 private String sendid;
50
51 /***
52 * Get the ID of the send message that should be cancelled.
53 *
54 * @return Returns the sendid.
55 */
56 public String getSendid() {
57 return sendid;
58 }
59
60 /***
61 * Set the ID of the send message that should be cancelled.
62 *
63 * @param sendid The sendid to set.
64 */
65 public void setSendid(final String sendid) {
66 this.sendid = sendid;
67 }
68
69 /***
70 * {@inheritDoc}
71 */
72 public void execute(final EventDispatcher evtDispatcher,
73 final ErrorReporter errRep, final SCInstance scInstance,
74 final Log appLog, final Collection derivedEvents)
75 throws ModelException, SCXMLExpressionException {
76 evtDispatcher.cancel(sendid);
77 }
78
79 }
80