use of org.kie.workbench.common.stunner.bpmn.definition.MultipleInstanceSubprocess in project kie-wb-common by kiegroup.
the class BPMNDiagramMarshallerTest method testUnmarshallMultipleInstanceSubprocess.
@Test
public void testUnmarshallMultipleInstanceSubprocess() throws Exception {
Diagram<Graph, Metadata> diagram = unmarshall(BPMN_MULTIPLE_INSTANCE_SUBPROCESS);
assertDiagram(diagram, 2);
assertEquals("MultipleInstanceSubprocess", diagram.getMetadata().getTitle());
Node<? extends Definition, ?> multipleInstanceSubprocessNode = diagram.getGraph().getNode("_2316CEC1-C1F7-41B1-8C91-3CE73ADE5571");
MultipleInstanceSubprocess multipleInstanceSubprocess = (MultipleInstanceSubprocess) multipleInstanceSubprocessNode.getContent().getDefinition();
assertEquals("var1", multipleInstanceSubprocess.getExecutionSet().getMultipleInstanceCollectionInput().getValue());
assertEquals("var2", multipleInstanceSubprocess.getExecutionSet().getMultipleInstanceCollectionOutput().getValue());
assertEquals("dataInput", multipleInstanceSubprocess.getExecutionSet().getMultipleInstanceDataInput().getValue());
assertEquals("dataOutput", multipleInstanceSubprocess.getExecutionSet().getMultipleInstanceDataOutput().getValue());
assertEquals("a=b", multipleInstanceSubprocess.getExecutionSet().getMultipleInstanceCompletionCondition().getValue());
assertEquals("onEntryAction", multipleInstanceSubprocess.getExecutionSet().getOnEntryAction().getValue().getValues().get(0).getScript());
assertEquals("java", multipleInstanceSubprocess.getExecutionSet().getOnEntryAction().getValue().getValues().get(0).getLanguage());
assertEquals("onExitAction", multipleInstanceSubprocess.getExecutionSet().getOnExitAction().getValue().getValues().get(0).getScript());
assertEquals("java", multipleInstanceSubprocess.getExecutionSet().getOnExitAction().getValue().getValues().get(0).getLanguage());
assertTrue(multipleInstanceSubprocess.getExecutionSet().getIsAsync().getValue());
assertEquals("mi-var1:String", multipleInstanceSubprocess.getProcessData().getProcessVariables().getValue());
}
use of org.kie.workbench.common.stunner.bpmn.definition.MultipleInstanceSubprocess in project kie-wb-common by kiegroup.
the class StartEventFilterProviderFactoryTest method setUp.
@Before
public void setUp() throws Exception {
inEdges = Arrays.asList(edge);
eventSubprocess = new EventSubprocess();
otherNode = new MultipleInstanceSubprocess();
when(sessionManager.getCurrentSession()).thenReturn(session);
when(session.getCanvasHandler()).thenReturn(canvasHandler);
when(canvasHandler.getGraphIndex()).thenReturn(graphIndex);
when(canvasHandler.getGraphIndex().getNode(ELEMENT_UUID)).thenReturn(node);
when(node.getInEdges()).thenReturn(inEdges);
when(edge.getContent()).thenReturn(child);
when(edge.getSourceNode()).thenReturn(parentNode);
when(parentNode.asNode()).thenReturn(parentNode);
when(parentNode.getContent()).thenReturn(parentView);
}
Aggregations