use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateMessageEventThrowing in project kie-wb-common by kiegroup.
the class IntermediateThrowEventConverter method messageEvent.
private BpmnNode messageEvent(IntermediateThrowEvent event, MessageEventDefinition eventDefinition) {
Node<View<IntermediateMessageEventThrowing>, Edge> node = factoryManager.newNode(event.getId(), IntermediateMessageEventThrowing.class);
IntermediateMessageEventThrowing definition = node.getContent().getDefinition();
EventPropertyReader p = propertyReaderFactory.of(event);
definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
definition.setExecutionSet(new MessageEventExecutionSet(new MessageRef(eventDefinition.getMessageRef().getName())));
node.getContent().setBounds(p.getBounds());
definition.setDimensionsSet(p.getCircleDimensionSet());
definition.setFontSet(p.getFontSet());
definition.setBackgroundSet(p.getBackgroundSet());
return BpmnNode.of(node);
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateMessageEventThrowing in project kie-wb-common by kiegroup.
the class BPMNDirectDiagramMarshallerTest method testUnmarshallIntermediateMessageEventThrowing.
@Test
@SuppressWarnings("unchecked")
public void testUnmarshallIntermediateMessageEventThrowing() throws Exception {
Diagram<Graph, Metadata> diagram = unmarshall(BPMN_INTERMEDIATE_MESSAGE_EVENTTHROWING);
assertDiagram(diagram, 2);
assertEquals("IntermediateMessageEventThrowing", diagram.getMetadata().getTitle());
Node<? extends Definition, ?> intermediateMessageEventThrowingNode = diagram.getGraph().getNode("_85823DF6-02A0-4B8D-AE7A-61641A3A2E4B");
IntermediateMessageEventThrowing intermediateMessageEventThrowing = (IntermediateMessageEventThrowing) intermediateMessageEventThrowingNode.getContent().getDefinition();
assertNotNull(intermediateMessageEventThrowing.getExecutionSet());
MessageRef messageRef = intermediateMessageEventThrowing.getExecutionSet().getMessageRef();
assertEquals("msgref", messageRef.getValue());
DataIOSet dataIOSet = intermediateMessageEventThrowing.getDataIOSet();
AssignmentsInfo assignmentsInfo = dataIOSet.getAssignmentsinfo();
assertEquals("IntermediateMessageEventThrowingInputVar1:String||||[din]var1->IntermediateMessageEventThrowingInputVar1", assignmentsInfo.getValue());
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateMessageEventThrowing in project kie-wb-common by kiegroup.
the class BPMNDiagramMarshallerTest method testUnmarshallIntermediateMessageEventThrowing.
@Test
@SuppressWarnings("unchecked")
public void testUnmarshallIntermediateMessageEventThrowing() throws Exception {
Diagram<Graph, Metadata> diagram = unmarshall(BPMN_INTERMEDIATE_MESSAGE_EVENTTHROWING);
assertDiagram(diagram, 2);
assertEquals("IntermediateMessageEventThrowing", diagram.getMetadata().getTitle());
Node<? extends Definition, ?> intermediateMessageEventThrowingNode = diagram.getGraph().getNode("_85823DF6-02A0-4B8D-AE7A-61641A3A2E4B");
IntermediateMessageEventThrowing intermediateMessageEventThrowing = (IntermediateMessageEventThrowing) intermediateMessageEventThrowingNode.getContent().getDefinition();
assertNotNull(intermediateMessageEventThrowing.getExecutionSet());
MessageRef messageRef = intermediateMessageEventThrowing.getExecutionSet().getMessageRef();
assertEquals("msgref", messageRef.getValue());
DataIOSet dataIOSet = intermediateMessageEventThrowing.getDataIOSet();
AssignmentsInfo assignmentsInfo = dataIOSet.getAssignmentsinfo();
assertEquals("IntermediateMessageEventThrowingInputVar1:String||||[din]var1->IntermediateMessageEventThrowingInputVar1", assignmentsInfo.getValue());
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateMessageEventThrowing in project kie-wb-common by kiegroup.
the class IntermediateThrowEventConverter method messageEvent.
private PropertyWriter messageEvent(Node<View<IntermediateMessageEventThrowing>, ?> n) {
IntermediateThrowEvent event = bpmn2.createIntermediateThrowEvent();
event.setId(n.getUUID());
IntermediateMessageEventThrowing definition = n.getContent().getDefinition();
ThrowEventPropertyWriter p = propertyWriterFactory.of(event);
BPMNGeneralSet general = definition.getGeneral();
p.setName(general.getName().getValue());
p.setDocumentation(general.getDocumentation().getValue());
p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
MessageEventExecutionSet executionSet = definition.getExecutionSet();
p.addMessage(executionSet.getMessageRef());
p.setBounds(n.getContent().getBounds());
return p;
}
Aggregations