use of org.eclipse.bpmn2.LinkEventDefinition in project kie-wb-common by kiegroup.
the class BaseEventPropertyReaderTest method testGetLinkRef.
@Test
public void testGetLinkRef() {
// Link Event can't be Boundary
if (this instanceof BoundaryEventPropertyReaderTest) {
return;
}
assertEquals("", propertyReader.getLinkRef());
LinkEventDefinition eventDefinition = mock(LinkEventDefinition.class);
setLinkEventDefinitionOnCurrentMock(eventDefinition);
when(eventDefinition.getName()).thenReturn(null);
assertEquals("", propertyReader.getLinkRef());
when(eventDefinition.getName()).thenReturn(LINK_REF_ID);
assertEquals(LINK_REF_ID, propertyReader.getLinkRef());
EventDefinition differentType = mock(EventDefinition.class);
setLinkEventDefinitionOnCurrentMock(differentType);
assertEquals("", propertyReader.getLinkRef());
}
use of org.eclipse.bpmn2.LinkEventDefinition in project kie-wb-common by kiegroup.
the class IntermediateLinkEventPostConverter method process.
@Override
public void process(ProcessPropertyWriter processWriter, BasePropertyWriter nodeWriter, Node<View<? extends BPMNViewDefinition>, ?> node) {
ThrowEvent throwEvent = (ThrowEvent) nodeWriter.getElement();
List<EventDefinition> linkEvents = throwEvent.getEventDefinitions();
if (linkEvents != null && !linkEvents.isEmpty()) {
addTargetRef(processWriter.getProcess(), throwEvent.getId(), (LinkEventDefinition) linkEvents.get(0));
}
}
Aggregations