Search in sources :

Example 16 with PropertyWriter

use of org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.PropertyWriter in project kie-wb-common by kiegroup.

the class ReusableSubprocessConverterTest method testToFlowElement_process.

@Test
public void testToFlowElement_process() {
    final BaseReusableSubprocess definition = new ReusableSubprocess();
    final View<BaseReusableSubprocess> view = new ViewImpl<>(definition, Bounds.create());
    final Node<View<BaseReusableSubprocess>, ?> node = new NodeImpl<>(java.util.UUID.randomUUID().toString());
    node.setContent(view);
    final PropertyWriter propertyWriter = tested.toFlowElement(node);
    assertTrue(CallActivityPropertyWriter.class.isInstance(propertyWriter));
    assertFalse(CustomElement.isCase.of(propertyWriter.getFlowElement()).get());
}
Also used : CallActivityPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CallActivityPropertyWriter) BaseReusableSubprocess(org.kie.workbench.common.stunner.bpmn.definition.BaseReusableSubprocess) NodeImpl(org.kie.workbench.common.stunner.core.graph.impl.NodeImpl) ReusableSubprocess(org.kie.workbench.common.stunner.bpmn.definition.ReusableSubprocess) BaseReusableSubprocess(org.kie.workbench.common.stunner.bpmn.definition.BaseReusableSubprocess) ViewImpl(org.kie.workbench.common.stunner.core.graph.content.view.ViewImpl) View(org.kie.workbench.common.stunner.core.graph.content.view.View) CallActivityPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CallActivityPropertyWriter) PropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.PropertyWriter) Test(org.junit.Test)

Example 17 with PropertyWriter

use of org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.PropertyWriter in project kie-wb-common by kiegroup.

the class IntermediateCatchEventConverterTest method signalEvent.

@Test
public void signalEvent() {
    Node node = createIntermediateSignalEventCatchingNode();
    PropertyWriter propertyWriter = tested.signalEvent(node);
    assertNotNull(propertyWriter);
    verify(boundaryEventPropertyWriter).setCancelActivity(CANCEL_ACTIVITY);
    verify(boundaryEventPropertyWriter).addSlaDueDate(slaDueDate);
    verify(boundaryEventPropertyWriter).addSignal(signalRef);
    verifyCommonProperties(node);
}
Also used : Node(org.kie.workbench.common.stunner.core.graph.Node) BoundaryEventPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.BoundaryEventPropertyWriter) PropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.PropertyWriter) CatchEventPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CatchEventPropertyWriter) Test(org.junit.Test)

Example 18 with PropertyWriter

use of org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.PropertyWriter in project kie-wb-common by kiegroup.

the class IntermediateCatchEventConverterTest method timerEvent.

@Test
public void timerEvent() {
    Node node = createIntermediateTimerEventCatchingNode();
    PropertyWriter propertyWriter = tested.timerEvent(node);
    assertNotNull(propertyWriter);
    verify(boundaryEventPropertyWriter).setCancelActivity(CANCEL_ACTIVITY);
    verify(boundaryEventPropertyWriter).addSlaDueDate(slaDueDate);
    verify(boundaryEventPropertyWriter).addTimer(timerSettings);
    verifyCommonProperties(node);
}
Also used : Node(org.kie.workbench.common.stunner.core.graph.Node) BoundaryEventPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.BoundaryEventPropertyWriter) PropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.PropertyWriter) CatchEventPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CatchEventPropertyWriter) Test(org.junit.Test)

Example 19 with PropertyWriter

use of org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.PropertyWriter in project kie-wb-common by kiegroup.

the class IntermediateCatchEventConverterTest method escalationEvent.

@Test
public void escalationEvent() {
    Node node = createIntermediateEscalationEventCatchingNode();
    PropertyWriter propertyWriter = tested.escalationEvent(node);
    assertNotNull(propertyWriter);
    verify(boundaryEventPropertyWriter).setCancelActivity(CANCEL_ACTIVITY);
    verify(boundaryEventPropertyWriter).addSlaDueDate(slaDueDate);
    verify(boundaryEventPropertyWriter).addEscalation(escalationRef);
    verifyCommonProperties(node);
}
Also used : Node(org.kie.workbench.common.stunner.core.graph.Node) BoundaryEventPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.BoundaryEventPropertyWriter) PropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.PropertyWriter) CatchEventPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CatchEventPropertyWriter) Test(org.junit.Test)

Example 20 with PropertyWriter

use of org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.PropertyWriter in project kie-wb-common by kiegroup.

the class IntermediateThrowEventConverterTest method messageEvent.

@Test
public void messageEvent() {
    Node node = createIntermediateMessageEventThrowingNode();
    PropertyWriter propertyWriter = tested.messageEvent(node);
    assertNotNull(propertyWriter);
    verifyCommonProperties(node);
    verify(throwEventPropertyWriter).addMessage(messageRef);
}
Also used : Node(org.kie.workbench.common.stunner.core.graph.Node) PropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.PropertyWriter) ThrowEventPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.ThrowEventPropertyWriter) Test(org.junit.Test)

Aggregations

PropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.PropertyWriter)21 Test (org.junit.Test)20 Node (org.kie.workbench.common.stunner.core.graph.Node)13 BoundaryEventPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.BoundaryEventPropertyWriter)8 CatchEventPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CatchEventPropertyWriter)8 NodeImpl (org.kie.workbench.common.stunner.core.graph.impl.NodeImpl)8 CallActivityPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CallActivityPropertyWriter)6 BaseReusableSubprocess (org.kie.workbench.common.stunner.bpmn.definition.BaseReusableSubprocess)6 ReusableSubprocess (org.kie.workbench.common.stunner.bpmn.definition.ReusableSubprocess)6 View (org.kie.workbench.common.stunner.core.graph.content.view.View)6 ViewImpl (org.kie.workbench.common.stunner.core.graph.content.view.ViewImpl)6 ThrowEventPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.ThrowEventPropertyWriter)5 DataObjectPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.DataObjectPropertyWriter)2 TextAnnotationPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.TextAnnotationPropertyWriter)2 AdHocAutostart (org.kie.workbench.common.stunner.bpmn.definition.property.task.AdHocAutostart)2 DataObject (org.kie.workbench.common.stunner.bpmn.definition.DataObject)1 TextAnnotation (org.kie.workbench.common.stunner.bpmn.definition.TextAnnotation)1 DataObjectType (org.kie.workbench.common.stunner.bpmn.definition.property.artifacts.DataObjectType)1 DataObjectTypeValue (org.kie.workbench.common.stunner.bpmn.definition.property.artifacts.DataObjectTypeValue)1 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)1