Search in sources :

Example 26 with IntermediateSignalEventCatching

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

the class IntermediateCatchEventConverterTest method verifySignalEventConvert.

private void verifySignalEventConvert() {
    IntermediateSignalEventCatching definition = mock(IntermediateSignalEventCatching.class);
    SignalEventDefinition eventDefinition = mock(SignalEventDefinition.class);
    IntermediateCatchEvent intermediateCatchEvent = mockIntermediateCatchEvent(definition);
    eventDefinitions.clear();
    eventDefinitions.add(eventDefinition);
    tested.convert(intermediateCatchEvent);
    verify(tested).signalEvent(intermediateCatchEvent);
}
Also used : IntermediateSignalEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching) IntermediateCatchEvent(org.eclipse.bpmn2.IntermediateCatchEvent) SignalEventDefinition(org.eclipse.bpmn2.SignalEventDefinition)

Example 27 with IntermediateSignalEventCatching

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

the class AbstractDataTypeCacheTest method testExtractIntermediateSignalEventCatching.

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

Example 28 with IntermediateSignalEventCatching

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

the class BPMNDirectDiagramMarshallerTest method testUnmarshallIntermediateSignalEventCatching.

@Test
@SuppressWarnings("unchecked")
public void testUnmarshallIntermediateSignalEventCatching() throws Exception {
    Diagram<Graph, Metadata> diagram = unmarshall(BPMN_INTERMEDIATE_SIGNAL_EVENTCATCHING);
    assertDiagram(diagram, 2);
    assertEquals("intermediateSignalCatching", diagram.getMetadata().getTitle());
    Node<? extends Definition, ?> intermediateEventNode = diagram.getGraph().getNode("_2C9B14A3-F663-476D-9FDF-31590D3A9CC5");
    IntermediateSignalEventCatching intermediateSignalEventCatching = (IntermediateSignalEventCatching) intermediateEventNode.getContent().getDefinition();
    assertNotNull(intermediateSignalEventCatching.getGeneral());
    assertEquals("MySignalCatchingEvent", intermediateSignalEventCatching.getGeneral().getName().getValue());
    assertEquals("MySignalCatchingEventDocumentation", intermediateSignalEventCatching.getGeneral().getDocumentation().getValue());
    assertNotNull(intermediateSignalEventCatching.getExecutionSet());
    assertEquals(true, intermediateSignalEventCatching.getExecutionSet().getCancelActivity().getValue());
    assertEquals("MySignal", intermediateSignalEventCatching.getExecutionSet().getSignalRef().getValue());
    assertEquals("12/25/1983", intermediateSignalEventCatching.getExecutionSet().getSlaDueDate().getValue());
    DataIOSet dataIOSet = intermediateSignalEventCatching.getDataIOSet();
    AssignmentsInfo assignmentsInfo = dataIOSet.getAssignmentsinfo();
    assertEquals("||output1_:String||[dout]output1_->var1", assignmentsInfo.getValue());
}
Also used : DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) Graph(org.kie.workbench.common.stunner.core.graph.Graph) IntermediateSignalEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching) 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) Test(org.junit.Test)

Example 29 with IntermediateSignalEventCatching

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

the class EventCancelActivityViewHandlerTest method testHandleSignalIsNotCancel.

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

Example 30 with IntermediateSignalEventCatching

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

the class EventCancelActivityViewHandlerTest method testHandleSignalIsCancel.

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

Aggregations

IntermediateSignalEventCatching (org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching)33 Test (org.junit.Test)24 Metadata (org.kie.workbench.common.stunner.core.diagram.Metadata)18 Graph (org.kie.workbench.common.stunner.core.graph.Graph)18 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)5 CancellingSignalEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.CancellingSignalEventExecutionSet)5 CancelActivity (org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)4 SignalEventDefinition (org.eclipse.bpmn2.SignalEventDefinition)3 IntermediateMessageEventCatching (org.kie.workbench.common.stunner.bpmn.definition.IntermediateMessageEventCatching)3 AssignmentsInfo (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo)3 SignalRef (org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.SignalRef)3 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)3 IntermediateCatchEvent (org.eclipse.bpmn2.IntermediateCatchEvent)2 CatchEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.CatchEventPropertyReader)2 BaseCatchingIntermediateEvent (org.kie.workbench.common.stunner.bpmn.definition.BaseCatchingIntermediateEvent)2 IntermediateConditionalEvent (org.kie.workbench.common.stunner.bpmn.definition.IntermediateConditionalEvent)2 IntermediateErrorEventCatching (org.kie.workbench.common.stunner.bpmn.definition.IntermediateErrorEventCatching)2 IntermediateTimerEvent (org.kie.workbench.common.stunner.bpmn.definition.IntermediateTimerEvent)2 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)2 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)2