Search in sources :

Example 11 with EscalationRef

use of org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationRef 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();
}
Also used : SimulationAttributeSet(org.kie.workbench.common.stunner.bpmn.definition.property.simulation.SimulationAttributeSet) InterruptingEscalationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.InterruptingEscalationEventExecutionSet) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) IsInterrupting(org.kie.workbench.common.stunner.bpmn.definition.property.event.IsInterrupting) DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) FontSet(org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet) SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) BackgroundSet(org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet) CircleDimensionSet(org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.CircleDimensionSet) EscalationRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationRef) Test(org.junit.Test)

Example 12 with EscalationRef

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

the class HashCodeAndEqualityTest method testCancellingEscalationEventExecutionSetEqualsAndHashCode.

@Test
public void testCancellingEscalationEventExecutionSetEqualsAndHashCode() {
    String ESCALATION_REF = "ESCALATION_REF";
    String ESCALATION_REF_1 = "ESCALATION_REF_1";
    TestCaseBuilder.newTestCase().addTrueCase(new CancellingEscalationEventExecutionSet(), new CancellingEscalationEventExecutionSet()).addTrueCase(new CancellingEscalationEventExecutionSet(new CancelActivity(false), new SLADueDate(), new EscalationRef()), new CancellingEscalationEventExecutionSet(new CancelActivity(false), new SLADueDate(), new EscalationRef())).addTrueCase(new CancellingEscalationEventExecutionSet(new CancelActivity(false), new SLADueDate(), new EscalationRef(ESCALATION_REF)), new CancellingEscalationEventExecutionSet(new CancelActivity(false), new SLADueDate(), new EscalationRef(ESCALATION_REF))).addFalseCase(new CancellingEscalationEventExecutionSet(), null).addFalseCase(new CancellingEscalationEventExecutionSet(new CancelActivity(false), new SLADueDate(), new EscalationRef(ESCALATION_REF)), new CancellingEscalationEventExecutionSet(new CancelActivity(false), new SLADueDate(), new EscalationRef(ESCALATION_REF_1))).test();
}
Also used : SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) EscalationRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationRef) CancellingEscalationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.CancellingEscalationEventExecutionSet) CancelActivity(org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity) Test(org.junit.Test)

Example 13 with EscalationRef

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

the class IntermediateCatchEventConverter method escalationEvent.

protected Result<BpmnNode> escalationEvent(CatchEvent event, EscalationEventDefinition e) {
    String nodeId = event.getId();
    Node<View<IntermediateEscalationEvent>, Edge> node = factoryManager.newNode(nodeId, IntermediateEscalationEvent.class);
    IntermediateEscalationEvent definition = node.getContent().getDefinition();
    CatchEventPropertyReader p = propertyReaderFactory.of(event);
    node.getContent().setBounds(p.getBounds());
    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.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
    definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
    definition.setExecutionSet(new CancellingEscalationEventExecutionSet(new CancelActivity(p.isCancelActivity()), new SLADueDate(p.getSlaDueDate()), new EscalationRef(EventDefinitionReader.escalationRefOf(e))));
    return Result.success(BpmnNode.of(node, p));
}
Also used : 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) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name) CancellingEscalationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.CancellingEscalationEventExecutionSet) DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) IntermediateEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEvent) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) CatchEventPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.CatchEventPropertyReader) Edge(org.kie.workbench.common.stunner.core.graph.Edge) EscalationRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationRef) CancelActivity(org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)

Example 14 with EscalationRef

use of org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationRef 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);
}
Also used : InterruptingEscalationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.InterruptingEscalationEventExecutionSet) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) StartEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.StartEscalationEvent) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) IsInterrupting(org.kie.workbench.common.stunner.bpmn.definition.property.event.IsInterrupting) View(org.kie.workbench.common.stunner.core.graph.content.view.View) EventPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.EventPropertyReader) CatchEventPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.CatchEventPropertyReader) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name) DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) Edge(org.kie.workbench.common.stunner.core.graph.Edge) EscalationRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationRef)

Example 15 with EscalationRef

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

the class ProcessEscalationRefProviderTest method mockIntermediateEscalationEventCatchingNode.

private Node mockIntermediateEscalationEventCatchingNode(String escalationRefValue) {
    IntermediateEscalationEvent event = new IntermediateEscalationEvent();
    event.setExecutionSet(new CancellingEscalationEventExecutionSet(new CancelActivity(true), new SLADueDate(), new EscalationRef(escalationRefValue)));
    return mockNode(event);
}
Also used : SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) IntermediateEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEvent) EscalationRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationRef) CancellingEscalationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.CancellingEscalationEventExecutionSet) CancelActivity(org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)

Aggregations

EscalationRef (org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationRef)17 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)10 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)10 AdvancedData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData)10 CancellingEscalationEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.CancellingEscalationEventExecutionSet)9 InterruptingEscalationEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.InterruptingEscalationEventExecutionSet)9 SLADueDate (org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate)8 Test (org.junit.Test)7 EscalationEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationEventExecutionSet)7 BackgroundSet (org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet)4 CircleDimensionSet (org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.CircleDimensionSet)4 CancelActivity (org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)4 IsInterrupting (org.kie.workbench.common.stunner.bpmn.definition.property.event.IsInterrupting)4 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)4 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)4 Edge (org.kie.workbench.common.stunner.core.graph.Edge)4 View (org.kie.workbench.common.stunner.core.graph.content.view.View)4 EventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.EventPropertyReader)3 IntermediateEscalationEvent (org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEvent)3 FontSet (org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet)3