Search in sources :

Example 16 with DataIOSet

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

the class BPMNDirectDiagramMarshallerTest method testUnmarshallEndErrorEvent.

@Test
public void testUnmarshallEndErrorEvent() throws Exception {
    Diagram<Graph, Metadata> diagram = unmarshall(BPMN_ENDERROR_EVENT);
    assertDiagram(diagram, 2);
    assertEquals("endErrorEventProcess", diagram.getMetadata().getTitle());
    Node<? extends Definition, ?> endEventNode = diagram.getGraph().getNode("_E69BD781-AB7F-45C4-85DA-B1F3BAE5BCCB");
    EndErrorEvent endErrorEvent = (EndErrorEvent) endEventNode.getContent().getDefinition();
    assertNotNull(endErrorEvent.getGeneral());
    assertEquals("MyErrorEventName", endErrorEvent.getGeneral().getName().getValue());
    assertEquals("MyErrorEventDocumentation", endErrorEvent.getGeneral().getDocumentation().getValue());
    assertNotNull(endErrorEvent.getExecutionSet());
    assertNotNull(endErrorEvent.getExecutionSet().getErrorRef());
    assertEquals("MyError", endErrorEvent.getExecutionSet().getErrorRef().getValue());
    DataIOSet dataIOSet = endErrorEvent.getDataIOSet();
    AssignmentsInfo assignmentsInfo = dataIOSet.getAssignmentsinfo();
    assertEquals("myErrorEventInput:String||||[din]var1->myErrorEventInput", 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) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) EndErrorEvent(org.kie.workbench.common.stunner.bpmn.definition.EndErrorEvent) Test(org.junit.Test)

Example 17 with DataIOSet

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

the class BPMNDirectDiagramMarshallerTest method testUnmarshallIntermediateErrorEventCatching.

@Test
@SuppressWarnings("unchecked")
public void testUnmarshallIntermediateErrorEventCatching() throws Exception {
    Diagram<Graph, Metadata> diagram = unmarshall(BPMN_INTERMEDIATE_ERROR_EVENTCATCHING);
    assertDiagram(diagram, 2);
    assertEquals("intermediateErrorCatching", diagram.getMetadata().getTitle());
    Node<? extends Definition, ?> intermediateEventNode = diagram.getGraph().getNode("80A2A7A9-7C68-408C-BE3B-467562A2C139");
    IntermediateErrorEventCatching intermediateErrorEventCatching = (IntermediateErrorEventCatching) intermediateEventNode.getContent().getDefinition();
    assertNotNull(intermediateErrorEventCatching.getGeneral());
    assertEquals("MyErrorCatchingEvent", intermediateErrorEventCatching.getGeneral().getName().getValue());
    assertEquals("MyErrorCatchingEventDocumentation", intermediateErrorEventCatching.getGeneral().getDocumentation().getValue());
    assertNotNull(intermediateErrorEventCatching.getExecutionSet());
    assertEquals(true, intermediateErrorEventCatching.getExecutionSet().getCancelActivity().getValue());
    assertEquals("MyError", intermediateErrorEventCatching.getExecutionSet().getErrorRef().getValue());
    DataIOSet dataIOSet = intermediateErrorEventCatching.getDataIOSet();
    AssignmentsInfo assignmentsInfo = dataIOSet.getAssignmentsinfo();
    assertEquals("||theErrorEventOutput:String||[dout]theErrorEventOutput->errorVar", assignmentsInfo.getValue());
}
Also used : DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) Graph(org.kie.workbench.common.stunner.core.graph.Graph) IntermediateErrorEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateErrorEventCatching) AssignmentsInfo(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) Test(org.junit.Test)

Example 18 with DataIOSet

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

the class BPMNDirectDiagramMarshallerTest method testUnmarshallStartErrorEvent.

@Test
public void testUnmarshallStartErrorEvent() throws Exception {
    Diagram<Graph, Metadata> diagram = unmarshall(BPMN_STARTERROREVENT);
    assertDiagram(diagram, 3);
    assertEquals("startErrorEventProcess", diagram.getMetadata().getTitle());
    Node<? extends Definition, ?> startEventNode = diagram.getGraph().getNode("3BD5BBC8-F1C7-45DE-8BDF-A06D8464A61B");
    StartErrorEvent startErrorEvent = (StartErrorEvent) startEventNode.getContent().getDefinition();
    assertNotNull(startErrorEvent.getGeneral());
    assertEquals("MyStartErrorEvent", startErrorEvent.getGeneral().getName().getValue());
    assertEquals("MyStartErrorEventDocumentation", startErrorEvent.getGeneral().getDocumentation().getValue());
    assertNotNull(startErrorEvent.getExecutionSet());
    assertNotNull(startErrorEvent.getExecutionSet().getErrorRef());
    assertEquals("MyError", startErrorEvent.getExecutionSet().getErrorRef().getValue());
    DataIOSet dataIOSet = startErrorEvent.getDataIOSet();
    AssignmentsInfo assignmentsInfo = dataIOSet.getAssignmentsinfo();
    assertEquals("||errorOutput_:String||[dout]errorOutput_->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) AssignmentsInfo(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) StartErrorEvent(org.kie.workbench.common.stunner.bpmn.definition.StartErrorEvent) Test(org.junit.Test)

Example 19 with DataIOSet

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

the class BPMNDiagramMarshallerTest method testUnmarshallEndMessageEvent.

@Test
@SuppressWarnings("unchecked")
public void testUnmarshallEndMessageEvent() throws Exception {
    Diagram<Graph, Metadata> diagram = unmarshall(BPMN_ENDMESSAGEEVENT);
    assertDiagram(diagram, 2);
    assertEquals("EndMessageEvent", diagram.getMetadata().getTitle());
    Node<? extends Definition, ?> endMessageEventNode = diagram.getGraph().getNode("_4A8A0A9E-D4A5-4B6E-94A6-20817A57B3C6");
    EndMessageEvent endMessageEvent = (EndMessageEvent) endMessageEventNode.getContent().getDefinition();
    assertNotNull(endMessageEvent.getExecutionSet());
    MessageRef messageRef = endMessageEvent.getExecutionSet().getMessageRef();
    assertEquals("msgref", messageRef.getValue());
    DataIOSet dataIOSet = endMessageEvent.getDataIOSet();
    AssignmentsInfo assignmentsInfo = dataIOSet.getAssignmentsinfo();
    assertEquals("EndMessageEventInputVar1:String||||[din]var1->EndMessageEventInputVar1", assignmentsInfo.getValue());
}
Also used : DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) Graph(org.kie.workbench.common.stunner.core.graph.Graph) MessageRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.message.MessageRef) AssignmentsInfo(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) EndMessageEvent(org.kie.workbench.common.stunner.bpmn.definition.EndMessageEvent) Test(org.junit.Test)

Example 20 with DataIOSet

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

the class BPMNDiagramMarshallerTest method testUnmarshallIntermediateMessageEventCatching.

@Test
@SuppressWarnings("unchecked")
public void testUnmarshallIntermediateMessageEventCatching() throws Exception {
    Diagram<Graph, Metadata> diagram = unmarshall(BPMN_INTERMEDIATE_MESSAGE_EVENTCATCHING);
    assertDiagram(diagram, 2);
    assertEquals("IntermediateMessageEventCatching", diagram.getMetadata().getTitle());
    Node<? extends Definition, ?> intermediateMessageEventCatchingNode = diagram.getGraph().getNode("_BD708E30-CA48-4051-BAEA-BBCB5F396CEE");
    IntermediateMessageEventCatching intermediateMessageEventCatching = (IntermediateMessageEventCatching) intermediateMessageEventCatchingNode.getContent().getDefinition();
    assertNotNull(intermediateMessageEventCatching.getExecutionSet());
    MessageRef messageRef = intermediateMessageEventCatching.getExecutionSet().getMessageRef();
    assertEquals("msgref1", messageRef.getValue());
    DataIOSet dataIOSet = intermediateMessageEventCatching.getDataIOSet();
    AssignmentsInfo assignmentsInfo = dataIOSet.getAssignmentsinfo();
    assertEquals("||IntermediateMessageEventCatchingOutputVar1:String||[dout]IntermediateMessageEventCatchingOutputVar1->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) MessageRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.message.MessageRef) AssignmentsInfo(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) IntermediateMessageEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateMessageEventCatching) Test(org.junit.Test)

Aggregations

DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)43 AssignmentsInfo (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo)31 Test (org.junit.Test)30 Metadata (org.kie.workbench.common.stunner.core.diagram.Metadata)26 Graph (org.kie.workbench.common.stunner.core.graph.Graph)26 MessageRef (org.kie.workbench.common.stunner.bpmn.definition.property.event.message.MessageRef)16 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)15 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)12 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)12 Edge (org.kie.workbench.common.stunner.core.graph.Edge)12 View (org.kie.workbench.common.stunner.core.graph.content.view.View)12 EventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.EventPropertyReader)10 CatchEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.CatchEventPropertyReader)5 ThrowEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ThrowEventPropertyReader)5 StartErrorEvent (org.kie.workbench.common.stunner.bpmn.definition.StartErrorEvent)5 IsInterrupting (org.kie.workbench.common.stunner.bpmn.definition.property.event.IsInterrupting)5 InterruptingMessageEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.message.InterruptingMessageEventExecutionSet)5 StartMessageEvent (org.kie.workbench.common.stunner.bpmn.definition.StartMessageEvent)4 CancelActivity (org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)4 CancellingMessageEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.message.CancellingMessageEventExecutionSet)4