Search in sources :

Example 1 with IntermediateConditionalEvent

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

the class IntermediateCatchEventConverterTest method conditionalEvent.

@Test
public void conditionalEvent() {
    IntermediateConditionalEvent definition = mock(IntermediateConditionalEvent.class);
    ConditionalEventDefinition eventDefinition = mock(ConditionalEventDefinition.class);
    CatchEvent catchEvent = mockIntermediateCatchEvent(definition);
    tested.conditionalEvent(catchEvent, eventDefinition);
    verifyCommonProperties(definition);
    verify(propertyReader).isCancelActivity();
    verify(propertyReader).getSlaDueDate();
    verify(eventDefinition).getCondition();
    verify(definition).setExecutionSet(Mockito.<CancellingConditionalEventExecutionSet>any());
}
Also used : IntermediateConditionalEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateConditionalEvent) ConditionalEventDefinition(org.eclipse.bpmn2.ConditionalEventDefinition) CatchEvent(org.eclipse.bpmn2.CatchEvent) IntermediateCatchEvent(org.eclipse.bpmn2.IntermediateCatchEvent) Test(org.junit.Test)

Example 2 with IntermediateConditionalEvent

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

the class EventCancelActivityViewHandlerTest method testHandleConditionalIsNotCancel.

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

Example 3 with IntermediateConditionalEvent

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

the class EventCancelActivityViewHandlerTest method testHandleConditionalIsCancel.

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

Example 4 with IntermediateConditionalEvent

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

the class IntermediateCatchEventConverterTest method createIntermediateConditionalEventCatchingNode.

private Node createIntermediateConditionalEventCatchingNode() {
    CancellingConditionalEventExecutionSet executionSet = new CancellingConditionalEventExecutionSet(new CancelActivity(CANCEL_ACTIVITY), slaDueDate, conditionExpression);
    IntermediateConditionalEvent eventCatching = new IntermediateConditionalEvent(generalSet, mock(BackgroundSet.class), mock(FontSet.class), mock(CircleDimensionSet.class), dataIOSet, advancedData, executionSet);
    Node dockNode = mockNode();
    Node node = mockDockedNode(dockNode, eventCatching);
    return node;
}
Also used : FontSet(org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet) BackgroundSet(org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet) CircleDimensionSet(org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.CircleDimensionSet) IntermediateConditionalEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateConditionalEvent) Node(org.kie.workbench.common.stunner.core.graph.Node) CancellingConditionalEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.conditional.CancellingConditionalEventExecutionSet) CancelActivity(org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)

Example 5 with IntermediateConditionalEvent

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

the class ProcessCompensationRefProviderTest method testGetSelectorDataLevel0ZeroTasks.

@Test
public void testGetSelectorDataLevel0ZeroTasks() {
    TestingGraphInstanceBuilder2.Level0Graph graph = buildLevel0Graph(graphTestHandler, new TestingGraphInstanceBuilder2.Level0Graph(), new StartNoneEvent(), new IntermediateCompensationEvent(), new IntermediateConditionalEvent(), new EndNoneEvent());
    testGetSelectorData(graph.level0Node2, expectedNodes());
}
Also used : TestingGraphInstanceBuilder2(org.kie.workbench.common.stunner.core.TestingGraphInstanceBuilder2) IntermediateConditionalEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateConditionalEvent) EndNoneEvent(org.kie.workbench.common.stunner.bpmn.definition.EndNoneEvent) StartNoneEvent(org.kie.workbench.common.stunner.bpmn.definition.StartNoneEvent) IntermediateCompensationEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEvent) Test(org.junit.Test)

Aggregations

IntermediateConditionalEvent (org.kie.workbench.common.stunner.bpmn.definition.IntermediateConditionalEvent)30 Test (org.junit.Test)25 Metadata (org.kie.workbench.common.stunner.core.diagram.Metadata)17 Graph (org.kie.workbench.common.stunner.core.graph.Graph)17 ConditionalEventDefinition (org.eclipse.bpmn2.ConditionalEventDefinition)3 EndNoneEvent (org.kie.workbench.common.stunner.bpmn.definition.EndNoneEvent)3 StartNoneEvent (org.kie.workbench.common.stunner.bpmn.definition.StartNoneEvent)3 CancellingConditionalEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.conditional.CancellingConditionalEventExecutionSet)3 TestingGraphInstanceBuilder2 (org.kie.workbench.common.stunner.core.TestingGraphInstanceBuilder2)3 IntermediateCatchEvent (org.eclipse.bpmn2.IntermediateCatchEvent)2 BaseCatchingIntermediateEvent (org.kie.workbench.common.stunner.bpmn.definition.BaseCatchingIntermediateEvent)2 IntermediateCompensationEvent (org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEvent)2 IntermediateMessageEventCatching (org.kie.workbench.common.stunner.bpmn.definition.IntermediateMessageEventCatching)2 IntermediateSignalEventCatching (org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching)2 IntermediateTimerEvent (org.kie.workbench.common.stunner.bpmn.definition.IntermediateTimerEvent)2 CancelActivity (org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)2 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)2 BoundaryEvent (org.eclipse.bpmn2.BoundaryEvent)1 CatchEvent (org.eclipse.bpmn2.CatchEvent)1 CatchEventPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CatchEventPropertyWriter)1