Search in sources :

Example 21 with Decision

use of org.kie.workbench.common.dmn.api.definition.model.Decision in project kie-wb-common by kiegroup.

the class DecisionConverter method dmnFromNode.

@Override
@SuppressWarnings("unchecked")
public JSITDecision dmnFromNode(final Node<View<Decision>, ?> node, final Consumer<JSITComponentWidths> componentWidthsConsumer) {
    final Decision source = (Decision) DefinitionUtils.getElementDefinition(node);
    final JSITDecision d = new JSITDecision();
    d.setId(source.getId().getValue());
    final Optional<String> description = Optional.ofNullable(DescriptionPropertyConverter.dmnFromWB(source.getDescription()));
    description.ifPresent(d::setDescription);
    d.setName(source.getName().getValue());
    final JSITInformationItem variable = InformationItemPrimaryPropertyConverter.dmnFromWB(source.getVariable(), source);
    d.setVariable(variable);
    final JSITExpression expression = ExpressionPropertyConverter.dmnFromWB(source.getExpression(), componentWidthsConsumer);
    d.setExpression(expression);
    final String question = QuestionPropertyConverter.dmnFromWB(source.getQuestion());
    if (!StringUtils.isEmpty(question)) {
        d.setQuestion(question);
    }
    final String allowedAnswers = AllowedAnswersPropertyConverter.dmnFromWB(source.getAllowedAnswers());
    if (!StringUtils.isEmpty(allowedAnswers)) {
        d.setAllowedAnswers(allowedAnswers);
    }
    // Add because it is present in the original JSON when unmarshalling
    if (Objects.isNull(d.getInformationRequirement())) {
        d.setInformationRequirement(new ArrayList<>());
    }
    // Add because it is present in the original JSON when unmarshalling
    if (Objects.isNull(d.getKnowledgeRequirement())) {
        d.setKnowledgeRequirement(new ArrayList<>());
    }
    // Add because it is present in the original JSON when unmarshalling
    if (Objects.isNull(d.getAuthorityRequirement())) {
        d.setAuthorityRequirement(new ArrayList<>());
    }
    // DMN spec table 2: Requirements connection rules
    final List<Edge<?, ?>> inEdges = (List<Edge<?, ?>>) node.getInEdges();
    for (Edge<?, ?> e : inEdges) {
        final Node<?, ?> sourceNode = e.getSourceNode();
        if (sourceNode.getContent() instanceof View<?>) {
            final View<?> view = (View<?>) sourceNode.getContent();
            if (view.getDefinition() instanceof DRGElement) {
                final DRGElement drgElement = (DRGElement) view.getDefinition();
                if (drgElement instanceof Decision) {
                    final JSITInformationRequirement iReq = new JSITInformationRequirement();
                    iReq.setId(getRawId(e.getUUID()));
                    final JSITDMNElementReference ri = new JSITDMNElementReference();
                    ri.setHref(getHref(drgElement));
                    iReq.setRequiredDecision(ri);
                    d.addInformationRequirement(iReq);
                } else if (drgElement instanceof BusinessKnowledgeModel) {
                    final JSITKnowledgeRequirement iReq = new JSITKnowledgeRequirement();
                    iReq.setId(getRawId(e.getUUID()));
                    final JSITDMNElementReference ri = new JSITDMNElementReference();
                    ri.setHref(getHref(drgElement));
                    iReq.setRequiredKnowledge(ri);
                    d.addKnowledgeRequirement(iReq);
                } else if (drgElement instanceof KnowledgeSource) {
                    final JSITAuthorityRequirement iReq = new JSITAuthorityRequirement();
                    iReq.setId(getRawId(e.getUUID()));
                    final JSITDMNElementReference ri = new JSITDMNElementReference();
                    ri.setHref(getHref(drgElement));
                    iReq.setRequiredAuthority(ri);
                    d.addAuthorityRequirement(iReq);
                } else if (drgElement instanceof InputData) {
                    final JSITInformationRequirement iReq = new JSITInformationRequirement();
                    iReq.setId(getRawId(e.getUUID()));
                    final JSITDMNElementReference ri = new JSITDMNElementReference();
                    ri.setHref(getHref(drgElement));
                    iReq.setRequiredInput(ri);
                    d.addInformationRequirement(iReq);
                } else if (drgElement instanceof DecisionService) {
                    if (e.getContent() instanceof Child) {
                    // Stunner relationship of this Decision be encapsulated by the DecisionService, not managed here.
                    } else if (e.getContent() instanceof View && ((View) e.getContent()).getDefinition() instanceof KnowledgeRequirement) {
                        final JSITKnowledgeRequirement iReq = new JSITKnowledgeRequirement();
                        iReq.setId(getRawId(e.getUUID()));
                        final JSITDMNElementReference ri = new JSITDMNElementReference();
                        ri.setHref(getHref(drgElement));
                        iReq.setRequiredKnowledge(ri);
                        d.addKnowledgeRequirement(iReq);
                    } else {
                        throw new UnsupportedOperationException("wrong model definition.");
                    }
                } else {
                    throw new UnsupportedOperationException("wrong model definition.");
                }
            }
        }
    }
    DMNExternalLinksToExtensionElements.loadExternalLinksIntoExtensionElements(source, d);
    return d;
}
Also used : JSITInformationItem(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITInformationItem) JSITDecision(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDecision) DecisionService(org.kie.workbench.common.dmn.api.definition.model.DecisionService) KnowledgeSource(org.kie.workbench.common.dmn.api.definition.model.KnowledgeSource) JSITAuthorityRequirement(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITAuthorityRequirement) ArrayList(java.util.ArrayList) List(java.util.List) InputData(org.kie.workbench.common.dmn.api.definition.model.InputData) Child(org.kie.workbench.common.stunner.core.graph.content.relationship.Child) JSITInformationRequirement(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITInformationRequirement) Id(org.kie.workbench.common.dmn.api.property.dmn.Id) IdUtils.getRawId(org.kie.workbench.common.dmn.client.marshaller.common.IdUtils.getRawId) BindableAdapterUtils.getDefinitionId(org.kie.workbench.common.stunner.core.definition.adapter.binding.BindableAdapterUtils.getDefinitionId) Child(org.kie.workbench.common.stunner.core.graph.content.relationship.Child) JSITDMNElementReference(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDMNElementReference) View(org.kie.workbench.common.stunner.core.graph.content.view.View) JSITDecision(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDecision) Decision(org.kie.workbench.common.dmn.api.definition.model.Decision) KnowledgeRequirement(org.kie.workbench.common.dmn.api.definition.model.KnowledgeRequirement) JSITKnowledgeRequirement(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITKnowledgeRequirement) JSITKnowledgeRequirement(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITKnowledgeRequirement) BusinessKnowledgeModel(org.kie.workbench.common.dmn.api.definition.model.BusinessKnowledgeModel) JSITExpression(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITExpression) Edge(org.kie.workbench.common.stunner.core.graph.Edge) DRGElement(org.kie.workbench.common.dmn.api.definition.model.DRGElement)

Example 22 with Decision

use of org.kie.workbench.common.dmn.api.definition.model.Decision in project kie-wb-common by kiegroup.

the class DecisionServiceConverter method dmnFromNode.

@Override
@SuppressWarnings("unchecked")
public JSITDecisionService dmnFromNode(final Node<View<DecisionService>, ?> node, final Consumer<JSITComponentWidths> componentWidthsConsumer) {
    final DecisionService source = (DecisionService) DefinitionUtils.getElementDefinition(node);
    final JSITDecisionService ds = new JSITDecisionService();
    ds.setId(source.getId().getValue());
    final Optional<String> description = Optional.ofNullable(DescriptionPropertyConverter.dmnFromWB(source.getDescription()));
    description.ifPresent(ds::setDescription);
    ds.setName(source.getName().getValue());
    final JSITInformationItem variable = InformationItemPrimaryPropertyConverter.dmnFromWB(source.getVariable(), source);
    ds.setVariable(variable);
    final List<JSITDMNElementReference> existing_outputDecision = source.getOutputDecision().stream().map(DMNElementReferenceConverter::dmnFromWB).collect(Collectors.toList());
    final List<JSITDMNElementReference> existing_encapsulatedDecision = source.getEncapsulatedDecision().stream().map(DMNElementReferenceConverter::dmnFromWB).collect(Collectors.toList());
    final List<JSITDMNElementReference> existing_inputDecision = source.getInputDecision().stream().map(DMNElementReferenceConverter::dmnFromWB).collect(Collectors.toList());
    final List<JSITDMNElementReference> existing_inputData = source.getInputData().stream().map(DMNElementReferenceConverter::dmnFromWB).collect(Collectors.toList());
    final List<JSITDMNElementReference> candidate_outputDecision = new ArrayList<>();
    final List<JSITDMNElementReference> candidate_encapsulatedDecision = new ArrayList<>();
    final List<JSITDMNElementReference> candidate_inputDecision = new ArrayList<>();
    final List<JSITDMNElementReference> candidate_inputData = new ArrayList<>();
    final HashSet<InputData> reqInputs = new HashSet();
    final HashSet<Decision> reqDecisions = new HashSet();
    // DMN spec table 2: Requirements connection rules
    final List<Edge<?, ?>> outEdges = (List<Edge<?, ?>>) node.getOutEdges();
    for (Edge<?, ?> e : outEdges) {
        if (e.getContent() instanceof Child) {
            @SuppressWarnings("unchecked") final Node<View<?>, ?> targetNode = e.getTargetNode();
            final View<?> targetNodeView = targetNode.getContent();
            if (targetNodeView.getDefinition() instanceof DRGElement) {
                final DRGElement drgElement = (DRGElement) targetNodeView.getDefinition();
                if (drgElement instanceof Decision) {
                    final Decision decision = (Decision) drgElement;
                    final JSITDMNElementReference ri = new JSITDMNElementReference();
                    ri.setHref("#" + decision.getId().getValue());
                    if (isOutputDecision(targetNode.getContent(), node.getContent())) {
                        candidate_outputDecision.add(ri);
                    } else {
                        candidate_encapsulatedDecision.add(ri);
                        final List<Node> all = diagramsSession.getNodesFromAllDiagramsWithContentId(drgElement.getContentDefinitionId());
                        for (final Node other : all) {
                            if (!Objects.equals(other, targetNode)) {
                                inspectDecisionForDSReqs(other, reqInputs, reqDecisions);
                            }
                        }
                    }
                    inspectDecisionForDSReqs(targetNode, reqInputs, reqDecisions);
                } else {
                    throw new UnsupportedOperationException("wrong model definition: a DecisionService is expected to encapsulate only Decision");
                }
            }
        } else if (e.getContent() instanceof View && ((View) e.getContent()).getDefinition() instanceof KnowledgeRequirement) {
        // this was taken care by the receiving Decision or BKM.
        } else {
            throw new UnsupportedOperationException("wrong model definition.");
        }
    }
    reqInputs.stream().sorted(Comparator.comparing(x -> x.getName().getValue())).map(x -> {
        final JSITDMNElementReference ri = new JSITDMNElementReference();
        ri.setHref("#" + x.getId().getValue());
        return ri;
    }).forEach(ri -> candidate_inputData.add(Js.uncheckedCast(ri)));
    reqDecisions.stream().sorted(Comparator.comparing(x -> x.getName().getValue())).map(x -> {
        final JSITDMNElementReference ri = new JSITDMNElementReference();
        ri.setHref("#" + x.getId().getValue());
        return ri;
    }).forEach(rs -> candidate_inputDecision.add(Js.uncheckedCast(rs)));
    for (int i = 0; i < candidate_outputDecision.size(); i++) {
        final JSITDMNElementReference er = Js.uncheckedCast(candidate_outputDecision.get(i));
        candidate_inputDecision.removeIf(x -> x.getHref().equals(er.getHref()));
    }
    for (int i = 0; i < candidate_encapsulatedDecision.size(); i++) {
        final JSITDMNElementReference er = Js.uncheckedCast(candidate_encapsulatedDecision.get(i));
        candidate_inputDecision.removeIf(x -> x.getHref().equals(er.getHref()));
    }
    ds.setInputData(reconcileExistingAndCandidate(existing_inputData, candidate_inputData));
    ds.setInputDecision(reconcileExistingAndCandidate(existing_inputDecision, candidate_inputDecision));
    ds.setEncapsulatedDecision(reconcileExistingAndCandidate(existing_encapsulatedDecision, candidate_encapsulatedDecision));
    ds.setOutputDecision(reconcileExistingAndCandidate(existing_outputDecision, candidate_outputDecision));
    DMNExternalLinksToExtensionElements.loadExternalLinksIntoExtensionElements(source, ds);
    return ds;
}
Also used : DefinitionUtils(org.kie.workbench.common.stunner.core.util.DefinitionUtils) Edge(org.kie.workbench.common.stunner.core.graph.Edge) InformationItemPrimary(org.kie.workbench.common.dmn.api.definition.model.InformationItemPrimary) View(org.kie.workbench.common.stunner.core.graph.content.view.View) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) Id(org.kie.workbench.common.dmn.api.property.dmn.Id) Js(jsinterop.base.Js) Name(org.kie.workbench.common.dmn.api.property.dmn.Name) NodeEntry(org.kie.workbench.common.dmn.client.marshaller.unmarshall.nodes.NodeEntry) BindableAdapterUtils.getDefinitionId(org.kie.workbench.common.stunner.core.definition.adapter.binding.BindableAdapterUtils.getDefinitionId) KnowledgeRequirement(org.kie.workbench.common.dmn.api.definition.model.KnowledgeRequirement) Description(org.kie.workbench.common.dmn.api.property.dmn.Description) JSITDMNElementReference(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDMNElementReference) FactoryManager(org.kie.workbench.common.stunner.core.api.FactoryManager) DecisionServiceDividerLineY(org.kie.workbench.common.dmn.api.property.dmn.DecisionServiceDividerLineY) StylingSet(org.kie.workbench.common.dmn.api.property.styling.StylingSet) DecisionServiceRectangleDimensionsSet(org.kie.workbench.common.dmn.api.property.dimensions.DecisionServiceRectangleDimensionsSet) JSITInformationItem(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITInformationItem) Child(org.kie.workbench.common.stunner.core.graph.content.relationship.Child) InputData(org.kie.workbench.common.dmn.api.definition.model.InputData) Collectors(java.util.stream.Collectors) JSITComponentWidths(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.kie.JSITComponentWidths) Objects(java.util.Objects) Consumer(java.util.function.Consumer) DRGElement(org.kie.workbench.common.dmn.api.definition.model.DRGElement) JSITDecisionService(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDecisionService) List(java.util.List) DecisionService(org.kie.workbench.common.dmn.api.definition.model.DecisionService) DMNDiagramsSession(org.kie.workbench.common.dmn.client.docks.navigator.drds.DMNDiagramsSession) Optional(java.util.Optional) DMNElementReference(org.kie.workbench.common.dmn.api.definition.model.DMNElementReference) Decision(org.kie.workbench.common.dmn.api.definition.model.Decision) Comparator(java.util.Comparator) Node(org.kie.workbench.common.stunner.core.graph.Node) JSITInformationItem(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITInformationItem) Node(org.kie.workbench.common.stunner.core.graph.Node) ArrayList(java.util.ArrayList) JSITDecisionService(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDecisionService) DecisionService(org.kie.workbench.common.dmn.api.definition.model.DecisionService) JSITDecisionService(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDecisionService) ArrayList(java.util.ArrayList) List(java.util.List) InputData(org.kie.workbench.common.dmn.api.definition.model.InputData) Child(org.kie.workbench.common.stunner.core.graph.content.relationship.Child) HashSet(java.util.HashSet) JSITDMNElementReference(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDMNElementReference) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Decision(org.kie.workbench.common.dmn.api.definition.model.Decision) KnowledgeRequirement(org.kie.workbench.common.dmn.api.definition.model.KnowledgeRequirement) Edge(org.kie.workbench.common.stunner.core.graph.Edge) DRGElement(org.kie.workbench.common.dmn.api.definition.model.DRGElement)

Example 23 with Decision

use of org.kie.workbench.common.dmn.api.definition.model.Decision in project kie-wb-common by kiegroup.

the class DecisionConverterTest method testDMNFromWB.

@Test
public void testDMNFromWB() {
    final Decision wb = new Decision();
    final LiteralExpression literalExpression = new LiteralExpression();
    final InformationItemPrimary informationItem = new InformationItemPrimary();
    literalExpression.getComponentWidths().set(0, 200.0);
    literalExpression.getId().setValue(EXPRESSION_UUID);
    wb.getId().setValue(DECISION_UUID);
    wb.getName().setValue(DECISION_NAME);
    wb.getDescription().setValue(DECISION_DESCRIPTION);
    wb.setVariable(informationItem);
    wb.setExpression(literalExpression);
    final Node<View<Decision>, ?> node = new NodeImpl<>(UUID.uuid());
    final View<Decision> view = new ViewImpl<>(wb, Bounds.create());
    node.setContent(view);
    final org.kie.dmn.model.api.Decision dmn = converter.dmnFromNode(node, componentWidthsConsumer);
    assertThat(dmn).isNotNull();
    assertThat(dmn.getId()).isNotNull();
    assertThat(dmn.getId()).isEqualTo(DECISION_UUID);
    assertThat(dmn.getName()).isNotNull();
    assertThat(dmn.getName()).isEqualTo(DECISION_NAME);
    assertThat(dmn.getDescription()).isNotNull();
    assertThat(dmn.getDescription()).isEqualTo(DECISION_DESCRIPTION);
    assertThat(dmn.getVariable()).isNotNull();
    assertThat(dmn.getVariable().getName()).isEqualTo(DECISION_NAME);
    assertThat(dmn.getExpression()).isNotNull();
    assertThat(dmn.getExpression().getId()).isEqualTo(EXPRESSION_UUID);
    verify(componentWidthsConsumer).accept(componentWidthsCaptor.capture());
    final ComponentWidths componentWidths = componentWidthsCaptor.getValue();
    assertThat(componentWidths).isNotNull();
    assertThat(componentWidths.getDmnElementRef().getLocalPart()).isEqualTo(EXPRESSION_UUID);
    assertThat(componentWidths.getWidths().size()).isEqualTo(literalExpression.getRequiredComponentWidthCount());
    assertThat(componentWidths.getWidths().get(0)).isEqualTo(200.0);
}
Also used : InformationItemPrimary(org.kie.workbench.common.dmn.api.definition.model.InformationItemPrimary) NodeImpl(org.kie.workbench.common.stunner.core.graph.impl.NodeImpl) TLiteralExpression(org.kie.dmn.model.v1_2.TLiteralExpression) LiteralExpression(org.kie.workbench.common.dmn.api.definition.model.LiteralExpression) View(org.kie.workbench.common.stunner.core.graph.content.view.View) TDecision(org.kie.dmn.model.v1_2.TDecision) Decision(org.kie.workbench.common.dmn.api.definition.model.Decision) ViewImpl(org.kie.workbench.common.stunner.core.graph.content.view.ViewImpl) HasComponentWidths(org.kie.workbench.common.dmn.api.definition.HasComponentWidths) ComponentWidths(org.kie.workbench.common.dmn.backend.definition.v1_1.dd.ComponentWidths) Test(org.junit.Test)

Example 24 with Decision

use of org.kie.workbench.common.dmn.api.definition.model.Decision in project kie-wb-common by kiegroup.

the class PointUtilsTest method testConvertToAbsoluteBoundsWhenNotChild.

@Test
public void testConvertToAbsoluteBoundsWhenNotChild() {
    final Node<View, ?> node = new NodeImpl<>(UUID.uuid());
    final View nodeView = new ViewImpl<>(new Decision(), Bounds.create(10, 20, 50, 60));
    node.setContent(nodeView);
    PointUtils.convertToAbsoluteBounds(node);
    final Bound ulBound = node.getContent().getBounds().getUpperLeft();
    final Bound lrBound = node.getContent().getBounds().getLowerRight();
    assertThat(ulBound.getX()).isEqualTo(10);
    assertThat(ulBound.getY()).isEqualTo(20);
    assertThat(lrBound.getX()).isEqualTo(50);
    assertThat(lrBound.getY()).isEqualTo(60);
}
Also used : NodeImpl(org.kie.workbench.common.stunner.core.graph.impl.NodeImpl) Bound(org.kie.workbench.common.stunner.core.graph.content.Bound) ViewImpl(org.kie.workbench.common.stunner.core.graph.content.view.ViewImpl) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Decision(org.kie.workbench.common.dmn.api.definition.model.Decision) Test(org.junit.Test)

Example 25 with Decision

use of org.kie.workbench.common.dmn.api.definition.model.Decision in project kie-wb-common by kiegroup.

the class DMNIncludedNodeFactoryTest method testMakeDMNIncludeModel.

@Test
public void testMakeDMNIncludeModel() {
    final Path path = mock(Path.class);
    final IncludedModel includedModel = mock(IncludedModel.class);
    final String drgElementId = "0000-1111-3333-4444";
    final String drgElementName = "Can Drive?";
    final String expectedFileName = "file.dmn";
    final String expectedModelName = "model";
    final String expectedImportedElementId = "0000-1111-3333-4444";
    final String expectedImportedElementName = "model.Can Drive?";
    final String expectedImportedItemDefinitionName = "model.tCustomBoolean";
    final DRGElement importedElementId = makeDecision(drgElementId, drgElementName, "tCustomBoolean");
    when(path.getFileName()).thenReturn(expectedFileName);
    when(includedModel.getModelName()).thenReturn(expectedModelName);
    final DMNIncludedNode node = factory.makeDMNIncludeModel(path, includedModel, importedElementId);
    final Decision drgElement = (Decision) node.getDrgElement();
    assertEquals(expectedImportedElementId, drgElement.getId().getValue());
    assertEquals(expectedImportedElementName, drgElement.getName().getValue());
    assertEquals(expectedImportedItemDefinitionName, drgElement.getVariable().getTypeRef().getLocalPart());
    assertEquals(expectedFileName, node.getFileName());
    assertTrue(drgElement.isAllowOnlyVisualChange());
}
Also used : Path(org.uberfire.backend.vfs.Path) DMNIncludedNode(org.kie.workbench.common.dmn.api.editors.included.DMNIncludedNode) IncludedModel(org.kie.workbench.common.dmn.api.editors.included.IncludedModel) Decision(org.kie.workbench.common.dmn.api.definition.model.Decision) DRGElement(org.kie.workbench.common.dmn.api.definition.model.DRGElement) Test(org.junit.Test)

Aggregations

Decision (org.kie.workbench.common.dmn.api.definition.model.Decision)121 Test (org.junit.Test)79 Name (org.kie.workbench.common.dmn.api.property.dmn.Name)39 View (org.kie.workbench.common.stunner.core.graph.content.view.View)38 InputData (org.kie.workbench.common.dmn.api.definition.model.InputData)37 Node (org.kie.workbench.common.stunner.core.graph.Node)28 Id (org.kie.workbench.common.dmn.api.property.dmn.Id)23 Edge (org.kie.workbench.common.stunner.core.graph.Edge)23 BusinessKnowledgeModel (org.kie.workbench.common.dmn.api.definition.model.BusinessKnowledgeModel)22 KnowledgeSource (org.kie.workbench.common.dmn.api.definition.model.KnowledgeSource)21 QName (org.kie.workbench.common.dmn.api.property.dmn.QName)21 ViewImpl (org.kie.workbench.common.stunner.core.graph.content.view.ViewImpl)20 List (java.util.List)16 TDecision (org.kie.dmn.model.v1_2.TDecision)16 HasExpression (org.kie.workbench.common.dmn.api.definition.HasExpression)16 DRGElement (org.kie.workbench.common.dmn.api.definition.model.DRGElement)16 TextAnnotation (org.kie.workbench.common.dmn.api.definition.model.TextAnnotation)16 ArrayList (java.util.ArrayList)15 Optional (java.util.Optional)15 DecisionService (org.kie.workbench.common.dmn.api.definition.model.DecisionService)15