Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-5113

[DMN Designer] Decision Service is missing encapsulatedDecisions element for transitive deps in model with multiple DRDs

XMLWordPrintable

    • False
    • False
    • Undefined
    • Hide

      Transitive decisions need to be part of the encapsulatedDecisions section of the modeled decision service.

      Show
      Transitive decisions need to be part of the encapsulatedDecisions section of the modeled decision service.
    • Hide
      1. define multiple DRDs
      2. in one DRD define some decisions with transitive dependency on a decision
      3. in another DRD define Decision Service and reuse the Decision components from above (don't duplicate the transitive deps).
      4. build and deploy
      5. either
        • evaluate the decision to see the error reported in description
        • look into the dmn source and see that inputData from Decision Service is missing.
        • look at the Decision Service Details panel in Properties
      Show
      define multiple DRDs in one DRD define some decisions with transitive dependency on a decision in another DRD define Decision Service and reuse the Decision components from above (don't duplicate the transitive deps). build and deploy either evaluate the decision to see the error reported in description look into the dmn source and see that inputData from Decision Service is missing. look at the Decision Service Details panel in Properties

      When model has multiple DRDs and tries to reuse a decision component by adding it into a Decision Service node, the resulting Decision Service node has no encapsulatedDecisions definitions for its transitive dependencies.

      In multiple DRDs models the ultimate decision components representation should reflect all the relations merged from their occurrences - question is how to handle case of transitive dependencies in general. For inputs KOGITO-4266 the issue was more straight-forward. For linked decisions we need to consider:

      1. Should all transitive dependencies of a re-used decision component be added as encapsulatedDecisions, possibly also with inputs of transitive deps? (not possible now, attachment "callcentredrd.dmn")
      2. Should the reusal be possible also within the single DRD? (not possible now, attachment transitive-within-drd.png)
      3. Should we go further and allow also for modeling decision dependencies crossing the decision service boundary and including all transitives? (not possible now, attachment cross-boundary-dependency.png)

      I would suggest 1. and 2. to be solved in sync (both or nothing), while 3. is kinda different and here the reasoning could be to stick with 2., if user needs this.

      Test command for the attached DMN:

      curl -X POST -H "accept: application/json" -H "content-type: application/json" -u 'testadmin:admin1234;' http://localhost:8080/kie-server/services/rest/server/containers/project1_1.0.0-SNAPSHOT/dmn -d "{ \"model-namespace\" : \"https://github.com/kiegroup/drools/kie-dmn/_A73F19E1-F7F1-42F3-9343-1B5F51063737\", \"model-name\" : \"call centre drd\", \"decision-name\" : [], \"decision-id\" : [], \"dmn-context\" : {\"call\" : {\"phone\":{\"phone number\":\"602000001\",\"country prefix\":\"+420\"}, \"purpose\":\"help\"},\"incoming call\" : {\"phone\":{\"phone number\":\"602000001\",\"country prefix\":\"+420\"}, \"purpose\":\"help\"},\"employees\":[{\"work location\":\"Prague\",\"name\":\"Jan\"}], \"office\":{\"location\":\"Prague\"}}}"
      

      Error returned by engine:

      "messages" : [ {
              "dmn-message-severity" : "ERROR",
              "message" : "FEEL ERROR while evaluating literal expression 'list contains(banned phone numbers, call.phone)': The parameter 'list', in function list contains(), cannot be null.",
              "message-type" : "FEEL_EVALUATION_ERROR",
              "source-id" : "_DC47A027-051A-4E98-A8EC-319AE2B30E52"
            }
      

              karreiro_ Guilherme Gomes (Inactive)
              jstastny@redhat.com Jan Stastny
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: