Search in sources :

Example 1 with IntermediateLinkEventCatching

use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateLinkEventCatching in project kie-wb-common by kiegroup.

the class AbstractDataTypeCacheTest method testExtractIntermediateLinkEventCatching.

@Test
public void testExtractIntermediateLinkEventCatching() {
    IntermediateLinkEventCatching intermediateLinkEventCatching = new IntermediateLinkEventCatching();
    IntermediateLinkEventCatching intermediateLinkEventCatching2 = new IntermediateLinkEventCatching();
    when(firstView.getDefinition()).thenReturn(intermediateLinkEventCatching);
    when(lastView.getDefinition()).thenReturn(intermediateLinkEventCatching2);
    dataTypeCache.extractFromItem(firstView);
    dataTypeCache.extractFromItem(lastView);
    assertTrue(dataTypeCache.allDataTypes.contains("MyType"));
    assertTrue(dataTypeCache.allDataTypes.contains("com.myspace.Person"));
}
Also used : IntermediateLinkEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateLinkEventCatching) Test(org.junit.Test)

Example 2 with IntermediateLinkEventCatching

use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateLinkEventCatching in project kie-wb-common by kiegroup.

the class IntermediateCatchEventConverterTest method linkEvent.

@Test
public void linkEvent() {
    IntermediateLinkEventCatching definition = mock(IntermediateLinkEventCatching.class);
    LinkEventDefinition eventDefinition = mock(LinkEventDefinition.class);
    CatchEvent catchEvent = mockIntermediateCatchEvent(definition);
    tested.linkEvent(catchEvent);
    verifyCommonProperties(definition);
    verify(propertyReader).getLinkRef();
    verify(definition).setExecutionSet(Mockito.<LinkEventExecutionSet>any());
}
Also used : LinkEventDefinition(org.eclipse.bpmn2.LinkEventDefinition) IntermediateLinkEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateLinkEventCatching) CatchEvent(org.eclipse.bpmn2.CatchEvent) IntermediateCatchEvent(org.eclipse.bpmn2.IntermediateCatchEvent) Test(org.junit.Test)

Example 3 with IntermediateLinkEventCatching

use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateLinkEventCatching in project kie-wb-common by kiegroup.

the class IntermediateCatchEventConverter method linkEvent.

protected Result<BpmnNode> linkEvent(CatchEvent event) {
    String nodeId = event.getId();
    Node<View<IntermediateLinkEventCatching>, Edge> node = factoryManager.newNode(nodeId, IntermediateLinkEventCatching.class);
    IntermediateLinkEventCatching definition = node.getContent().getDefinition();
    CatchEventPropertyReader p = propertyReaderFactory.of(event);
    node.getContent().setBounds(p.getBounds());
    definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setBackgroundSet(p.getBackgroundSet());
    definition.setFontSet(p.getFontSet());
    definition.setDimensionsSet(p.getCircleDimensionSet());
    definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
    definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
    definition.setExecutionSet(new LinkEventExecutionSet(new LinkRef(p.getLinkRef())));
    return Result.success(BpmnNode.of(node, p));
}
Also used : Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name) DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) LinkEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.link.LinkEventExecutionSet) IntermediateLinkEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateLinkEventCatching) CatchEventPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.CatchEventPropertyReader) Edge(org.kie.workbench.common.stunner.core.graph.Edge) LinkRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.link.LinkRef)

Example 4 with IntermediateLinkEventCatching

use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateLinkEventCatching in project kie-wb-common by kiegroup.

the class IntermediateCatchEventConverterTest method createIntermediateLinkEventCatchingNode.

private Node createIntermediateLinkEventCatchingNode() {
    LinkEventExecutionSet executionSet = new LinkEventExecutionSet(linkRef);
    IntermediateLinkEventCatching eventCatching = new IntermediateLinkEventCatching(generalSet, mock(BackgroundSet.class), mock(FontSet.class), mock(CircleDimensionSet.class), dataIOSet, advancedData, executionSet);
    Node dockNode = mockNode();
    Node node = mockDockedNode(dockNode, eventCatching);
    return node;
}
Also used : FontSet(org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet) LinkEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.link.LinkEventExecutionSet) BackgroundSet(org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet) CircleDimensionSet(org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.CircleDimensionSet) IntermediateLinkEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateLinkEventCatching) Node(org.kie.workbench.common.stunner.core.graph.Node)

Example 5 with IntermediateLinkEventCatching

use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateLinkEventCatching in project kie-wb-common by kiegroup.

the class ProcessLinkRefProviderTest method mockIntermediateLinkEventCatchingNode.

private Node mockIntermediateLinkEventCatchingNode(String linkRefValue) {
    IntermediateLinkEventCatching event = new IntermediateLinkEventCatching();
    event.setExecutionSet(new LinkEventExecutionSet(new LinkRef(linkRefValue)));
    return mockNode(event);
}
Also used : LinkEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.link.LinkEventExecutionSet) IntermediateLinkEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateLinkEventCatching) LinkRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.link.LinkRef)

Aggregations

IntermediateLinkEventCatching (org.kie.workbench.common.stunner.bpmn.definition.IntermediateLinkEventCatching)8 LinkEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.link.LinkEventExecutionSet)4 IntermediateCatchEvent (org.eclipse.bpmn2.IntermediateCatchEvent)2 LinkEventDefinition (org.eclipse.bpmn2.LinkEventDefinition)2 Test (org.junit.Test)2 LinkRef (org.kie.workbench.common.stunner.bpmn.definition.property.event.link.LinkRef)2 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)2 CatchEvent (org.eclipse.bpmn2.CatchEvent)1 CatchEventPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CatchEventPropertyWriter)1 CatchEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.CatchEventPropertyReader)1 AdHocSubprocess (org.kie.workbench.common.stunner.bpmn.definition.AdHocSubprocess)1 BPMNDiagramImpl (org.kie.workbench.common.stunner.bpmn.definition.BPMNDiagramImpl)1 BusinessRuleTask (org.kie.workbench.common.stunner.bpmn.definition.BusinessRuleTask)1 DataObject (org.kie.workbench.common.stunner.bpmn.definition.DataObject)1 EmbeddedSubprocess (org.kie.workbench.common.stunner.bpmn.definition.EmbeddedSubprocess)1 EndErrorEvent (org.kie.workbench.common.stunner.bpmn.definition.EndErrorEvent)1 EndEscalationEvent (org.kie.workbench.common.stunner.bpmn.definition.EndEscalationEvent)1 EndMessageEvent (org.kie.workbench.common.stunner.bpmn.definition.EndMessageEvent)1 EndSignalEvent (org.kie.workbench.common.stunner.bpmn.definition.EndSignalEvent)1 EventSubprocess (org.kie.workbench.common.stunner.bpmn.definition.EventSubprocess)1