Search in sources :

Example 1 with ErrorEventExecutionSet

use of org.kie.workbench.common.stunner.bpmn.definition.property.event.error.ErrorEventExecutionSet 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);
}
Also used : ErrorRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.error.ErrorRef) EndErrorEvent(org.kie.workbench.common.stunner.bpmn.definition.EndErrorEvent) CancellingErrorEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.error.CancellingErrorEventExecutionSet) InterruptingErrorEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.error.InterruptingErrorEventExecutionSet) ErrorEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.error.ErrorEventExecutionSet)

Example 2 with ErrorEventExecutionSet

use of org.kie.workbench.common.stunner.bpmn.definition.property.event.error.ErrorEventExecutionSet 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);
}
Also used : DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) ErrorRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.error.ErrorRef) EndErrorEvent(org.kie.workbench.common.stunner.bpmn.definition.EndErrorEvent) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Edge(org.kie.workbench.common.stunner.core.graph.Edge) ErrorEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.error.ErrorEventExecutionSet) EventPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.EventPropertyReader) ThrowEventPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ThrowEventPropertyReader) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)

Example 3 with ErrorEventExecutionSet

use of org.kie.workbench.common.stunner.bpmn.definition.property.event.error.ErrorEventExecutionSet in project kie-wb-common by kiegroup.

the class EndEventConverter method errorEvent.

private PropertyWriter errorEvent(Node<View<EndErrorEvent>, ?> n) {
    EndEvent event = bpmn2.createEndEvent();
    event.setId(n.getUUID());
    EndErrorEvent definition = n.getContent().getDefinition();
    ThrowEventPropertyWriter p = propertyWriterFactory.of(event);
    BPMNGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
    ErrorEventExecutionSet executionSet = definition.getExecutionSet();
    p.addError(executionSet.getErrorRef());
    p.setBounds(n.getContent().getBounds());
    return p;
}
Also used : BaseEndEvent(org.kie.workbench.common.stunner.bpmn.definition.BaseEndEvent) EndEvent(org.eclipse.bpmn2.EndEvent) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) EndErrorEvent(org.kie.workbench.common.stunner.bpmn.definition.EndErrorEvent) ErrorEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.error.ErrorEventExecutionSet) ThrowEventPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.ThrowEventPropertyWriter)

Aggregations

EndErrorEvent (org.kie.workbench.common.stunner.bpmn.definition.EndErrorEvent)3 ErrorEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.error.ErrorEventExecutionSet)3 ErrorRef (org.kie.workbench.common.stunner.bpmn.definition.property.event.error.ErrorRef)2 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)2 EndEvent (org.eclipse.bpmn2.EndEvent)1 ThrowEventPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.ThrowEventPropertyWriter)1 EventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.EventPropertyReader)1 ThrowEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ThrowEventPropertyReader)1 BaseEndEvent (org.kie.workbench.common.stunner.bpmn.definition.BaseEndEvent)1 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)1 CancellingErrorEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.error.CancellingErrorEventExecutionSet)1 InterruptingErrorEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.error.InterruptingErrorEventExecutionSet)1 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)1 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)1 Edge (org.kie.workbench.common.stunner.core.graph.Edge)1 View (org.kie.workbench.common.stunner.core.graph.content.view.View)1