use of org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet in project kie-wb-common by kiegroup.
the class SubProcessConverter method convertEmbeddedSubprocessNode.
private BpmnNode convertEmbeddedSubprocessNode(SubProcess subProcess) {
Node<View<EmbeddedSubprocess>, Edge> node = factoryManager.newNode(subProcess.getId(), EmbeddedSubprocess.class);
EmbeddedSubprocess definition = node.getContent().getDefinition();
SubProcessPropertyReader p = propertyReaderFactory.of(subProcess);
definition.setGeneral(new BPMNGeneralSet(new Name(subProcess.getName()), new Documentation(p.getDocumentation())));
definition.getOnEntryAction().setValue(p.getOnEntryAction());
definition.getOnExitAction().setValue(p.getOnExitAction());
definition.getIsAsync().setValue(p.isAsync());
definition.setProcessData(new ProcessData(new ProcessVariables(p.getProcessVariables())));
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.bpmn.definition.property.general.BPMNGeneralSet in project kie-wb-common by kiegroup.
the class SequenceFlowConverter method convertEdge.
public BpmnEdge convertEdge(org.eclipse.bpmn2.SequenceFlow seq, Map<String, BpmnNode> nodes) {
Edge<View<SequenceFlow>, Node> edge = factoryManager.newEdge(seq.getId(), SequenceFlow.class);
SequenceFlow definition = edge.getContent().getDefinition();
SequenceFlowPropertyReader p = propertyReaderFactory.of(seq);
definition.setGeneral(new BPMNGeneralSet(new Name(seq.getName()), new Documentation(p.getDocumentation())));
definition.setExecutionSet(new SequenceFlowExecutionSet(new Priority(p.getPriority()), new ConditionExpression(p.getConditionExpression())));
return BpmnEdge.of(edge, nodes.get(p.getSourceId()), p.getSourceConnection(), nodes.get(p.getTargetId()), p.getTargetConnection());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet in project kie-wb-common by kiegroup.
the class StartNoneEventTest method testBPMNGeneralSetNameValid.
@Test
public void testBPMNGeneralSetNameValid() {
BPMNGeneralSet bpmnGeneralSet = new BPMNGeneralSet();
bpmnGeneralSet.setName(new Name(NAME_VALID));
Set<ConstraintViolation<BPMNGeneralSet>> violations = this.validator.validate(bpmnGeneralSet);
assertTrue(violations.isEmpty());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet in project kie-wb-common by kiegroup.
the class EndEventConverter method noneEvent.
private PropertyWriter noneEvent(Node<View<EndNoneEvent>, ?> n) {
EndEvent event = bpmn2.createEndEvent();
event.setId(n.getUUID());
BaseEndEvent definition = n.getContent().getDefinition();
ThrowEventPropertyWriter p = propertyWriterFactory.of(event);
BPMNGeneralSet general = definition.getGeneral();
p.setName(general.getName().getValue());
p.setDocumentation(general.getDocumentation().getValue());
p.setBounds(n.getContent().getBounds());
return p;
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet in project kie-wb-common by kiegroup.
the class EndEventConverter method terminateEvent.
private PropertyWriter terminateEvent(Node<View<EndTerminateEvent>, ?> n) {
EndEvent event = bpmn2.createEndEvent();
event.setId(n.getUUID());
EndTerminateEvent definition = n.getContent().getDefinition();
ThrowEventPropertyWriter p = propertyWriterFactory.of(event);
BPMNGeneralSet general = definition.getGeneral();
p.setName(general.getName().getValue());
p.setDocumentation(general.getDocumentation().getValue());
p.addTerminate();
p.setBounds(n.getContent().getBounds());
return p;
}
Aggregations