use of org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.DefinitionsPropertyWriter in project kie-wb-common by kiegroup.
the class DefinitionsConverter method toDefinitions.
public Definitions toDefinitions() {
Definitions definitions = bpmn2.createDefinitions();
DefinitionsPropertyWriter p = propertyWriterFactory.of(definitions);
ProcessPropertyWriter pp = processConverter.convertProcess();
Node<Definition<BPMNDiagram>, ?> node = converterFactory.context.firstNode();
BPMNDiagram definition = node.getContent().getDefinition();
BaseDiagramSet diagramSet = definition.getDiagramSet();
p.setExporter("jBPM Process Modeler");
p.setExporterVersion("2.0");
p.setProcess(pp.getProcess());
p.setDiagram(pp.getBpmnDiagram());
p.setRelationship(pp.getRelationship());
p.setWSDLImports(diagramSet.getImports().getValue().getWSDLImports());
p.addAllRootElements(pp.getItemDefinitions());
p.addAllRootElements(pp.getRootElements());
p.addAllRootElements(pp.getInterfaces());
return definitions;
}
Aggregations