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.
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);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.ScopedSignalEventExecutionSet in project kie-wb-common by kiegroup.
the class IntermediateThrowEventConverterTest method createIntermediateSignalEventThrowingNode.
private Node createIntermediateSignalEventThrowingNode() {
ScopedSignalEventExecutionSet executionSet = new ScopedSignalEventExecutionSet(signalRef, signalScope);
IntermediateSignalEventThrowing eventThrowing = new IntermediateSignalEventThrowing(generalSet, mock(BackgroundSet.class), mock(FontSet.class), mock(CircleDimensionSet.class), dataIOSet, advancedData, executionSet);
Node dockNode = mockNode();
Node node = mockDockedNode(dockNode, eventThrowing);
return node;
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.ScopedSignalEventExecutionSet 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 a = new EndSignalEvent();
a.setExecutionSet(A_EXECUTION_SET);
a.setDataIOSet(A_DATA_SET);
EndSignalEvent b = new EndSignalEvent();
b.setExecutionSet(B_EXECUTION_SET);
b.setDataIOSet(B_DATA_SET);
EndSignalEvent c = new EndSignalEvent();
c.setExecutionSet(C_EXECUTION_SET);
c.setDataIOSet(C_DATA_SET);
EndSignalEvent d = new EndSignalEvent();
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 e = new EndMessageEvent();
assertNotEquals(a, e);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.ScopedSignalEventExecutionSet 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.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
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, p);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.ScopedSignalEventExecutionSet in project kie-wb-common by kiegroup.
the class IntermediateSignalEventThrowingTest method setExecutionSet.
@Test
public void setExecutionSet() {
ScopedSignalEventExecutionSet executionSet = mock(ScopedSignalEventExecutionSet.class);
tested.setExecutionSet(executionSet);
assertEquals(executionSet, tested.executionSet);
}
Aggregations