Search in sources :

Example 1 with CancellingConditionalEventExecutionSet

use of org.kie.workbench.common.stunner.bpmn.definition.property.event.conditional.CancellingConditionalEventExecutionSet in project kie-wb-common by kiegroup.

the class IntermediateCatchEventConverterTest method createIntermediateConditionalEventCatchingNode.

private Node createIntermediateConditionalEventCatchingNode() {
    CancellingConditionalEventExecutionSet executionSet = new CancellingConditionalEventExecutionSet(new CancelActivity(CANCEL_ACTIVITY), slaDueDate, conditionExpression);
    IntermediateConditionalEvent eventCatching = new IntermediateConditionalEvent(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) BackgroundSet(org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet) CircleDimensionSet(org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.CircleDimensionSet) IntermediateConditionalEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateConditionalEvent) Node(org.kie.workbench.common.stunner.core.graph.Node) CancellingConditionalEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.conditional.CancellingConditionalEventExecutionSet) CancelActivity(org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)

Example 2 with CancellingConditionalEventExecutionSet

use of org.kie.workbench.common.stunner.bpmn.definition.property.event.conditional.CancellingConditionalEventExecutionSet in project kie-wb-common by kiegroup.

the class IntermediateCatchEventConverter method conditionalEvent.

protected PropertyWriter conditionalEvent(Node<View<IntermediateConditionalEvent>, ?> n) {
    CatchEventPropertyWriter p = createCatchEventPropertyWriter(n);
    p.getFlowElement().setId(n.getUUID());
    p.setAbsoluteBounds(n);
    IntermediateConditionalEvent 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());
    CancellingConditionalEventExecutionSet executionSet = definition.getExecutionSet();
    p.setCancelActivity(executionSet.getCancelActivity().getValue());
    p.addSlaDueDate(executionSet.getSlaDueDate());
    p.addCondition(executionSet.getConditionExpression());
    return p;
}
Also used : CatchEventPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CatchEventPropertyWriter) IntermediateConditionalEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateConditionalEvent) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) CancellingConditionalEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.conditional.CancellingConditionalEventExecutionSet)

Example 3 with CancellingConditionalEventExecutionSet

use of org.kie.workbench.common.stunner.bpmn.definition.property.event.conditional.CancellingConditionalEventExecutionSet in project kie-wb-common by kiegroup.

the class IntermediateCatchEventConverter method conditionalEvent.

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

Aggregations

IntermediateConditionalEvent (org.kie.workbench.common.stunner.bpmn.definition.IntermediateConditionalEvent)3 CancellingConditionalEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.conditional.CancellingConditionalEventExecutionSet)3 CancelActivity (org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)2 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)2 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 BackgroundSet (org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet)1 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)1 CircleDimensionSet (org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.CircleDimensionSet)1 FontSet (org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet)1 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)1 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)1 SLADueDate (org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate)1 AdvancedData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData)1 Edge (org.kie.workbench.common.stunner.core.graph.Edge)1 Node (org.kie.workbench.common.stunner.core.graph.Node)1 View (org.kie.workbench.common.stunner.core.graph.content.view.View)1