Search in sources :

Example 1 with IntermediateLinkEventThrowing

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

the class AbstractDataTypeCacheTest method testExtractIntermediateLinkEventThrowing.

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

Example 2 with IntermediateLinkEventThrowing

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

the class IntermediateThrowEventConverter method linkEvent.

protected PropertyWriter linkEvent(Node<View<IntermediateLinkEventThrowing>, ?> n) {
    IntermediateThrowEvent event = bpmn2.createIntermediateThrowEvent();
    event.setId(n.getUUID());
    ThrowEventPropertyWriter p = propertyWriterFactory.of(event);
    IntermediateLinkEventThrowing definition = n.getContent().getDefinition();
    p.setAbsoluteBounds(n);
    BPMNGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    p.setMetaData(definition.getAdvancedData().getMetaDataAttributes());
    p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
    LinkEventExecutionSet executionSet = definition.getExecutionSet();
    p.addLink(executionSet.getLinkRef());
    return p;
}
Also used : IntermediateLinkEventThrowing(org.kie.workbench.common.stunner.bpmn.definition.IntermediateLinkEventThrowing) LinkEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.link.LinkEventExecutionSet) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) IntermediateThrowEvent(org.eclipse.bpmn2.IntermediateThrowEvent) ThrowEventPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.ThrowEventPropertyWriter)

Example 3 with IntermediateLinkEventThrowing

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

the class IntermediateThrowEventConverterTest method linkEvent.

@Test
public void linkEvent() {
    IntermediateLinkEventThrowing definition = mock(IntermediateLinkEventThrowing.class);
    IntermediateThrowEvent intermediateThrowEvent = mockIntermediateThrowEvent(definition);
    tested.linkEvent(intermediateThrowEvent);
    verifyCommonProperties(definition);
    verify(propertyReader).getLinkRef();
    verify(definition).setExecutionSet(any(LinkEventExecutionSet.class));
}
Also used : IntermediateLinkEventThrowing(org.kie.workbench.common.stunner.bpmn.definition.IntermediateLinkEventThrowing) LinkEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.link.LinkEventExecutionSet) IntermediateThrowEvent(org.eclipse.bpmn2.IntermediateThrowEvent) Test(org.junit.Test)

Example 4 with IntermediateLinkEventThrowing

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

the class ProcessLinkRefProviderTest method mockIntermediateLinkEventThrowingNode.

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

Example 5 with IntermediateLinkEventThrowing

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

the class IntermediateThrowEventConverterTest method createIntermediateLinkEventThrowingNode.

private Node createIntermediateLinkEventThrowingNode() {
    LinkEventExecutionSet executionSet = new LinkEventExecutionSet(linkRef);
    IntermediateLinkEventThrowing eventThrowing = new IntermediateLinkEventThrowing(generalSet, mock(BackgroundSet.class), mock(FontSet.class), mock(CircleDimensionSet.class), dataIOSet, advancedData, executionSet);
    Node dockNode = mockNode();
    Node node = mockDockedNode(dockNode, eventThrowing);
    return node;
}
Also used : FontSet(org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet) IntermediateLinkEventThrowing(org.kie.workbench.common.stunner.bpmn.definition.IntermediateLinkEventThrowing) 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) Node(org.kie.workbench.common.stunner.core.graph.Node)

Aggregations

IntermediateLinkEventThrowing (org.kie.workbench.common.stunner.bpmn.definition.IntermediateLinkEventThrowing)8 LinkEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.link.LinkEventExecutionSet)5 IntermediateThrowEvent (org.eclipse.bpmn2.IntermediateThrowEvent)3 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 LinkEventDefinition (org.eclipse.bpmn2.LinkEventDefinition)1 ThrowEventPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.ThrowEventPropertyWriter)1 EventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.EventPropertyReader)1 ThrowEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ThrowEventPropertyReader)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