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);
}
Aggregations