use of org.kie.workbench.common.stunner.bpmn.definition.EndMessageEvent in project kie-wb-common by kiegroup.
the class EndEventConverter method messageEventDefinition.
private BpmnNode messageEventDefinition(EndEvent event, MessageEventDefinition e) {
Node<View<EndMessageEvent>, Edge> node = factoryManager.newNode(event.getId(), EndMessageEvent.class);
EndMessageEvent 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(e.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.EndMessageEvent 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.EndMessageEvent in project kie-wb-common by kiegroup.
the class BPMNDirectDiagramMarshallerTest 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.EndMessageEvent in project kie-wb-common by kiegroup.
the class ProcessMessageRefProviderTest method mockEndMessageEventNode.
private Element mockEndMessageEventNode(String messageRefValue) {
EndMessageEvent event = new EndMessageEvent();
event.setExecutionSet(new MessageEventExecutionSet(new MessageRef(messageRefValue)));
return mockNode(event);
}
use of org.kie.workbench.common.stunner.bpmn.definition.EndMessageEvent in project kie-wb-common by kiegroup.
the class EndEventConverter method messageEvent.
private PropertyWriter messageEvent(Node<View<EndMessageEvent>, ?> n) {
EndEvent event = bpmn2.createEndEvent();
event.setId(n.getUUID());
EndMessageEvent 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