Search in sources :

Example 1 with SignalScope

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

the class EndEventConverter method signalEventDefinition.

private BpmnNode signalEventDefinition(EndEvent event, SignalEventDefinition nodeId) {
    Node<View<EndSignalEvent>, Edge> node = factoryManager.newNode(event.getId(), EndSignalEvent.class);
    EndSignalEvent 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 ScopedSignalEventExecutionSet(new SignalRef(p.getSignalRef()), new SignalScope(p.getSignalScope())));
    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) SignalRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.SignalRef) ScopedSignalEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.ScopedSignalEventExecutionSet) EndSignalEvent(org.kie.workbench.common.stunner.bpmn.definition.EndSignalEvent) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) SignalScope(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.SignalScope) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Edge(org.kie.workbench.common.stunner.core.graph.Edge) 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 2 with SignalScope

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

the class IntermediateThrowEventConverter method signalEvent.

private BpmnNode signalEvent(IntermediateThrowEvent event, SignalEventDefinition eventDefinition) {
    Node<View<IntermediateSignalEventThrowing>, Edge> node = factoryManager.newNode(event.getId(), IntermediateSignalEventThrowing.class);
    IntermediateSignalEventThrowing 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 ScopedSignalEventExecutionSet(new SignalRef(p.getSignalRef()), new SignalScope(p.getSignalScope())));
    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) SignalRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.SignalRef) ScopedSignalEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.ScopedSignalEventExecutionSet) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) SignalScope(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.SignalScope) IntermediateSignalEventThrowing(org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventThrowing) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Edge(org.kie.workbench.common.stunner.core.graph.Edge) 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 SignalScope

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

the class HashCodeAndEqualityTest method testEndSignalEventEquals.

@Test
public void testEndSignalEventEquals() {
    final String SIGNAL_REF = "signal ref";
    final String SIGNAL_SCOPE = "signal scope";
    final ScopedSignalEventExecutionSet A_EXECUTION_SET = new ScopedSignalEventExecutionSet(new SignalRef(SIGNAL_REF), new SignalScope(SIGNAL_SCOPE));
    final ScopedSignalEventExecutionSet B_EXECUTION_SET = new ScopedSignalEventExecutionSet(new SignalRef(SIGNAL_REF), new SignalScope(SIGNAL_SCOPE));
    final ScopedSignalEventExecutionSet C_EXECUTION_SET = new ScopedSignalEventExecutionSet(new SignalRef("Other value"), new SignalScope(SIGNAL_SCOPE));
    final ScopedSignalEventExecutionSet D_EXECUTION_SET = new ScopedSignalEventExecutionSet(new SignalRef(SIGNAL_REF), new SignalScope(SIGNAL_SCOPE));
    final String ASSIGNMENT_INFO = "some value";
    final DataIOSet A_DATA_SET = new DataIOSet(new AssignmentsInfo(ASSIGNMENT_INFO));
    final DataIOSet B_DATA_SET = new DataIOSet(new AssignmentsInfo(ASSIGNMENT_INFO));
    final DataIOSet C_DATA_SET = new DataIOSet(new AssignmentsInfo(ASSIGNMENT_INFO));
    final DataIOSet D_DATA_SET = new DataIOSet(new AssignmentsInfo("Other value"));
    EndSignalEvent.EndSignalEventBuilder builder = new EndSignalEvent.EndSignalEventBuilder();
    EndSignalEvent a = builder.build();
    a.setExecutionSet(A_EXECUTION_SET);
    a.setDataIOSet(A_DATA_SET);
    builder = new EndSignalEvent.EndSignalEventBuilder();
    EndSignalEvent b = builder.build();
    b.setExecutionSet(B_EXECUTION_SET);
    b.setDataIOSet(B_DATA_SET);
    builder = new EndSignalEvent.EndSignalEventBuilder();
    EndSignalEvent c = builder.build();
    c.setExecutionSet(C_EXECUTION_SET);
    c.setDataIOSet(C_DATA_SET);
    builder = new EndSignalEvent.EndSignalEventBuilder();
    EndSignalEvent d = builder.build();
    d.setExecutionSet(D_EXECUTION_SET);
    d.setDataIOSet(D_DATA_SET);
    assertEquals(a, a);
    assertEquals(a, b);
    assertNotEquals(a, c);
    assertNotEquals(a, d);
    assertNotEquals(a, 19);
    assertNotEquals(a, null);
    a.setExecutionSet(null);
    assertNotEquals(a, b);
    assertNotEquals(b, a);
    a.setExecutionSet(A_EXECUTION_SET);
    assertEquals(a, b);
    a.setDataIOSet(null);
    assertNotEquals(a, b);
    assertNotEquals(b, a);
    EndMessageEvent.EndMessageEventBuilder builderMessage = new EndMessageEvent.EndMessageEventBuilder();
    EndMessageEvent e = builderMessage.build();
    assertNotEquals(a, e);
}
Also used : SignalRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.SignalRef) DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) ScopedSignalEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.ScopedSignalEventExecutionSet) AssignmentsInfo(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo) SignalScope(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.SignalScope) Test(org.junit.Test)

Example 4 with SignalScope

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

the class ProcessSignalRefProviderTest method mockEndSignalEventNode.

private Node mockEndSignalEventNode(String signalRefValue) {
    EndSignalEvent event = new EndSignalEvent();
    event.setExecutionSet(new ScopedSignalEventExecutionSet(new SignalRef(signalRefValue), new SignalScope()));
    return mockNode(event);
}
Also used : SignalRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.SignalRef) ScopedSignalEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.ScopedSignalEventExecutionSet) EndSignalEvent(org.kie.workbench.common.stunner.bpmn.definition.EndSignalEvent) SignalScope(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.SignalScope)

Example 5 with SignalScope

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

the class ProcessSignalRefProviderTest method mockIntermediateSignalEventThrowingNode.

private Node mockIntermediateSignalEventThrowingNode(String signalRefValue) {
    IntermediateSignalEventThrowing event = new IntermediateSignalEventThrowing();
    event.setExecutionSet(new ScopedSignalEventExecutionSet(new SignalRef(signalRefValue), new SignalScope()));
    return mockNode(event);
}
Also used : SignalRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.SignalRef) ScopedSignalEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.ScopedSignalEventExecutionSet) SignalScope(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.SignalScope) IntermediateSignalEventThrowing(org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventThrowing)

Aggregations

ScopedSignalEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.ScopedSignalEventExecutionSet)5 SignalRef (org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.SignalRef)5 SignalScope (org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.SignalScope)5 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)3 EventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.EventPropertyReader)2 ThrowEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ThrowEventPropertyReader)2 EndSignalEvent (org.kie.workbench.common.stunner.bpmn.definition.EndSignalEvent)2 IntermediateSignalEventThrowing (org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventThrowing)2 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)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 Edge (org.kie.workbench.common.stunner.core.graph.Edge)2 View (org.kie.workbench.common.stunner.core.graph.content.view.View)2 Test (org.junit.Test)1 AssignmentsInfo (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo)1