Search in sources :

Example 1 with IntermediateEscalationEventThrowing

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

the class IntermediateThrowEventConverter method escalationEvent.

protected PropertyWriter escalationEvent(Node<View<IntermediateEscalationEventThrowing>, ?> n) {
    IntermediateThrowEvent event = bpmn2.createIntermediateThrowEvent();
    event.setId(n.getUUID());
    ThrowEventPropertyWriter p = propertyWriterFactory.of(event);
    IntermediateEscalationEventThrowing 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());
    EscalationEventExecutionSet executionSet = definition.getExecutionSet();
    p.addEscalation(executionSet.getEscalationRef());
    return p;
}
Also used : EscalationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationEventExecutionSet) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) IntermediateThrowEvent(org.eclipse.bpmn2.IntermediateThrowEvent) IntermediateEscalationEventThrowing(org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEventThrowing) ThrowEventPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.ThrowEventPropertyWriter)

Example 2 with IntermediateEscalationEventThrowing

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

the class IntermediateThrowEventConverter method escalationEvent.

protected BpmnNode escalationEvent(IntermediateThrowEvent event, EscalationEventDefinition eventDefinition) {
    Node<View<IntermediateEscalationEventThrowing>, Edge> node = factoryManager.newNode(event.getId(), IntermediateEscalationEventThrowing.class);
    IntermediateEscalationEventThrowing definition = node.getContent().getDefinition();
    EventPropertyReader p = propertyReaderFactory.of(event);
    node.getContent().setBounds(p.getBounds());
    definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
    definition.setDimensionsSet(p.getCircleDimensionSet());
    definition.setFontSet(p.getFontSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
    definition.setExecutionSet(new EscalationEventExecutionSet(new EscalationRef(EventDefinitionReader.escalationRefOf(eventDefinition))));
    return BpmnNode.of(node, p);
}
Also used : DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) EscalationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationEventExecutionSet) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Edge(org.kie.workbench.common.stunner.core.graph.Edge) EscalationRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationRef) IntermediateEscalationEventThrowing(org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEventThrowing) EventPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.EventPropertyReader) ThrowEventPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ThrowEventPropertyReader) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)

Example 3 with IntermediateEscalationEventThrowing

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

the class ProcessEscalationRefProviderTest method mockIntermediateEscalationEventThrowingNode.

private Node mockIntermediateEscalationEventThrowingNode(String escalationRefValue) {
    IntermediateEscalationEventThrowing event = new IntermediateEscalationEventThrowing();
    event.setExecutionSet(new EscalationEventExecutionSet(new EscalationRef(escalationRefValue)));
    return mockNode(event);
}
Also used : EscalationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationEventExecutionSet) CancellingEscalationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.CancellingEscalationEventExecutionSet) InterruptingEscalationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.InterruptingEscalationEventExecutionSet) EscalationRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationRef) IntermediateEscalationEventThrowing(org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEventThrowing)

Example 4 with IntermediateEscalationEventThrowing

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

the class ThrowingIntermediateEscalationEventTest method testUnmarshallTopLevelEventFilledProperties.

@Test
@Override
public void testUnmarshallTopLevelEventFilledProperties() throws Exception {
    final String EVENT_NAME = "Escalation event01 name ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
    final String EVENT_DOCUMENTATION = "Escalation event01 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
    final String EVENT_REF = "escalation01";
    final String EVENT_DATA_INPUT = "input:String||||[din]processGlobalVar->input";
    Diagram<Graph, Metadata> diagram = getDiagram();
    assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
    IntermediateEscalationEventThrowing filledTopEvent = getThrowingIntermediateNodeById(diagram, FILLED_TOP_LEVEL_EVENT_ID, HAS_NO_INCOME_EDGE, ZERO_OUTGOING_EDGES);
    assertGeneralSet(filledTopEvent.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
    assertEscalationEventExecutionSet(filledTopEvent.getExecutionSet(), EVENT_REF);
    assertDataIOSet(filledTopEvent.getDataIOSet(), EVENT_DATA_INPUT);
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) IntermediateEscalationEventThrowing(org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEventThrowing) Test(org.junit.Test)

Example 5 with IntermediateEscalationEventThrowing

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

the class ThrowingIntermediateEscalationEventTest method testUnmarshallSubprocessLevelEventWithEdgesEmptyProperties.

@Test
@Override
public void testUnmarshallSubprocessLevelEventWithEdgesEmptyProperties() {
    Diagram<Graph, Metadata> diagram = getDiagram();
    assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
    IntermediateEscalationEventThrowing emptySubprocessEvent = getThrowingIntermediateNodeById(diagram, EMPTY_WITH_EDGES_SUBPROCESS_LEVEL_EVENT_ID, HAS_INCOME_EDGE, TWO_OUTGOING_EDGES);
    assertGeneralSet(emptySubprocessEvent.getGeneral(), EMPTY_VALUE, EMPTY_VALUE);
    assertEscalationEventExecutionSet(emptySubprocessEvent.getExecutionSet(), EMPTY_VALUE);
    assertDataIOSet(emptySubprocessEvent.getDataIOSet(), EMPTY_VALUE);
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) IntermediateEscalationEventThrowing(org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEventThrowing) Test(org.junit.Test)

Aggregations

IntermediateEscalationEventThrowing (org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEventThrowing)18 Test (org.junit.Test)11 Metadata (org.kie.workbench.common.stunner.core.diagram.Metadata)9 Graph (org.kie.workbench.common.stunner.core.graph.Graph)9 EscalationEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationEventExecutionSet)5 IntermediateThrowEvent (org.eclipse.bpmn2.IntermediateThrowEvent)3 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)3 EscalationEventDefinition (org.eclipse.bpmn2.EscalationEventDefinition)2 AssignmentsInfo (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo)2 EscalationRef (org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationRef)2 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)2 ParsedAssignmentsInfo (org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.ParsedAssignmentsInfo)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