Search in sources :

Example 1 with IntermediateEscalationEvent

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

the class AbstractDataTypeCacheTest method testExtractIntermediateEscalationEvent.

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

Example 2 with IntermediateEscalationEvent

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

the class VariableUtilsTest method mockIntermediateEscalationEvent.

private IntermediateEscalationEvent mockIntermediateEscalationEvent(String name, String assignmentsInfoValue) {
    IntermediateEscalationEvent result = mockCatchingEvent(name, IntermediateEscalationEvent.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) IntermediateEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEvent) AssignmentsInfo(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo)

Example 3 with IntermediateEscalationEvent

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

the class IntermediateCatchEventConverterTest method escalationEvent.

@Test
public void escalationEvent() {
    IntermediateEscalationEvent definition = mock(IntermediateEscalationEvent.class);
    EscalationEventDefinition eventDefinition = mock(EscalationEventDefinition.class);
    IntermediateCatchEvent catchEvent = mockIntermediateCatchEvent(definition);
    tested.escalationEvent(catchEvent, eventDefinition);
    verifyCommonProperties(definition);
    verify(propertyReader).isCancelActivity();
    verify(propertyReader).getSlaDueDate();
    verify(eventDefinition).getEscalationRef();
    verify(definition).setExecutionSet(Mockito.<CancellingEscalationEventExecutionSet>any());
}
Also used : IntermediateEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEvent) EscalationEventDefinition(org.eclipse.bpmn2.EscalationEventDefinition) IntermediateCatchEvent(org.eclipse.bpmn2.IntermediateCatchEvent) Test(org.junit.Test)

Example 4 with IntermediateEscalationEvent

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

the class IntermediateCatchEventConverterTest method verifyEscalationEventConvert.

private void verifyEscalationEventConvert() {
    IntermediateEscalationEvent definition = mock(IntermediateEscalationEvent.class);
    EscalationEventDefinition eventDefinition = mock(EscalationEventDefinition.class);
    IntermediateCatchEvent intermediateCatchEvent = mockIntermediateCatchEvent(definition);
    eventDefinitions.clear();
    eventDefinitions.add(eventDefinition);
    tested.convert(intermediateCatchEvent);
    verify(tested).escalationEvent(intermediateCatchEvent, eventDefinition);
}
Also used : IntermediateEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEvent) EscalationEventDefinition(org.eclipse.bpmn2.EscalationEventDefinition) IntermediateCatchEvent(org.eclipse.bpmn2.IntermediateCatchEvent)

Example 5 with IntermediateEscalationEvent

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

the class EventCancelActivityViewHandlerTest method testHandleEscalationIsCancel.

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

Aggregations

IntermediateEscalationEvent (org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEvent)29 Test (org.junit.Test)21 Metadata (org.kie.workbench.common.stunner.core.diagram.Metadata)17 Graph (org.kie.workbench.common.stunner.core.graph.Graph)17 CancellingEscalationEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.CancellingEscalationEventExecutionSet)4 EscalationEventDefinition (org.eclipse.bpmn2.EscalationEventDefinition)3 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)3 CancelActivity (org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)3 IntermediateCatchEvent (org.eclipse.bpmn2.IntermediateCatchEvent)2 AssignmentsInfo (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo)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 BoundaryEvent (org.eclipse.bpmn2.BoundaryEvent)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 AdHocSubprocess (org.kie.workbench.common.stunner.bpmn.definition.AdHocSubprocess)1 BPMNDiagramImpl (org.kie.workbench.common.stunner.bpmn.definition.BPMNDiagramImpl)1 BusinessRuleTask (org.kie.workbench.common.stunner.bpmn.definition.BusinessRuleTask)1