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);
}
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);
}
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);
}
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);
}
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);
}
Aggregations