use of org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo in project kie-wb-common by kiegroup.
the class BPMNDirectDiagramMarshallerTest 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());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo in project kie-wb-common by kiegroup.
the class BPMNDirectDiagramMarshallerTest method testUnmarshallStartMessageEvent.
@Test
@SuppressWarnings("unchecked")
public void testUnmarshallStartMessageEvent() throws Exception {
Diagram<Graph, Metadata> diagram = unmarshall(BPMN_STARTMESSAGEEVENT);
assertDiagram(diagram, 2);
assertEquals("StartMessageEvent", diagram.getMetadata().getTitle());
Node<? extends Definition, ?> startMessageEventNode = diagram.getGraph().getNode("_34C4BBFC-544F-4E23-B17B-547BB48EEB63");
StartMessageEvent startMessageEvent = (StartMessageEvent) startMessageEventNode.getContent().getDefinition();
assertNotNull(startMessageEvent.getExecutionSet());
MessageRef messageRef = startMessageEvent.getExecutionSet().getMessageRef();
IsInterrupting isInterrupting = startMessageEvent.getExecutionSet().getIsInterrupting();
assertEquals("msgref", messageRef.getValue());
assertEquals(true, isInterrupting.getValue());
DataIOSet dataIOSet = startMessageEvent.getDataIOSet();
AssignmentsInfo assignmentsInfo = dataIOSet.getAssignmentsinfo();
assertEquals("||StartMessageEventOutputVar1:String||[dout]StartMessageEventOutputVar1->var1", assignmentsInfo.getValue());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo in project kie-wb-common by kiegroup.
the class BPMNDirectDiagramMarshallerTest method testUnmarshallUserTaskAssignments.
@Test
@SuppressWarnings("unchecked")
public void testUnmarshallUserTaskAssignments() throws Exception {
Diagram<Graph, Metadata> diagram = unmarshall(BPMN_USERTASKASSIGNMENTS);
assertDiagram(diagram, 8);
assertEquals("UserTaskAssignments", diagram.getMetadata().getTitle());
Node<? extends Definition, ?> selfEvaluationNode = diagram.getGraph().getNode("_6063D302-9D81-4C86-920B-E808A45377C2");
UserTask selfEvaluationTask = (UserTask) selfEvaluationNode.getContent().getDefinition();
assertEquals(selfEvaluationTask.getTaskType().getValue(), TaskTypes.USER);
UserTaskExecutionSet executionSet = selfEvaluationTask.getExecutionSet();
AssignmentsInfo assignmentsinfo = executionSet.getAssignmentsinfo();
assertEquals(assignmentsinfo.getValue(), "|reason:com.test.Reason,Comment:Object,Skippable:Object||performance:Object|[din]reason->reason,[dout]performance->performance");
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo 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());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo 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());
}
Aggregations