Search in sources :

Example 1 with IntermediateSignalEventCatching

use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching in project kie-wb-common by kiegroup.

the class IntermediateCatchEventConverter method signalEvent.

private BpmnNode signalEvent(CatchEvent event, SignalEventDefinition e) {
    String nodeId = event.getId();
    Node<View<IntermediateSignalEventCatching>, Edge> node = factoryManager.newNode(nodeId, IntermediateSignalEventCatching.class);
    IntermediateSignalEventCatching 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 CancellingSignalEventExecutionSet(new CancelActivity(p.isCancelActivity()), new SignalRef(p.getSignalRef())));
    node.getContent().setBounds(p.getBounds());
    definition.setDimensionsSet(p.getCircleDimensionSet());
    definition.setFontSet(p.getFontSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    return BpmnNode.of(node);
}
Also used : SignalRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.SignalRef) IntermediateSignalEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) 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) CancellingSignalEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.CancellingSignalEventExecutionSet) Edge(org.kie.workbench.common.stunner.core.graph.Edge) CancelActivity(org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)

Example 2 with IntermediateSignalEventCatching

use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching in project kie-wb-common by kiegroup.

the class IntermediateCatchEventConverter method signalEvent.

protected PropertyWriter signalEvent(Node<View<IntermediateSignalEventCatching>, ?> n) {
    CatchEventPropertyWriter p = createCatchEventPropertyWriter(n);
    p.getFlowElement().setId(n.getUUID());
    p.setAbsoluteBounds(n);
    IntermediateSignalEventCatching definition = n.getContent().getDefinition();
    BPMNGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    p.setMetaData(definition.getAdvancedData().getMetaDataAttributes());
    p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
    CancellingSignalEventExecutionSet executionSet = definition.getExecutionSet();
    p.setCancelActivity(executionSet.getCancelActivity().getValue());
    p.addSlaDueDate(executionSet.getSlaDueDate());
    p.addSignal(definition.getExecutionSet().getSignalRef());
    return p;
}
Also used : IntermediateSignalEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching) CatchEventPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CatchEventPropertyWriter) CancellingSignalEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.CancellingSignalEventExecutionSet) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)

Example 3 with IntermediateSignalEventCatching

use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching in project kie-wb-common by kiegroup.

the class IntermediateCatchEventConverterTest method createIntermediateSignalEventCatchingNode.

private Node createIntermediateSignalEventCatchingNode() {
    CancellingSignalEventExecutionSet executionSet = new CancellingSignalEventExecutionSet(new CancelActivity(CANCEL_ACTIVITY), slaDueDate, signalRef);
    IntermediateSignalEventCatching eventCatching = new IntermediateSignalEventCatching(generalSet, mock(BackgroundSet.class), mock(FontSet.class), mock(CircleDimensionSet.class), dataIOSet, advancedData, executionSet);
    Node dockNode = mockNode();
    Node node = mockDockedNode(dockNode, eventCatching);
    return node;
}
Also used : FontSet(org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet) IntermediateSignalEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching) BackgroundSet(org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet) CircleDimensionSet(org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.CircleDimensionSet) Node(org.kie.workbench.common.stunner.core.graph.Node) CancellingSignalEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.CancellingSignalEventExecutionSet) CancelActivity(org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)

Example 4 with IntermediateSignalEventCatching

use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching in project kie-wb-common by kiegroup.

the class BoundaryCatchingIntermediateSignalEventTest method testUnmarshallTopLevelEventWithEdgesEmptyProperties.

@Test
@Override
public void testUnmarshallTopLevelEventWithEdgesEmptyProperties() {
    Diagram<Graph, Metadata> diagram = getDiagram();
    assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
    IntermediateSignalEventCatching emptyEvent = getCatchingIntermediateNodeById(diagram, EMPTY_WITH_EDGES_TOP_LEVEL_EVENT_ID, HAS_NO_INCOME_EDGE, TWO_OUTGOING_EDGES);
    assertGeneralSet(emptyEvent.getGeneral(), EMPTY_VALUE, EMPTY_VALUE);
    assertSignalEventExecutionSet(emptyEvent.getExecutionSet(), EMPTY_VALUE, NON_CANCELLING, EMPTY_VALUE);
    assertDataIOSet(emptyEvent.getDataIOSet(), EMPTY_VALUE);
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) IntermediateSignalEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) Test(org.junit.Test)

Example 5 with IntermediateSignalEventCatching

use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching in project kie-wb-common by kiegroup.

the class BoundaryCatchingIntermediateSignalEventTest method testUnmarshallTopLevelEmptyEventProperties.

@Test
@Override
public void testUnmarshallTopLevelEmptyEventProperties() throws Exception {
    Diagram<Graph, Metadata> diagram = getDiagram();
    assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
    IntermediateSignalEventCatching emptyTopEvent = getCatchingIntermediateNodeById(diagram, EMPTY_TOP_LEVEL_EVENT_ID, HAS_NO_INCOME_EDGE, ZERO_OUTGOING_EDGES);
    assertGeneralSet(emptyTopEvent.getGeneral(), EMPTY_VALUE, EMPTY_VALUE);
    assertSignalEventExecutionSet(emptyTopEvent.getExecutionSet(), EMPTY_VALUE, NON_CANCELLING, EMPTY_VALUE);
    assertDataIOSet(emptyTopEvent.getDataIOSet(), EMPTY_VALUE);
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) IntermediateSignalEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) Test(org.junit.Test)

Aggregations

IntermediateSignalEventCatching (org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching)33 Test (org.junit.Test)24 Metadata (org.kie.workbench.common.stunner.core.diagram.Metadata)18 Graph (org.kie.workbench.common.stunner.core.graph.Graph)18 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)5 CancellingSignalEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.CancellingSignalEventExecutionSet)5 CancelActivity (org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)4 SignalEventDefinition (org.eclipse.bpmn2.SignalEventDefinition)3 IntermediateMessageEventCatching (org.kie.workbench.common.stunner.bpmn.definition.IntermediateMessageEventCatching)3 AssignmentsInfo (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo)3 SignalRef (org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.SignalRef)3 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)3 IntermediateCatchEvent (org.eclipse.bpmn2.IntermediateCatchEvent)2 CatchEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.CatchEventPropertyReader)2 BaseCatchingIntermediateEvent (org.kie.workbench.common.stunner.bpmn.definition.BaseCatchingIntermediateEvent)2 IntermediateConditionalEvent (org.kie.workbench.common.stunner.bpmn.definition.IntermediateConditionalEvent)2 IntermediateErrorEventCatching (org.kie.workbench.common.stunner.bpmn.definition.IntermediateErrorEventCatching)2 IntermediateTimerEvent (org.kie.workbench.common.stunner.bpmn.definition.IntermediateTimerEvent)2 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)2 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)2