Commit 58711bc
committed
[REFACTOR] ProcessConverter: simplify event definitions retrieval
Previously, for a given 'bpmn element', we retrieved a list with all event
definitions that exist in the spec with the number of occurrences associated to
the 'bpmn element'.
It was not obvious that this list contained all definitions with some occurrence
counters set to zero:
- generally, the intuition of the reader is to have only definitions for non
zero counts.
- in addition, the method documentation confirmed this intuition 'Get the list
of eventDefinition hold by the Event bpmElement'. It never talked about zero
counters
Second, this required an extra filtering to only get the definitions actually
hold by the bpmn element (only keep definitions with non zero counter).
The new implementation now returns only a list of event definitions with non
zero counter i.e. the event definitions declared in the BPMN definition with
their occurrence count. This method is in charge of the zero counter filtering,
letting the client code cleaner.1 parent ba04d67 commit 58711bc
1 file changed
+11
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
140 | 144 | | |
141 | 145 | | |
142 | 146 | | |
| |||
0 commit comments