DataSourceToSubProcessMapping dataSourceToSubProcessMapping = FixFlowFactory.eINSTANCE.createDataSourceToSubProcessMapping();
while(dataVariableIterator.hasNext()) {
JsonNode dataVariableItemNode = dataVariableIterator.next();
String dataSourceId = dataVariableItemNode.get(PROPERTY_CALLACTIVITY_DATASOURCE_ID).asText();
String subprocessId = dataVariableItemNode.get(PROPERTY_CALLACTIVITY_SUBPROCESS_ID).asText();
DataVariableMapping dataVariableMapping = FixFlowFactory.eINSTANCE.createDataVariableMapping();
dataVariableMapping.setDataSourceId(dataSourceId);
dataVariableMapping.setSubProcesId(subprocessId);
dataSourceToSubProcessMapping.getDataVariableMapping().add(dataVariableMapping);
}
BpmnModelUtil.addExtensionElement(callActivity, FixFlowPackage.Literals.DOCUMENT_ROOT__DATA_SOURCE_TO_SUB_PROCESS_MAPPING, dataSourceToSubProcessMapping);
}
}
JsonNode subprocessToDataSource = getProperty(PROPERTY_CALLACTIVITY_SUBPROCESSTODATASOURCE, elementNode);
if(subprocessToDataSource != null){
JsonNode itemsNode = dataSourceToSubprocess.get(EDITOR_PROPERTIES_GENERAL_ITEMS);
if(itemsNode !=null){
Iterator<JsonNode> dataVariableIterator = itemsNode.getElements();
SubProcessToDataSourceMapping subProcessToDataSourceMapping = FixFlowFactory.eINSTANCE.createSubProcessToDataSourceMapping();
while(dataVariableIterator.hasNext()) {
JsonNode dataVariableItemNode = dataVariableIterator.next();
String dataSourceId = dataVariableItemNode.get(PROPERTY_CALLACTIVITY_DATASOURCE_ID).asText();
String subprocessId = dataVariableItemNode.get(PROPERTY_CALLACTIVITY_SUBPROCESS_ID).asText();
DataVariableMapping dataVariableMapping = FixFlowFactory.eINSTANCE.createDataVariableMapping();
dataVariableMapping.setDataSourceId(dataSourceId);
dataVariableMapping.setSubProcesId(subprocessId);
subProcessToDataSourceMapping.getDataVariableMapping().add(dataVariableMapping);
}
BpmnModelUtil.addExtensionElement(callActivity, FixFlowPackage.Literals.DOCUMENT_ROOT__SUB_PROCESS_TO_DATA_SOURCE_MAPPING, subProcessToDataSourceMapping);
}
}