Search in sources :

Example 16 with IntermediateEscalationEventThrowing

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

the class AbstractDataTypeCacheTest method testExtractIntermediateEscalationEventThrowing.

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

Example 17 with IntermediateEscalationEventThrowing

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

the class BPMNDirectDiagramMarshallerTest method testUnmarshallIntermediateEscalationEventThrowing.

@Test
@SuppressWarnings("unchecked")
public void testUnmarshallIntermediateEscalationEventThrowing() throws Exception {
    Diagram<Graph, Metadata> diagram = unmarshall(BPMN_INTERMEDIATE_ESCALATION_EVENTTHROWING);
    assertDiagram(diagram, 2);
    assertEquals("IntermediateEscalationEventThrowing", diagram.getMetadata().getTitle());
    Node<? extends Definition, ?> throwingEventNode = diagram.getGraph().getNode("_8516D854-F67F-4697-9837-40A32033AE25");
    assertNotNull(throwingEventNode);
    IntermediateEscalationEventThrowing throwingEscalationEvent = (IntermediateEscalationEventThrowing) throwingEventNode.getContent().getDefinition();
    assertNotNull(throwingEscalationEvent.getGeneral());
    assertEquals("ThrowingEscalationEventName", throwingEscalationEvent.getGeneral().getName().getValue());
    assertEquals("ThrowingEscalationEventDocumentation", throwingEscalationEvent.getGeneral().getDocumentation().getValue());
    assertNotNull(throwingEscalationEvent.getExecutionSet());
    assertEquals("EscalationCode", throwingEscalationEvent.getExecutionSet().getEscalationRef().getValue());
    DataIOSet dataIOSet = throwingEscalationEvent.getDataIOSet();
    AssignmentsInfo assignmentsInfo = dataIOSet.getAssignmentsinfo();
    assertEquals("escalationOutput:String||||[din]processVar1->escalationOutput", 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) IntermediateEscalationEventThrowing(org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEventThrowing) Test(org.junit.Test)

Example 18 with IntermediateEscalationEventThrowing

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

the class VariableUtilsTest method mockIntermediateEscalationEventThrowing.

private IntermediateEscalationEventThrowing mockIntermediateEscalationEventThrowing(String name, String assignmentsInfoValue) {
    IntermediateEscalationEventThrowing result = mockThrowingEvent(name, IntermediateEscalationEventThrowing.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) IntermediateEscalationEventThrowing(org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEventThrowing)

Aggregations

IntermediateEscalationEventThrowing (org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEventThrowing)18 Test (org.junit.Test)11 Metadata (org.kie.workbench.common.stunner.core.diagram.Metadata)9 Graph (org.kie.workbench.common.stunner.core.graph.Graph)9 EscalationEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationEventExecutionSet)5 IntermediateThrowEvent (org.eclipse.bpmn2.IntermediateThrowEvent)3 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)3 EscalationEventDefinition (org.eclipse.bpmn2.EscalationEventDefinition)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 ParsedAssignmentsInfo (org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.ParsedAssignmentsInfo)1 ThrowEventPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.ThrowEventPropertyWriter)1 EventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.EventPropertyReader)1 ThrowEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ThrowEventPropertyReader)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 DataObject (org.kie.workbench.common.stunner.bpmn.definition.DataObject)1 EmbeddedSubprocess (org.kie.workbench.common.stunner.bpmn.definition.EmbeddedSubprocess)1