Search in sources :

Example 11 with StartEscalationEvent

use of org.kie.workbench.common.stunner.bpmn.definition.StartEscalationEvent in project kie-wb-common by kiegroup.

the class StartEscalationEventTest method testUnmarshallSubprocessLevelEventFilledProperties.

@Test
@Override
public void testUnmarshallSubprocessLevelEventFilledProperties() throws Exception {
    final String EVENT_NAME = "Escalation event02 name ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
    final String EVENT_DOCUMENTATION = "Escalation event02 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
    final String ESCALATION_REF = "escalation02";
    final String EVENT_DATA_OUTPUT = "||output:String||[dout]output->processGlobalVar";
    Diagram<Graph, Metadata> diagram = getDiagram();
    assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
    StartEscalationEvent filledSubprocess = getStartNodeById(diagram, FILLED_SUBPROCESS_LEVEL_EVENT_ID);
    assertGeneralSet(filledSubprocess.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
    assertEscalationEventExecutionSet(filledSubprocess.getExecutionSet(), ESCALATION_REF, INTERRUPTING, SLA_DUE_DATE);
    assertDataIOSet(filledSubprocess.getDataIOSet(), EVENT_DATA_OUTPUT);
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) StartEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.StartEscalationEvent) Test(org.junit.Test)

Example 12 with StartEscalationEvent

use of org.kie.workbench.common.stunner.bpmn.definition.StartEscalationEvent in project kie-wb-common by kiegroup.

the class StartEscalationEventTest method testUnmarshallTopLevelEventFilledProperties.

@Test
@Override
public void testUnmarshallTopLevelEventFilledProperties() throws Exception {
    final String EVENT_NAME = "Escalation event01 name ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
    final String EVENT_DOCUMENTATION = "Escalation event01 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
    final String ESCALATION_REF = "escalation01";
    final String EVENT_DATA_OUTPUT = "||output:String||[dout]output->processGlobalVar";
    Diagram<Graph, Metadata> diagram = getDiagram();
    assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
    StartEscalationEvent filledTop = getStartNodeById(diagram, FILLED_TOP_LEVEL_EVENT_ID);
    assertGeneralSet(filledTop.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
    assertEscalationEventExecutionSet(filledTop.getExecutionSet(), ESCALATION_REF, INTERRUPTING, SLA_DUE_DATE);
    assertDataIOSet(filledTop.getDataIOSet(), EVENT_DATA_OUTPUT);
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) StartEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.StartEscalationEvent) Test(org.junit.Test)

Example 13 with StartEscalationEvent

use of org.kie.workbench.common.stunner.bpmn.definition.StartEscalationEvent in project kie-wb-common by kiegroup.

the class EventInterruptingViewHandlerTest method testHandleEscalationIsNotInterrupting.

@Test
@SuppressWarnings("unchecked")
public void testHandleEscalationIsNotInterrupting() {
    final StartEscalationEvent bean = new StartEscalationEvent();
    bean.getExecutionSet().getIsInterrupting().setValue(false);
    tested.handle(bean, view);
    verify(prim1).setFillAlpha(eq(0d));
    verify(prim1).setStrokeAlpha(eq(1d));
}
Also used : StartEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.StartEscalationEvent) Test(org.junit.Test)

Example 14 with StartEscalationEvent

use of org.kie.workbench.common.stunner.bpmn.definition.StartEscalationEvent in project kie-wb-common by kiegroup.

the class StartEventFilterProviderFactoryTest method testFilterProviderShowIsInterruptingField.

@Test
public void testFilterProviderShowIsInterruptingField() {
    BaseStartEvent[] testedClasses = { new StartSignalEvent(), new StartTimerEvent(), new StartConditionalEvent(), new StartEscalationEvent(), new StartMessageEvent() };
    when(parentView.getDefinition()).thenReturn(eventSubprocess);
    Stream.of(testedClasses).forEach(startEvent -> testStartEventFilterProviderShowIsInterruptingField(startEvent));
}
Also used : BaseStartEvent(org.kie.workbench.common.stunner.bpmn.definition.BaseStartEvent) StartSignalEvent(org.kie.workbench.common.stunner.bpmn.definition.StartSignalEvent) StartMessageEvent(org.kie.workbench.common.stunner.bpmn.definition.StartMessageEvent) StartTimerEvent(org.kie.workbench.common.stunner.bpmn.definition.StartTimerEvent) StartEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.StartEscalationEvent) StartConditionalEvent(org.kie.workbench.common.stunner.bpmn.definition.StartConditionalEvent) Test(org.junit.Test)

Example 15 with StartEscalationEvent

use of org.kie.workbench.common.stunner.bpmn.definition.StartEscalationEvent 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);
}
Also used : SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) InterruptingEscalationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.InterruptingEscalationEventExecutionSet) StartEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.StartEscalationEvent) IsInterrupting(org.kie.workbench.common.stunner.bpmn.definition.property.event.IsInterrupting) EscalationRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationRef)

Aggregations

StartEscalationEvent (org.kie.workbench.common.stunner.bpmn.definition.StartEscalationEvent)15 Test (org.junit.Test)10 Metadata (org.kie.workbench.common.stunner.core.diagram.Metadata)5 Graph (org.kie.workbench.common.stunner.core.graph.Graph)5 BaseStartEvent (org.kie.workbench.common.stunner.bpmn.definition.BaseStartEvent)3 StartMessageEvent (org.kie.workbench.common.stunner.bpmn.definition.StartMessageEvent)3 StartSignalEvent (org.kie.workbench.common.stunner.bpmn.definition.StartSignalEvent)3 InterruptingEscalationEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.InterruptingEscalationEventExecutionSet)3 StartConditionalEvent (org.kie.workbench.common.stunner.bpmn.definition.StartConditionalEvent)2 StartErrorEvent (org.kie.workbench.common.stunner.bpmn.definition.StartErrorEvent)2 AssignmentsInfo (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo)2 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)2 IsInterrupting (org.kie.workbench.common.stunner.bpmn.definition.property.event.IsInterrupting)2 EscalationRef (org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationRef)2 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)2 SLADueDate (org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate)2 StartEvent (org.eclipse.bpmn2.StartEvent)1 ParsedAssignmentsInfo (org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.ParsedAssignmentsInfo)1 CatchEventPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CatchEventPropertyWriter)1 CatchEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.CatchEventPropertyReader)1