Spaces:
Running
Running
correct datastore
Browse files- modules/toXML.py +5 -2
modules/toXML.py
CHANGED
@@ -22,6 +22,7 @@ def create_BPMN_id(data):
|
|
22 |
'dataAssociation': 1,
|
23 |
'pool': 1,
|
24 |
'dataObject': 1,
|
|
|
25 |
'timerEvent': 1
|
26 |
}
|
27 |
|
@@ -44,6 +45,7 @@ def create_BPMN_id(data):
|
|
44 |
'parallelGateway': 'parallelGateway',
|
45 |
'dataAssociation': 'dataAssociation',
|
46 |
'pool': 'pool',
|
|
|
47 |
'timerEvent': 'timerEvent'
|
48 |
}.get(Bpmn_id, None)
|
49 |
|
@@ -95,7 +97,6 @@ def check_data_association(i, links, labels, keep_elements):
|
|
95 |
status, links_idx = [], []
|
96 |
for j, (k,l) in enumerate(links):
|
97 |
if labels[j] == list(class_dict.values()).index('dataAssociation'):
|
98 |
-
print('i,j,k,l',i,j,k,l)
|
99 |
if k==i:
|
100 |
status.append('output')
|
101 |
links_idx.append(j)
|
@@ -128,10 +129,11 @@ def create_bpmn_object(process, bpmnplane, text_mapping, definitions, size, data
|
|
128 |
positions = data['boxes']
|
129 |
links = data['links']
|
130 |
|
131 |
-
|
132 |
|
133 |
for i in keep_elements:
|
134 |
element_id = elements[i]
|
|
|
135 |
if element_id is None:
|
136 |
continue
|
137 |
|
@@ -240,6 +242,7 @@ def create_bpmn_object(process, bpmnplane, text_mapping, definitions, size, data
|
|
240 |
|
241 |
# Data Object
|
242 |
elif element_type == 'dataObject' or element_type == 'dataStore':
|
|
|
243 |
dataObject_idx = element_id.split('_')[1]
|
244 |
dataObject_ref = f'DataObjectReference_{dataObject_idx}'
|
245 |
element = ET.SubElement(process, 'bpmn:dataObjectReference', id=dataObject_ref, dataObjectRef=element_id, name=text_mapping[element_id])
|
|
|
22 |
'dataAssociation': 1,
|
23 |
'pool': 1,
|
24 |
'dataObject': 1,
|
25 |
+
'dataStore': 1,
|
26 |
'timerEvent': 1
|
27 |
}
|
28 |
|
|
|
45 |
'parallelGateway': 'parallelGateway',
|
46 |
'dataAssociation': 'dataAssociation',
|
47 |
'pool': 'pool',
|
48 |
+
'dataStore': 'dataStore',
|
49 |
'timerEvent': 'timerEvent'
|
50 |
}.get(Bpmn_id, None)
|
51 |
|
|
|
97 |
status, links_idx = [], []
|
98 |
for j, (k,l) in enumerate(links):
|
99 |
if labels[j] == list(class_dict.values()).index('dataAssociation'):
|
|
|
100 |
if k==i:
|
101 |
status.append('output')
|
102 |
links_idx.append(j)
|
|
|
129 |
positions = data['boxes']
|
130 |
links = data['links']
|
131 |
|
132 |
+
print(elements)
|
133 |
|
134 |
for i in keep_elements:
|
135 |
element_id = elements[i]
|
136 |
+
|
137 |
if element_id is None:
|
138 |
continue
|
139 |
|
|
|
242 |
|
243 |
# Data Object
|
244 |
elif element_type == 'dataObject' or element_type == 'dataStore':
|
245 |
+
print('ici dataObject', element_id)
|
246 |
dataObject_idx = element_id.split('_')[1]
|
247 |
dataObject_ref = f'DataObjectReference_{dataObject_idx}'
|
248 |
element = ET.SubElement(process, 'bpmn:dataObjectReference', id=dataObject_ref, dataObjectRef=element_id, name=text_mapping[element_id])
|