-
Notifications
You must be signed in to change notification settings - Fork 58
/
elements.go
163 lines (124 loc) · 4.07 KB
/
elements.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
package BPMN20
type ElementType string
const (
StartEvent ElementType = "START_EVENT"
EndEvent ElementType = "END_EVENT"
ServiceTask ElementType = "SERVICE_TASK"
ParallelGateway ElementType = "PARALLEL_GATEWAY"
ExclusiveGateway ElementType = "EXCLUSIVE_GATEWAY"
IntermediateCatchEvent ElementType = "INTERMEDIATE_CATCH_EVENT"
EventBasedGateway ElementType = "EVENT_BASED_GATEWAY"
SequenceFlow ElementType = "SEQUENCE_FLOW"
)
type BaseElement interface {
GetId() string
GetName() string
GetIncomingAssociation() []string
GetOutgoingAssociation() []string
GetType() ElementType
}
func (startEvent TStartEvent) GetId() string {
return startEvent.Id
}
func (startEvent TStartEvent) GetName() string {
return startEvent.Name
}
func (startEvent TStartEvent) GetIncomingAssociation() []string {
return startEvent.IncomingAssociation
}
func (startEvent TStartEvent) GetOutgoingAssociation() []string {
return startEvent.OutgoingAssociation
}
func (startEvent TStartEvent) GetType() ElementType {
return StartEvent
}
func (endEvent TEndEvent) GetId() string {
return endEvent.Id
}
func (endEvent TEndEvent) GetName() string {
return endEvent.Name
}
func (endEvent TEndEvent) GetIncomingAssociation() []string {
return endEvent.IncomingAssociation
}
func (endEvent TEndEvent) GetOutgoingAssociation() []string {
return endEvent.OutgoingAssociation
}
func (endEvent TEndEvent) GetType() ElementType {
return EndEvent
}
func (serviceTask TServiceTask) GetId() string {
return serviceTask.Id
}
func (serviceTask TServiceTask) GetName() string {
return serviceTask.Name
}
func (serviceTask TServiceTask) GetIncomingAssociation() []string {
return serviceTask.IncomingAssociation
}
func (serviceTask TServiceTask) GetOutgoingAssociation() []string {
return serviceTask.OutgoingAssociation
}
func (serviceTask TServiceTask) GetType() ElementType {
return ServiceTask
}
func (parallelGateway TParallelGateway) GetId() string {
return parallelGateway.Id
}
func (parallelGateway TParallelGateway) GetName() string {
return parallelGateway.Name
}
func (parallelGateway TParallelGateway) GetIncomingAssociation() []string {
return parallelGateway.IncomingAssociation
}
func (parallelGateway TParallelGateway) GetOutgoingAssociation() []string {
return parallelGateway.OutgoingAssociation
}
func (parallelGateway TParallelGateway) GetType() ElementType {
return ParallelGateway
}
func (exclusiveGateway TExclusiveGateway) GetId() string {
return exclusiveGateway.Id
}
func (exclusiveGateway TExclusiveGateway) GetName() string {
return exclusiveGateway.Name
}
func (exclusiveGateway TExclusiveGateway) GetIncomingAssociation() []string {
return exclusiveGateway.IncomingAssociation
}
func (exclusiveGateway TExclusiveGateway) GetOutgoingAssociation() []string {
return exclusiveGateway.OutgoingAssociation
}
func (exclusiveGateway TExclusiveGateway) GetType() ElementType {
return ExclusiveGateway
}
func (intermediateCatchEvent TIntermediateCatchEvent) GetId() string {
return intermediateCatchEvent.Id
}
func (intermediateCatchEvent TIntermediateCatchEvent) GetName() string {
return intermediateCatchEvent.Name
}
func (intermediateCatchEvent TIntermediateCatchEvent) GetIncomingAssociation() []string {
return intermediateCatchEvent.IncomingAssociation
}
func (intermediateCatchEvent TIntermediateCatchEvent) GetOutgoingAssociation() []string {
return intermediateCatchEvent.OutgoingAssociation
}
func (intermediateCatchEvent TIntermediateCatchEvent) GetType() ElementType {
return IntermediateCatchEvent
}
func (eventBasedGateway TEventBasedGateway) GetId() string {
return eventBasedGateway.Id
}
func (eventBasedGateway TEventBasedGateway) GetName() string {
return eventBasedGateway.Name
}
func (eventBasedGateway TEventBasedGateway) GetIncomingAssociation() []string {
return eventBasedGateway.IncomingAssociation
}
func (eventBasedGateway TEventBasedGateway) GetOutgoingAssociation() []string {
return eventBasedGateway.OutgoingAssociation
}
func (eventBasedGateway TEventBasedGateway) GetType() ElementType {
return EventBasedGateway
}