Search in sources :

Example 1 with ProcessPropertyReader

use of org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ProcessPropertyReader in project kie-wb-common by kiegroup.

the class RootProcessConverter method convertProcessNode.

private BpmnNode convertProcessNode(String id, Process process) {
    Node<View<BPMNDiagramImpl>, Edge> diagramNode = factoryManager.newNode(id, BPMNDiagramImpl.class);
    BPMNDiagramImpl definition = diagramNode.getContent().getDefinition();
    ProcessPropertyReader e = propertyReaderFactory.of(process);
    definition.setDiagramSet(new DiagramSet(new Name(process.getName()), new Documentation(e.getDocumentation()), new Id(process.getId()), new Package(e.getPackage()), new Version(e.getVersion()), new AdHoc(e.isAdHoc()), new ProcessInstanceDescription(e.getDescription()), new Executable(process.isIsExecutable())));
    definition.setProcessData(new ProcessData(new ProcessVariables(e.getProcessVariables())));
    diagramNode.getContent().setBounds(e.getBounds());
    definition.setFontSet(e.getFontSet());
    definition.setBackgroundSet(e.getBackgroundSet());
    return BpmnNode.of(diagramNode);
}
Also used : Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) ProcessInstanceDescription(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.ProcessInstanceDescription) View(org.kie.workbench.common.stunner.core.graph.content.view.View) ProcessData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessData) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name) ProcessVariables(org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessVariables) Version(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.Version) DiagramSet(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.DiagramSet) BPMNDiagramImpl(org.kie.workbench.common.stunner.bpmn.definition.BPMNDiagramImpl) Id(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.Id) Package(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.Package) AdHoc(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.AdHoc) Executable(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.Executable) Edge(org.kie.workbench.common.stunner.core.graph.Edge) ProcessPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ProcessPropertyReader)

Aggregations

ProcessPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ProcessPropertyReader)1 BPMNDiagramImpl (org.kie.workbench.common.stunner.bpmn.definition.BPMNDiagramImpl)1 AdHoc (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.AdHoc)1 DiagramSet (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.DiagramSet)1 Executable (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.Executable)1 Id (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.Id)1 Package (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.Package)1 ProcessInstanceDescription (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.ProcessInstanceDescription)1 Version (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.Version)1 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)1 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)1 ProcessData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessData)1 ProcessVariables (org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessVariables)1 Edge (org.kie.workbench.common.stunner.core.graph.Edge)1 View (org.kie.workbench.common.stunner.core.graph.content.view.View)1