1
2
3
4
5
6 package net.kwfgrid.gworkflowdl.protocol.calls;
7
8 import net.kwfgrid.gworkflowdl.protocol.structure.*;
9
10 import java.io.IOException;
11
12 import org.xmlpull.v1.XmlSerializer;
13
14 /***
15 Modification that adds an outputPlace to a transition.
16 */
17 public class TransitionAddOutEdge extends AbstractMethodCall {
18 protected ProtocolEdge _edge;
19 protected ProtocolTransition _transition;
20
21 public TransitionAddOutEdge(ProtocolTransition transition, ProtocolEdge edge) {
22 super(transition.getRoot());
23 _edge = edge;
24 _transition = transition;
25 }
26
27 public void marshal(IMethodCallMarshaller encoder, XmlSerializer serializer) throws IOException {
28 encoder.marshalTransitionAddOutEdge(serializer, _transition, _edge);
29 }
30
31 public Object execute() {
32 _transition.__addOutEdge(_edge);
33 setExecuted();
34 return null;
35 }
36 }