use of org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo 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());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo 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());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo in project kie-wb-common by kiegroup.
the class BPMNDiagramMarshallerTest 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 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());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo in project kie-wb-common by kiegroup.
the class BPMNDiagramMarshallerTest method testUnmarshallIntermediateSignalEventThrowing.
@Test
@SuppressWarnings("unchecked")
public void testUnmarshallIntermediateSignalEventThrowing() throws Exception {
Diagram<Graph, Metadata> diagram = unmarshall(BPMN_INTERMEDIATE_SIGNAL_EVENTTHROWING);
assertDiagram(diagram, 2);
assertEquals("intermediateSignalThrowing", diagram.getMetadata().getTitle());
Node<? extends Definition, ?> intermediateEventNode = diagram.getGraph().getNode("_A45EC77D-5414-4348-BA8F-05C4FFD660EE");
IntermediateSignalEventThrowing intermediateSignalEventThrowing = (IntermediateSignalEventThrowing) intermediateEventNode.getContent().getDefinition();
assertNotNull(intermediateSignalEventThrowing.getGeneral());
assertEquals("MySignalThrowingEvent", intermediateSignalEventThrowing.getGeneral().getName().getValue());
assertEquals("MySignalThrowingEventDocumentation", intermediateSignalEventThrowing.getGeneral().getDocumentation().getValue());
assertNotNull(intermediateSignalEventThrowing.getExecutionSet());
assertEquals("processInstance", intermediateSignalEventThrowing.getExecutionSet().getSignalScope().getValue());
assertEquals("MySignal", intermediateSignalEventThrowing.getExecutionSet().getSignalRef().getValue());
DataIOSet dataIOSet = intermediateSignalEventThrowing.getDataIOSet();
AssignmentsInfo assignmentsInfo = dataIOSet.getAssignmentsinfo();
assertEquals("_input1:String||||[din]var1->_input1", assignmentsInfo.getValue());
}
Aggregations