Search in sources :

Example 1 with DefinitionsPropertyWriter

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;
}
Also used : BPMNDiagram(org.kie.workbench.common.stunner.bpmn.definition.BPMNDiagram) BaseDiagramSet(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.BaseDiagramSet) Definitions(org.eclipse.bpmn2.Definitions) DefinitionsPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.DefinitionsPropertyWriter) Definition(org.kie.workbench.common.stunner.core.graph.content.definition.Definition) ProcessPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.ProcessPropertyWriter)

Aggregations

Definitions (org.eclipse.bpmn2.Definitions)1 DefinitionsPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.DefinitionsPropertyWriter)1 ProcessPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.ProcessPropertyWriter)1 BPMNDiagram (org.kie.workbench.common.stunner.bpmn.definition.BPMNDiagram)1 BaseDiagramSet (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.BaseDiagramSet)1 Definition (org.kie.workbench.common.stunner.core.graph.content.definition.Definition)1