Search in sources :

Example 1 with CancellingErrorEventExecutionSet

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

Example 2 with CancellingErrorEventExecutionSet

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

Example 3 with CancellingErrorEventExecutionSet

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

the class IntermediateCatchEventConverter method errorEvent.

private PropertyWriter errorEvent(Node<View<IntermediateErrorEventCatching>, ?> n) {
    CatchEventPropertyWriter p = createCatchEventPropertyWriter(n);
    p.getFlowElement().setId(n.getUUID());
    IntermediateErrorEventCatching definition = n.getContent().getDefinition();
    BPMNGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
    CancellingErrorEventExecutionSet executionSet = definition.getExecutionSet();
    p.addError(executionSet.getErrorRef());
    p.setBounds(n.getContent().getBounds());
    return p;
}
Also used : CatchEventPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CatchEventPropertyWriter) IntermediateErrorEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateErrorEventCatching) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) CancellingErrorEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.error.CancellingErrorEventExecutionSet)

Aggregations

IntermediateErrorEventCatching (org.kie.workbench.common.stunner.bpmn.definition.IntermediateErrorEventCatching)3 CancellingErrorEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.error.CancellingErrorEventExecutionSet)3 CancelActivity (org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)2 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 CatchEventPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CatchEventPropertyWriter)1 CatchEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.CatchEventPropertyReader)1 EventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.EventPropertyReader)1 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)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