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

[DMN Designer] Decision Service is missing inputData element in model with multiple DRDs

    XMLWordPrintable

    Details

    • Sprint:
      2021 Week 04-06 (from Jan 25), 2021 Week 07-09 (from Feb 15), 2021 Week 10-12 (from Mar 8)
    • Story Points:
      5
    • Steps to Reproduce:
      Hide
      1. define multiple DRDs
      2. in one define some decisions with inputs
      3. in another define Decision Service and reuse the Decision components from above (don't duplicate the inputs).
      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.
      Show
      define multiple DRDs in one define some decisions with inputs in another define Decision Service and reuse the Decision components from above (don't duplicate the inputs). 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.
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Add manually an inputData element (reference to the inputs for included decisions) into resulting decisionService element.

      Show
      Add manually an inputData element (reference to the inputs for included decisions) into resulting decisionService element.
    • [QE] How to address?:
      ---
    • [QE] Why QE missed?:
      ---

      Description

      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 inputData definitions.

      In multiple DRDs models the ultimate decision components representation should reflect all the relations merged from their occurrences - i.e. in this case it should not matter that the Input is not defined directly in the DRD with the Decision Service. The Decision Service should inherit the inputData elements based on what inputs do the included decisions have.

      See call centre drd.dmn .

      That's a multiple DRD model with Decision Service office accepts the call which suffers from this issue, in the file the fix is already applied - by adding the

      <dmn:inputData href="#_4208DF15-2342-46EA-8EFF-E402FDDC2F5E"/> 
      

      so that the resulting decisionService definition is

        <dmn:decisionService id="_D36C61E4-C5DB-4375-855B-D58A0269A570" name="office accepts the call">
          <dmn:extensionElements/>
          <dmn:variable id="_EDEE0B3D-2B82-4FDE-B725-4ECFBE8F8768" name="office accepts the call" typeRef="boolean"/>
          <dmn:outputDecision href="#_25C72B4D-63EF-406F-89C6-612B2090E984"/>
          <dmn:encapsulatedDecision href="#_4F791054-DEBD-4EA7-95BA-9E4695239822"/>
          <dmn:encapsulatedDecision href="#_606C3BEC-097B-4DA4-9209-9BBA72EBCEF1"/>
          <dmn:inputData href="#_4208DF15-2342-46EA-8EFF-E402FDDC2F5E"/>
        </dmn:decisionService>
      

      When the decision endpoint is invoked (before applying the workaround) the evaluation fails and log contains following:

      ERROR [org.kie.dmn.core.ast.DMNDecisionServiceFunctionDefinitionEvaluator] (default task-35) Parameter count mismatch invoking decision service function 'office accepts the call'
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dadossan Daniel José dos Santos
              Reporter:
              jstastny Jan Stastny
              Tester:
              Jan Stastny Jan Stastny
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: