@processmaker/modeler 1.18.4 → 1.18.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@processmaker/modeler",
3
- "version": "1.18.4",
3
+ "version": "1.18.5",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "open-cypress": "TZ=UTC cypress open",
@@ -48,7 +48,7 @@
48
48
  "bootstrap-vue": "^2.0.4",
49
49
  "bpmn-moddle": "^6.0.7",
50
50
  "bpmnlint": "^6.4.0",
51
- "bpmnlint-plugin-processmaker": "1.2.3",
51
+ "bpmnlint-plugin-processmaker": "1.2.4",
52
52
  "core-js": "^3.7.0",
53
53
  "file-saver": "^2.0.5",
54
54
  "jest-junit": "^12.0.0",
package/src/.DS_Store CHANGED
Binary file
@@ -23,11 +23,46 @@ export default class XMLManager {
23
23
  definitions.exporter = 'ProcessMaker Modeler';
24
24
  definitions.exporterVersion = '1.0';
25
25
 
26
+ // Clean broken references when loading definitions
27
+ this.cleanBrokenReferences(definitions);
28
+
26
29
  resolve(definitions);
27
30
  });
28
31
  });
29
32
  }
30
33
 
34
+ cleanBrokenReferences(definitions) {
35
+ const { rootElements, diagrams } = definitions;
36
+ const removed = [];
37
+
38
+ // Remove broken bpmn:SequenceFlow from bpmn:Process
39
+ rootElements.forEach(element => {
40
+ if (element.$type === 'bpmn:Process' && element.flowElements) {
41
+ element.flowElements = element.flowElements.filter(child => {
42
+ if (child.$type === 'bpmn:SequenceFlow') {
43
+ if (!(child.sourceRef && child.targetRef)) {
44
+ removed.push(child);
45
+ }
46
+ return child.sourceRef && child.targetRef;
47
+ }
48
+ return true;
49
+ });
50
+ }
51
+ });
52
+
53
+ // Remove BPMNEdge from bpmndi:BPMNDiagram
54
+ diagrams.forEach(element => {
55
+ if (element.$type === 'bpmndi:BPMNDiagram' && element.plane && element.plane.planeElement) {
56
+ element.plane.planeElement = element.plane.planeElement.filter(child => {
57
+ if (child.$type === 'bpmndi:BPMNEdge') {
58
+ return child.bpmnElement && !removed.includes(child.bpmnElement);
59
+ }
60
+ return true;
61
+ });
62
+ }
63
+ });
64
+ }
65
+
31
66
  download() {
32
67
  if (!this.#definitions) {
33
68
  return;
@@ -91,7 +91,8 @@ export default {
91
91
  methods: {
92
92
  filterValidProcesses(processes) {
93
93
  return processes.filter(process => {
94
- return this.filterValidStartEvents(process.events).length > 0;
94
+ return process.category.is_system == false
95
+ && this.filterValidStartEvents(process.events).length > 0;
95
96
  });
96
97
  },
97
98
  filterValidStartEvents(events) {
@@ -23,7 +23,15 @@
23
23
  "ownerProcessId": "ProcessId",
24
24
  "ownerProcessName": "Process Name"
25
25
  }
26
- ]
26
+ ],
27
+ "category": {
28
+ "id": 1,
29
+ "name": "Uncategorized",
30
+ "status": "ACTIVE",
31
+ "is_system": 0,
32
+ "created_at": "2021-09-01T06:11:30-07:00",
33
+ "updated_at": "2021-09-01T06:11:30-07:00"
34
+ }
27
35
  },
28
36
  {
29
37
  "id": 3,
@@ -48,7 +56,15 @@
48
56
  "ownerProcessId": "ProcessId",
49
57
  "ownerProcessName": "Process Name"
50
58
  }
51
- ]
59
+ ],
60
+ "category": {
61
+ "id": 1,
62
+ "name": "Uncategorized",
63
+ "status": "ACTIVE",
64
+ "is_system": 0,
65
+ "created_at": "2021-09-01T06:11:30-07:00",
66
+ "updated_at": "2021-09-01T06:11:30-07:00"
67
+ }
52
68
  },
53
69
  {
54
70
  "id": 5,
@@ -93,7 +109,15 @@
93
109
  "ownerProcessId": "Subprocess2",
94
110
  "ownerProcessName": "Subprocess Two"
95
111
  }
96
- ]
112
+ ],
113
+ "category": {
114
+ "id": 1,
115
+ "name": "Uncategorized",
116
+ "status": "ACTIVE",
117
+ "is_system": 0,
118
+ "created_at": "2021-09-01T06:11:30-07:00",
119
+ "updated_at": "2021-09-01T06:11:30-07:00"
120
+ }
97
121
  },
98
122
  {
99
123
  "id": 1,
@@ -107,7 +131,15 @@
107
131
  "deleted_at": null,
108
132
  "created_at": "2019-04-01T16:02:14+00:00",
109
133
  "updated_at": "2019-04-02T19:11:03+00:00",
110
- "events": []
134
+ "events": [],
135
+ "category": {
136
+ "id": 1,
137
+ "name": "Uncategorized",
138
+ "status": "ACTIVE",
139
+ "is_system": 0,
140
+ "created_at": "2021-09-01T06:11:30-07:00",
141
+ "updated_at": "2021-09-01T06:11:30-07:00"
142
+ }
111
143
  },
112
144
  {
113
145
  "id": 13,
@@ -132,7 +164,15 @@
132
164
  "ownerProcessId": "Subprocess1",
133
165
  "ownerProcessName": "Subprocess One"
134
166
  }
135
- ]
167
+ ],
168
+ "category": {
169
+ "id": 1,
170
+ "name": "Uncategorized",
171
+ "status": "ACTIVE",
172
+ "is_system": 0,
173
+ "created_at": "2021-09-01T06:11:30-07:00",
174
+ "updated_at": "2021-09-01T06:11:30-07:00"
175
+ }
136
176
  }
137
177
  ],
138
178
  "meta": {
package/src/store.js CHANGED
@@ -130,8 +130,8 @@ export default new Vuex.Store({
130
130
  params: {
131
131
  order_direction: 'asc',
132
132
  per_page: 1000,
133
- status: 'active',
134
- include: 'events',
133
+ status: 'all',
134
+ include: 'events,category',
135
135
  },
136
136
  });
137
137
  commit('setGlobalProcesses', data.data);