]
Guilherme Gomes updated DROOLS-5750:
------------------------------------
Sprint: 2020 Week 52-03 (from Dec 21)
Story Points: 3
[DMN Designer] Decision Service is missing inputData element in model
with multiple DRDs
----------------------------------------------------------------------------------------
Key: DROOLS-5750
URL:
https://issues.redhat.com/browse/DROOLS-5750
Project: Drools
Issue Type: Bug
Components: DMN Editor
Affects Versions: 7.46.0.Final
Reporter: Jan Stastny
Assignee: Guilherme Gomes
Priority: Major
Attachments: call centre drd.dmn
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
{code:xml}
<dmn:inputData href="#_4208DF15-2342-46EA-8EFF-E402FDDC2F5E"/>
{code}
so that the resulting decisionService definition is
{code:xml}
<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>
{code}
When the decision endpoint is invoked (before applying the workaround) the evaluation
fails and log contains following:
{code}
ERROR [org.kie.dmn.core.ast.DMNDecisionServiceFunctionDefinitionEvaluator] (default
task-35) Parameter count mismatch invoking decision service function 'office accepts
the call'
{code}