use of org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.InterruptingEscalationEventExecutionSet in project kie-wb-common by kiegroup.
the class HashCodeAndEqualityTest method testInterruptingEscalationEventExecutionSetEqualsAndHashCode.
@Test
public void testInterruptingEscalationEventExecutionSetEqualsAndHashCode() {
String ESCALATION_REF = "ESCALATION_REF";
String ESCALATION_REF_1 = "ESCALATION_REF_1";
TestCaseBuilder.newTestCase().addTrueCase(new InterruptingEscalationEventExecutionSet(), new InterruptingEscalationEventExecutionSet()).addTrueCase(new InterruptingEscalationEventExecutionSet(new IsInterrupting(false), new SLADueDate(), new EscalationRef()), new InterruptingEscalationEventExecutionSet(new IsInterrupting(false), new SLADueDate(), new EscalationRef())).addTrueCase(new InterruptingEscalationEventExecutionSet(new IsInterrupting(false), new SLADueDate(), new EscalationRef(ESCALATION_REF)), new InterruptingEscalationEventExecutionSet(new IsInterrupting(false), new SLADueDate(), new EscalationRef(ESCALATION_REF))).addFalseCase(new InterruptingEscalationEventExecutionSet(), null).addFalseCase(new InterruptingEscalationEventExecutionSet(new IsInterrupting(false), new SLADueDate(), new EscalationRef(ESCALATION_REF)), new InterruptingEscalationEventExecutionSet(new IsInterrupting(true), new SLADueDate(), new EscalationRef(ESCALATION_REF))).addFalseCase(new InterruptingEscalationEventExecutionSet(new IsInterrupting(false), new SLADueDate(), new EscalationRef(ESCALATION_REF)), new InterruptingEscalationEventExecutionSet(new IsInterrupting(false), new SLADueDate(), new EscalationRef(ESCALATION_REF_1))).test();
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.InterruptingEscalationEventExecutionSet in project kie-wb-common by kiegroup.
the class HashCodeAndEqualityTest method testStartEscalationEventEqualsAndHashCode.
@Test
public void testStartEscalationEventEqualsAndHashCode() {
String ESCALATION_REF = "ESCALATION_REF";
String ESCALATION_REF_1 = "ESCALATION_REF_1";
TestCaseBuilder.newTestCase().addTrueCase(new StartEscalationEvent(), new StartEscalationEvent()).addTrueCase(new StartEscalationEvent(new BPMNGeneralSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new SimulationAttributeSet(), new AdvancedData(), new DataIOSet(), new InterruptingEscalationEventExecutionSet()), new StartEscalationEvent(new BPMNGeneralSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new SimulationAttributeSet(), new AdvancedData(), new DataIOSet(), new InterruptingEscalationEventExecutionSet())).addFalseCase(new StartEscalationEvent(), null).addFalseCase(new StartEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new SimulationAttributeSet(), new AdvancedData(), new DataIOSet(), new InterruptingEscalationEventExecutionSet()), new StartEscalationEvent(new BPMNGeneralSet("name1", "doc1"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new SimulationAttributeSet(), new AdvancedData(), new DataIOSet(), new InterruptingEscalationEventExecutionSet())).addFalseCase(new StartEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new SimulationAttributeSet(), new AdvancedData(), new DataIOSet(), new InterruptingEscalationEventExecutionSet(new IsInterrupting(true), new SLADueDate(), new EscalationRef(ESCALATION_REF))), new StartEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new SimulationAttributeSet(), new AdvancedData(), new DataIOSet(), new InterruptingEscalationEventExecutionSet(new IsInterrupting(false), new SLADueDate(), new EscalationRef(ESCALATION_REF)))).addFalseCase(new StartEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new SimulationAttributeSet(), new AdvancedData(), new DataIOSet(), new InterruptingEscalationEventExecutionSet(new IsInterrupting(true), new SLADueDate(), new EscalationRef(ESCALATION_REF))), new StartEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new SimulationAttributeSet(), new AdvancedData(), new DataIOSet(), new InterruptingEscalationEventExecutionSet(new IsInterrupting(true), new SLADueDate(), new EscalationRef(ESCALATION_REF_1)))).addFalseCase(new StartEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new SimulationAttributeSet(), new AdvancedData(), new DataIOSet(), new InterruptingEscalationEventExecutionSet(new IsInterrupting(false), new SLADueDate(), new EscalationRef(ESCALATION_REF))), new StartEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new SimulationAttributeSet(), new AdvancedData(), new DataIOSet("data"), new InterruptingEscalationEventExecutionSet(new IsInterrupting(false), new SLADueDate(), new EscalationRef(ESCALATION_REF)))).addFalseCase(new StartEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new SimulationAttributeSet(), new AdvancedData(), new DataIOSet("data"), new InterruptingEscalationEventExecutionSet(new IsInterrupting(false), new SLADueDate(), new EscalationRef(ESCALATION_REF))), new StartEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new SimulationAttributeSet(), new AdvancedData(), new DataIOSet(), new InterruptingEscalationEventExecutionSet(null, null, new EscalationRef(ESCALATION_REF)))).addFalseCase(new StartEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new SimulationAttributeSet(), new AdvancedData(), new DataIOSet("data"), new InterruptingEscalationEventExecutionSet(new IsInterrupting(false), new SLADueDate(), new EscalationRef(ESCALATION_REF))), new StartEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new SimulationAttributeSet(), new AdvancedData(), new DataIOSet(), new InterruptingEscalationEventExecutionSet(new IsInterrupting(false), null, null))).addFalseCase(new StartEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new SimulationAttributeSet(), new AdvancedData(), new DataIOSet("data"), new InterruptingEscalationEventExecutionSet(new IsInterrupting(false), new SLADueDate(), new EscalationRef(ESCALATION_REF))), new StartEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new SimulationAttributeSet(), new AdvancedData(), null, new InterruptingEscalationEventExecutionSet(new IsInterrupting(false), new SLADueDate(), new EscalationRef(ESCALATION_REF)))).test();
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.InterruptingEscalationEventExecutionSet in project kie-wb-common by kiegroup.
the class StartEventConverter method escalationEvent.
private PropertyWriter escalationEvent(Node<View<StartEscalationEvent>, ?> n) {
StartEvent event = bpmn2.createStartEvent();
event.setId(n.getUUID());
StartEscalationEvent definition = n.getContent().getDefinition();
CatchEventPropertyWriter p = propertyWriterFactory.of(event);
BPMNGeneralSet general = definition.getGeneral();
p.setName(general.getName().getValue());
p.setDocumentation(general.getDocumentation().getValue());
p.setMetaData(definition.getAdvancedData().getMetaDataAttributes());
p.setSimulationSet(definition.getSimulationSet());
p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
InterruptingEscalationEventExecutionSet executionSet = definition.getExecutionSet();
event.setIsInterrupting(executionSet.getIsInterrupting().getValue());
p.addSlaDueDate(executionSet.getSlaDueDate());
p.setAbsoluteBounds(n);
p.addEscalation(executionSet.getEscalationRef());
return p;
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.InterruptingEscalationEventExecutionSet in project kie-wb-common by kiegroup.
the class StartEventConverter method escalationEvent.
private BpmnNode escalationEvent(StartEvent event, EscalationEventDefinition e) {
Node<View<StartEscalationEvent>, Edge> node = factoryManager.newNode(event.getId(), StartEscalationEvent.class);
StartEscalationEvent definition = node.getContent().getDefinition();
EventPropertyReader p = propertyReaderFactory.of(event);
definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
definition.setBackgroundSet(p.getBackgroundSet());
definition.setFontSet(p.getFontSet());
definition.setDimensionsSet(p.getCircleDimensionSet());
definition.setSimulationSet(p.getSimulationSet());
definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
IsInterrupting isInterrupting = new IsInterrupting(event.isIsInterrupting());
SLADueDate slaDueDate = new SLADueDate(p.getSlaDueDate());
EscalationRef escalationRef = new EscalationRef(EventDefinitionReader.escalationRefOf(e));
InterruptingEscalationEventExecutionSet executionSet = new InterruptingEscalationEventExecutionSet(isInterrupting, slaDueDate, escalationRef);
definition.setExecutionSet(executionSet);
node.getContent().setBounds(p.getBounds());
return BpmnNode.of(node, p);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.InterruptingEscalationEventExecutionSet in project kie-wb-common by kiegroup.
the class ProcessEscalationRefProviderTest method mockStartEscalationEventNode.
private Node mockStartEscalationEventNode(String escalationRefValue) {
StartEscalationEvent event = new StartEscalationEvent();
event.setExecutionSet(new InterruptingEscalationEventExecutionSet(new IsInterrupting(true), new SLADueDate(), new EscalationRef(escalationRefValue)));
return mockNode(event);
}
Aggregations