Search in sources :

Example 6 with ScopedSignalEventExecutionSet

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

the class IntermediateSignalEventThrowingTest method testEquals.

@Test
public void testEquals() {
    IntermediateSignalEventCatching compare1 = new IntermediateSignalEventCatching();
    IntermediateSignalEventThrowing compare2 = new IntermediateSignalEventThrowing(general, backgroundSet, fontSet, dimensionSet, dataIOSet, advancedData, null);
    ScopedSignalEventExecutionSet executionSet = new ScopedSignalEventExecutionSet();
    executionSet.setSignalRef(new SignalRef("SignalRef"));
    IntermediateSignalEventThrowing compare3 = new IntermediateSignalEventThrowing(general, backgroundSet, fontSet, dimensionSet, dataIOSet, advancedData, executionSet);
    IntermediateSignalEventThrowing compare4 = new IntermediateSignalEventThrowing(general, backgroundSet, fontSet, dimensionSet, dataIOSet, advancedData, scopedSignalEventExecutionSet);
    assertFalse(tested.equals(compare1));
    assertFalse(tested.equals(compare2));
    assertFalse(tested.equals(compare3));
    assertTrue(tested.equals(compare4));
}
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) Test(org.junit.Test)

Example 7 with ScopedSignalEventExecutionSet

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

the class IntermediateThrowEventConverter method signalEvent.

protected PropertyWriter signalEvent(Node<View<IntermediateSignalEventThrowing>, ?> n) {
    IntermediateThrowEvent event = bpmn2.createIntermediateThrowEvent();
    event.setId(n.getUUID());
    ThrowEventPropertyWriter p = propertyWriterFactory.of(event);
    IntermediateSignalEventThrowing definition = n.getContent().getDefinition();
    p.setAbsoluteBounds(n);
    BPMNGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    p.setMetaData(definition.getAdvancedData().getMetaDataAttributes());
    p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
    ScopedSignalEventExecutionSet executionSet = definition.getExecutionSet();
    p.addSignal(executionSet.getSignalRef());
    p.addSignalScope(executionSet.getSignalScope());
    return p;
}
Also used : ScopedSignalEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.ScopedSignalEventExecutionSet) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) IntermediateSignalEventThrowing(org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventThrowing) IntermediateThrowEvent(org.eclipse.bpmn2.IntermediateThrowEvent) ThrowEventPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.ThrowEventPropertyWriter)

Example 8 with ScopedSignalEventExecutionSet

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

the class IntermediateThrowEventConverter method signalEvent.

protected BpmnNode signalEvent(IntermediateThrowEvent event) {
    Node<View<IntermediateSignalEventThrowing>, Edge> node = factoryManager.newNode(event.getId(), IntermediateSignalEventThrowing.class);
    IntermediateSignalEventThrowing definition = node.getContent().getDefinition();
    EventPropertyReader p = propertyReaderFactory.of(event);
    node.getContent().setBounds(p.getBounds());
    definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
    definition.setDimensionsSet(p.getCircleDimensionSet());
    definition.setFontSet(p.getFontSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
    definition.setExecutionSet(new ScopedSignalEventExecutionSet(new SignalRef(p.getSignalRef()), new SignalScope(p.getSignalScope())));
    return BpmnNode.of(node, p);
}
Also used : SignalRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.SignalRef) 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) ThrowEventPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ThrowEventPropertyReader) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name) DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) 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) Edge(org.kie.workbench.common.stunner.core.graph.Edge)

Example 9 with ScopedSignalEventExecutionSet

use of org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.ScopedSignalEventExecutionSet 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 10 with ScopedSignalEventExecutionSet

use of org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.ScopedSignalEventExecutionSet 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)10 SignalRef (org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.SignalRef)7 SignalScope (org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.SignalScope)6 IntermediateSignalEventThrowing (org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventThrowing)5 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)4 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)4 Test (org.junit.Test)3 EventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.EventPropertyReader)3 ThrowEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ThrowEventPropertyReader)3 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)3 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)3 Edge (org.kie.workbench.common.stunner.core.graph.Edge)3 View (org.kie.workbench.common.stunner.core.graph.content.view.View)3 EndSignalEvent (org.kie.workbench.common.stunner.bpmn.definition.EndSignalEvent)2 AdvancedData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData)2 IntermediateThrowEvent (org.eclipse.bpmn2.IntermediateThrowEvent)1 ThrowEventPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.ThrowEventPropertyWriter)1 BackgroundSet (org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet)1 AssignmentsInfo (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo)1 CircleDimensionSet (org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.CircleDimensionSet)1