Search in sources :

Example 1 with StartEscalationEvent

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

the class VariableUtilsTest method mockStartEscalationEvent.

private StartEscalationEvent mockStartEscalationEvent(String name, String assignmentsInfoValue) {
    StartEscalationEvent result = mockStartEvent(name, StartEscalationEvent.class);
    AssignmentsInfo assignmentsInfo = mockAssignmentsInfo(assignmentsInfoValue);
    DataIOSet dataIOSet = mockIOSet(assignmentsInfo);
    when(result.getDataIOSet()).thenReturn(dataIOSet);
    return result;
}
Also used : DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) AssignmentsInfo(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo) StartEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.StartEscalationEvent)

Example 2 with StartEscalationEvent

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

the class StartEventFilterProviderFactoryTest method testFilterProviderHideIsInterruptingField.

@Test
public void testFilterProviderHideIsInterruptingField() {
    BaseStartEvent[] test1Classes = { new StartNoneEvent(), new StartCompensationEvent(), new StartSignalEvent(), new StartTimerEvent(), new StartConditionalEvent(), new StartErrorEvent(), new StartEscalationEvent(), new StartMessageEvent() };
    when(parentView.getDefinition()).thenReturn(otherNode);
    Stream.of(test1Classes).forEach(catchingIntermediateEvent -> testStartEventFilterProviderHideIsInterruptingField(catchingIntermediateEvent));
    BaseStartEvent[] test2Classes = { new StartNoneEvent(), new StartCompensationEvent(), new StartErrorEvent() };
    when(parentView.getDefinition()).thenReturn(eventSubprocess);
    Stream.of(test2Classes).forEach(clazz -> testStartEventFilterProviderHideIsInterruptingField(clazz));
}
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) StartErrorEvent(org.kie.workbench.common.stunner.bpmn.definition.StartErrorEvent) StartNoneEvent(org.kie.workbench.common.stunner.bpmn.definition.StartNoneEvent) StartCompensationEvent(org.kie.workbench.common.stunner.bpmn.definition.StartCompensationEvent) Test(org.junit.Test)

Example 3 with StartEscalationEvent

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

the class EventInterruptingViewHandlerTest method testHandleEscalationIsInterrupting.

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

Example 4 with StartEscalationEvent

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

the class AbstractDataTypeCacheTest method testExtractStartEscalationEvent.

@Test
public void testExtractStartEscalationEvent() {
    StartEscalationEvent startEscalationEvent = new StartEscalationEvent();
    StartEscalationEvent startEscalationEvent2 = new StartEscalationEvent();
    when(firstView.getDefinition()).thenReturn(startEscalationEvent);
    when(lastView.getDefinition()).thenReturn(startEscalationEvent2);
    dataTypeCache.extractFromItem(firstView);
    dataTypeCache.extractFromItem(lastView);
    assertTrue(dataTypeCache.allDataTypes.contains("MyType"));
    assertTrue(dataTypeCache.allDataTypes.contains("com.myspace.Person"));
}
Also used : StartEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.StartEscalationEvent) Test(org.junit.Test)

Example 5 with StartEscalationEvent

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

the class BPMNDirectDiagramMarshallerTest method testUnmarshallStartEscalationEvent.

@Test
@SuppressWarnings("unchecked")
public void testUnmarshallStartEscalationEvent() throws Exception {
    Diagram<Graph, Metadata> diagram = unmarshall(BPMN_STARTESCALATIONEVENT);
    assertDiagram(diagram, 2);
    assertEquals("StartEscalationEvent", diagram.getMetadata().getTitle());
    Node<? extends Definition, ?> startEventNode = diagram.getGraph().getNode("_D5AAA79F-9CD6-43C1-92E2-5D3C9340A303");
    assertNotNull(startEventNode);
    StartEscalationEvent startEscalationEvent = (StartEscalationEvent) startEventNode.getContent().getDefinition();
    assertNotNull(startEscalationEvent.getGeneral());
    assertEquals("StartEscalationEventName", startEscalationEvent.getGeneral().getName().getValue());
    assertEquals("StartEscalationEventDocumentation", startEscalationEvent.getGeneral().getDocumentation().getValue());
    assertNotNull(startEscalationEvent.getExecutionSet());
    assertEquals("EscalationCode", startEscalationEvent.getExecutionSet().getEscalationRef().getValue());
    assertEquals(true, startEscalationEvent.getExecutionSet().getIsInterrupting().getValue());
    assertEquals("12/25/1983", startEscalationEvent.getExecutionSet().getSlaDueDate().getValue());
    DataIOSet dataIOSet = startEscalationEvent.getDataIOSet();
    AssignmentsInfo assignmentsInfo = dataIOSet.getAssignmentsinfo();
    assertEquals("||escalationOutput:String||[dout]escalationOutput->processVar1", assignmentsInfo.getValue());
}
Also used : DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) Graph(org.kie.workbench.common.stunner.core.graph.Graph) AssignmentsInfo(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo) ParsedAssignmentsInfo(org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.ParsedAssignmentsInfo) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) StartEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.StartEscalationEvent) Test(org.junit.Test)

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