use of org.kie.workbench.common.stunner.bpmn.definition.property.event.error.ErrorRef in project kie-wb-common by kiegroup.
the class StartEventConverter method errorEvent.
private BpmnNode errorEvent(StartEvent event, ErrorEventDefinition e) {
Node<View<StartErrorEvent>, Edge> node = factoryManager.newNode(event.getId(), StartErrorEvent.class);
StartErrorEvent 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 InterruptingErrorEventExecutionSet(new IsInterrupting(event.isIsInterrupting()), // avoids an ErrorRef(null) -- tests expect ""
new ErrorRef(Optional.ofNullable(e.getErrorRef().getErrorCode()).orElse(""))));
definition.setSimulationSet(p.getSimulationSet());
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.bpmn.definition.property.event.error.ErrorRef in project kie-wb-common by kiegroup.
the class ProcessErrorRefProviderTest method mockStartErrorEventNode.
private Element mockStartErrorEventNode(String errorRefValue) {
StartErrorEvent event = new StartErrorEvent();
event.setExecutionSet(new InterruptingErrorEventExecutionSet(new IsInterrupting(true), new ErrorRef(errorRefValue)));
return mockNode(event);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.error.ErrorRef in project kie-wb-common by kiegroup.
the class ProcessErrorRefProviderTest method mockIntermediateErrorEventCatchingNode.
private Node mockIntermediateErrorEventCatchingNode(String errorRefValue) {
IntermediateErrorEventCatching event = new IntermediateErrorEventCatching();
event.setExecutionSet(new CancellingErrorEventExecutionSet(new CancelActivity(true), new ErrorRef(errorRefValue)));
return mockNode(event);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.error.ErrorRef in project kie-wb-common by kiegroup.
the class ProcessErrorRefProviderTest method mockEndErrorEventNode.
private Node mockEndErrorEventNode(String errorRefValue) {
EndErrorEvent event = new EndErrorEvent();
event.setExecutionSet(new ErrorEventExecutionSet(new ErrorRef(errorRefValue)));
return mockNode(event);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.error.ErrorRef 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);
}
Aggregations