Search in sources :

Example 26 with IntermediateEscalationEvent

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

the class IntermediateCatchEventConverterTest method verifyBoundaryEscalationEventConvert.

private void verifyBoundaryEscalationEventConvert() {
    IntermediateEscalationEvent definition = mock(IntermediateEscalationEvent.class);
    EscalationEventDefinition eventDefinition = mock(EscalationEventDefinition.class);
    BoundaryEvent boundaryEvent = mockBoundaryEvent(definition);
    eventDefinitions.clear();
    eventDefinitions.add(eventDefinition);
    tested.convertBoundaryEvent(boundaryEvent);
    verify(tested).escalationEvent(boundaryEvent, eventDefinition);
}
Also used : IntermediateEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEvent) EscalationEventDefinition(org.eclipse.bpmn2.EscalationEventDefinition) BoundaryEvent(org.eclipse.bpmn2.BoundaryEvent)

Example 27 with IntermediateEscalationEvent

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

the class IntermediateCatchEventConverter method escalationEvent.

protected PropertyWriter escalationEvent(Node<View<IntermediateEscalationEvent>, ?> n) {
    CatchEventPropertyWriter p = createCatchEventPropertyWriter(n);
    p.getFlowElement().setId(n.getUUID());
    p.setAbsoluteBounds(n);
    IntermediateEscalationEvent definition = n.getContent().getDefinition();
    BPMNGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    p.setMetaData(definition.getAdvancedData().getMetaDataAttributes());
    p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
    CancellingEscalationEventExecutionSet executionSet = definition.getExecutionSet();
    p.setCancelActivity(executionSet.getCancelActivity().getValue());
    p.addSlaDueDate(executionSet.getSlaDueDate());
    p.addEscalation(executionSet.getEscalationRef());
    return p;
}
Also used : IntermediateEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEvent) CatchEventPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CatchEventPropertyWriter) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) CancellingEscalationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.CancellingEscalationEventExecutionSet)

Example 28 with IntermediateEscalationEvent

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

the class IntermediateCatchEventConverter method escalationEvent.

protected Result<BpmnNode> escalationEvent(CatchEvent event, EscalationEventDefinition e) {
    String nodeId = event.getId();
    Node<View<IntermediateEscalationEvent>, Edge> node = factoryManager.newNode(nodeId, IntermediateEscalationEvent.class);
    IntermediateEscalationEvent 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 CancellingEscalationEventExecutionSet(new CancelActivity(p.isCancelActivity()), new SLADueDate(p.getSlaDueDate()), new EscalationRef(EventDefinitionReader.escalationRefOf(e))));
    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) CancellingEscalationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.CancellingEscalationEventExecutionSet) DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) IntermediateEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEvent) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) CatchEventPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.CatchEventPropertyReader) Edge(org.kie.workbench.common.stunner.core.graph.Edge) EscalationRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationRef) CancelActivity(org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)

Example 29 with IntermediateEscalationEvent

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

the class ProcessEscalationRefProviderTest method mockIntermediateEscalationEventCatchingNode.

private Node mockIntermediateEscalationEventCatchingNode(String escalationRefValue) {
    IntermediateEscalationEvent event = new IntermediateEscalationEvent();
    event.setExecutionSet(new CancellingEscalationEventExecutionSet(new CancelActivity(true), new SLADueDate(), new EscalationRef(escalationRefValue)));
    return mockNode(event);
}
Also used : SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) IntermediateEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEvent) EscalationRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationRef) CancellingEscalationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.CancellingEscalationEventExecutionSet) CancelActivity(org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)

Aggregations

IntermediateEscalationEvent (org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEvent)29 Test (org.junit.Test)21 Metadata (org.kie.workbench.common.stunner.core.diagram.Metadata)17 Graph (org.kie.workbench.common.stunner.core.graph.Graph)17 CancellingEscalationEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.CancellingEscalationEventExecutionSet)4 EscalationEventDefinition (org.eclipse.bpmn2.EscalationEventDefinition)3 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)3 CancelActivity (org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)3 IntermediateCatchEvent (org.eclipse.bpmn2.IntermediateCatchEvent)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 SLADueDate (org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate)2 BoundaryEvent (org.eclipse.bpmn2.BoundaryEvent)1 ParsedAssignmentsInfo (org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.ParsedAssignmentsInfo)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