Search in sources :

Example 26 with AssignmentsInfo

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

the class BPMNDiagramMarshallerTest method testUnmarshallEndErrorEvent.

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)

Example 27 with AssignmentsInfo

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

the class BPMNDiagramMarshallerTest 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 28 with AssignmentsInfo

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

the class BPMNDiagramMarshallerTest method testUnmarshallEndSignalEvent.

@Test
@SuppressWarnings("unchecked")
public void testUnmarshallEndSignalEvent() throws Exception {
    Diagram<Graph, Metadata> diagram = unmarshall(BPMN_ENDSIGNALEVENT);
    assertDiagram(diagram, 2);
    assertEquals("EndEventAssignments", diagram.getMetadata().getTitle());
    Node<? extends Definition, ?> endSignalEventNode = diagram.getGraph().getNode("_C9151E0C-2E3E-4558-AFC2-34038E3A8552");
    EndSignalEvent endSignalEvent = (EndSignalEvent) endSignalEventNode.getContent().getDefinition();
    DataIOSet dataIOSet = endSignalEvent.getDataIOSet();
    AssignmentsInfo assignmentsinfo = dataIOSet.getAssignmentsinfo();
    assertEquals("EndSignalEventInput1:String||||[din]employee->EndSignalEventInput1", assignmentsinfo.getValue());
    assertEquals("project", endSignalEvent.getExecutionSet().getSignalScope().getValue());
    assertEquals("employee", endSignalEvent.getExecutionSet().getSignalRef().getValue());
}
Also used : DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) Graph(org.kie.workbench.common.stunner.core.graph.Graph) EndSignalEvent(org.kie.workbench.common.stunner.bpmn.definition.EndSignalEvent) 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 29 with AssignmentsInfo

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

the class BPMNDiagramMarshallerTest 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());
    assertEquals(true, startErrorEvent.getExecutionSet().getIsInterrupting().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 30 with AssignmentsInfo

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

the class BPMNDiagramMarshallerTest 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());
    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) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) Test(org.junit.Test)

Aggregations

AssignmentsInfo (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo)39 Test (org.junit.Test)32 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)31 Metadata (org.kie.workbench.common.stunner.core.diagram.Metadata)28 Graph (org.kie.workbench.common.stunner.core.graph.Graph)28 MessageRef (org.kie.workbench.common.stunner.bpmn.definition.property.event.message.MessageRef)12 ParsedAssignmentsInfo (org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.ParsedAssignmentsInfo)4 StartErrorEvent (org.kie.workbench.common.stunner.bpmn.definition.StartErrorEvent)4 InterruptingMessageEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.message.InterruptingMessageEventExecutionSet)4 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)4 StartMessageEvent (org.kie.workbench.common.stunner.bpmn.definition.StartMessageEvent)3 IsInterrupting (org.kie.workbench.common.stunner.bpmn.definition.property.event.IsInterrupting)3 CancellingMessageEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.message.CancellingMessageEventExecutionSet)3 ElementParameters (bpsim.ElementParameters)2 EventDefinition (org.eclipse.bpmn2.EventDefinition)2 InputOutputSpecification (org.eclipse.bpmn2.InputOutputSpecification)2 BusinessRuleTask (org.kie.workbench.common.stunner.bpmn.definition.BusinessRuleTask)2 EndErrorEvent (org.kie.workbench.common.stunner.bpmn.definition.EndErrorEvent)2 EndMessageEvent (org.kie.workbench.common.stunner.bpmn.definition.EndMessageEvent)2 EndSignalEvent (org.kie.workbench.common.stunner.bpmn.definition.EndSignalEvent)2