use of org.kie.workbench.common.stunner.core.graph.Edge in project kie-wb-common by kiegroup.
the class ServiceTaskNodeBuilder method doBuild.
@Override
protected Node<View<BPMNDefinition>, Edge> doBuild(final BuilderContext context) {
final Node<View<BPMNDefinition>, Edge> node = super.doBuild(context);
final ServiceTask serviceTask = (ServiceTask) node.getContent().getDefinition();
// Oryx handles the taskName property, use it for populating the service task.
final String taskName = serviceTask.getExecutionSet().getTaskName().getValue();
final WorkItemDefinition workItemDefinition = workItemDefinitionRegistry.get().get(taskName);
ServiceTaskFactory.ServiceTaskBuilder.setProperties(workItemDefinition, serviceTask);
return node;
}
use of org.kie.workbench.common.stunner.core.graph.Edge in project kie-wb-common by kiegroup.
the class EndEventConverter method endNoneEvent.
private BpmnNode endNoneEvent(EndEvent event) {
Node<View<EndNoneEvent>, Edge> node = factoryManager.newNode(event.getId(), EndNoneEvent.class);
EndNoneEvent definition = node.getContent().getDefinition();
EventPropertyReader p = propertyReaderFactory.of(event);
definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
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 EndEventConverter method errorEventDefinition.
private BpmnNode errorEventDefinition(EndEvent event, ErrorEventDefinition e) {
Node<View<EndErrorEvent>, Edge> node = factoryManager.newNode(event.getId(), EndErrorEvent.class);
EndErrorEvent definition = node.getContent().getDefinition();
EventPropertyReader p = propertyReaderFactory.of(event);
definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
definition.setExecutionSet(new ErrorEventExecutionSet(new ErrorRef(e.getErrorRef().getErrorCode())));
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 IntermediateCatchEventConverter method errorEvent.
private BpmnNode errorEvent(CatchEvent event, ErrorEventDefinition e) {
String nodeId = event.getId();
Node<View<IntermediateErrorEventCatching>, Edge> node = factoryManager.newNode(nodeId, IntermediateErrorEventCatching.class);
IntermediateErrorEventCatching definition = node.getContent().getDefinition();
EventPropertyReader p = propertyReaderFactory.of(event);
definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
definition.setExecutionSet(new CancellingErrorEventExecutionSet(new CancelActivity(p.isCancelActivity()), new ErrorRef(e.getErrorRef().getErrorCode())));
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 IntermediateThrowEventConverter method messageEvent.
private BpmnNode messageEvent(IntermediateThrowEvent event, MessageEventDefinition eventDefinition) {
Node<View<IntermediateMessageEventThrowing>, Edge> node = factoryManager.newNode(event.getId(), IntermediateMessageEventThrowing.class);
IntermediateMessageEventThrowing definition = node.getContent().getDefinition();
EventPropertyReader p = propertyReaderFactory.of(event);
definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
definition.setExecutionSet(new MessageEventExecutionSet(new MessageRef(eventDefinition.getMessageRef().getName())));
node.getContent().setBounds(p.getBounds());
definition.setDimensionsSet(p.getCircleDimensionSet());
definition.setFontSet(p.getFontSet());
definition.setBackgroundSet(p.getBackgroundSet());
return BpmnNode.of(node);
}
Aggregations