use of org.kie.workbench.common.stunner.core.graph.Edge in project kie-wb-common by kiegroup.
the class GatewayConverter method inclusiveGateway.
private BpmnNode inclusiveGateway(Gateway gateway) {
Node<View<InclusiveGateway>, Edge> node = factoryManager.newNode(gateway.getId(), InclusiveGateway.class);
InclusiveGateway definition = node.getContent().getDefinition();
GatewayPropertyReader p = propertyReaderFactory.of(gateway);
definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
definition.setExecutionSet(new GatewayExecutionSet(new DefaultRoute(p.getDefaultRoute())));
node.getContent().setBounds(p.getBounds());
definition.setDimensionsSet(p.getCircleDimensionSet());
definition.setFontSet(p.getFontSet());
definition.setBackgroundSet(p.getBackgroundSet());
return BpmnNode.of(node);
}
use of org.kie.workbench.common.stunner.core.graph.Edge in project kie-wb-common by kiegroup.
the class GatewayConverter method exclusiveGateway.
private BpmnNode exclusiveGateway(Gateway gateway) {
Node<View<ExclusiveGateway>, Edge> node = factoryManager.newNode(gateway.getId(), ExclusiveGateway.class);
ExclusiveGateway definition = node.getContent().getDefinition();
GatewayPropertyReader p = propertyReaderFactory.of(gateway);
definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
definition.setExecutionSet(new GatewayExecutionSet(new DefaultRoute(p.getDefaultRoute())));
node.getContent().setBounds(p.getBounds());
definition.setDimensionsSet(p.getCircleDimensionSet());
definition.setFontSet(p.getFontSet());
definition.setBackgroundSet(p.getBackgroundSet());
return BpmnNode.of(node);
}
use of org.kie.workbench.common.stunner.core.graph.Edge 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);
}
use of org.kie.workbench.common.stunner.core.graph.Edge in project kie-wb-common by kiegroup.
the class SubProcessConverter method convertAdHocSubProcess.
private BpmnNode convertAdHocSubProcess(org.eclipse.bpmn2.AdHocSubProcess subProcess) {
Node<View<AdHocSubprocess>, Edge> node = factoryManager.newNode(subProcess.getId(), AdHocSubprocess.class);
AdHocSubprocess definition = node.getContent().getDefinition();
AdHocSubProcessPropertyReader p = propertyReaderFactory.of(subProcess);
definition.setGeneral(new BPMNGeneralSet(new Name(subProcess.getName()), new Documentation(p.getDocumentation())));
definition.setProcessData(new ProcessData(new ProcessVariables(p.getProcessVariables())));
definition.setExecutionSet(new AdHocSubprocessTaskExecutionSet(new AdHocCompletionCondition(p.getAdHocCompletionCondition()), new AdHocOrdering(p.getAdHocOrdering()), new OnEntryAction(p.getOnEntryAction()), new OnExitAction(p.getOnExitAction())));
definition.setSimulationSet(p.getSimulationSet());
node.getContent().setBounds(p.getBounds());
definition.setDimensionsSet(p.getRectangleDimensionsSet());
definition.setFontSet(p.getFontSet());
definition.setBackgroundSet(p.getBackgroundSet());
return BpmnNode.of(node);
}
use of org.kie.workbench.common.stunner.core.graph.Edge in project kie-wb-common by kiegroup.
the class SubProcessConverter method convertEventSubprocessNode.
private BpmnNode convertEventSubprocessNode(SubProcess subProcess) {
Node<View<EventSubprocess>, Edge> node = factoryManager.newNode(subProcess.getId(), EventSubprocess.class);
EventSubprocess definition = node.getContent().getDefinition();
SubProcessPropertyReader p = propertyReaderFactory.of(subProcess);
definition.setGeneral(new BPMNGeneralSet(new Name(subProcess.getName()), new Documentation(p.getDocumentation())));
definition.getIsAsync().setValue(p.isAsync());
definition.setProcessData(new ProcessData(new ProcessVariables(p.getProcessVariables())));
definition.setSimulationSet(p.getSimulationSet());
definition.setDimensionsSet(p.getRectangleDimensionsSet());
definition.setFontSet(p.getFontSet());
definition.setBackgroundSet(p.getBackgroundSet());
node.getContent().setBounds(p.getBounds());
return BpmnNode.of(node);
}
Aggregations