DMN 1.2 RTF Avatar
  1. OMG Issue

DMN12 — Generalized Unary Tests

  • Key: DMN12-29
  • Status: closed  
  • Source: Sapiens Decision NA ( Mr. Gil Ronen)
  • Summary:

    Modeling with collections of items is fundamental to much business processing (as was noted in various LinkedIn threads). Simple comparisons such as ‘does A,B contain A’ should be done in decision tables using dedicated operators and not require exiting to FEEL and structures external to the decision tables. Several tools already support these operators. While you can write these expressions in FEEL it is useful that a table segregates each row as a rule so that one row matches "list contains both a and b", the next row matches "list contains c, d, and e", etc. We find these representations of the logic to be both common and easily understood by business folks. The proposal is to add ‘Is In’, ‘Contains’ and ‘Contains Any’ operators and their negation (symbols can be used instead of the full operator textual name).

    Attached images show this feature used in a business setting.

    Examples below of how these operators work (1st element is the Input Expression result and the 2nd is an Input Entry):

    {A,B} Contains A returns True {A,B,C} Contains {A,B}

    returns True

    {A,B,C} Contains {A,D} returns False
    {A,B} Contains Any A returns True{A,B,C}

    Contains Any

    {A,D}

    returns True

    {A,B} Contains Any C returns False

    A Is In {A,B}

    returns True

    {A,B} Is In {A,B,C} returns True{A,B}

    Is In

    {A,C}

    returns False

  • Reported: DMN 1.1 — Thu, 5 May 2016 14:28 GMT
  • Disposition: Resolved — DMN 1.2
  • Disposition Summary:

    Expanding the definition of unary test to allow boolean literal expressions

    Change section 10.3.1.2 Grammar Rules (for FEEL) as follows:
    Add a grammar rule 17d, a 'generalized unary test' as a 4th option for 'unary tests'.
    Define 'generalized unary test' in a new grammar rule: generalized unary test = literal expression
    In the Semantics section (probably in 10.3.2.8) add:
    The name '?' refers to the value of the corresponding input expression, and add another grammar rule (not a syntactic one) that restricts the generalized unary test to a Boolean result:

    grammar rule 17.d: FEEL(t')=true, where t' is t with every occurrence of the symbol ? in t substituted with e.

    Will require some occurrences of 'unarytests' and 'unary tests' in the spec to be changed to 'generalized unary tests'. Will need examples showing 'generalized unary test' in decision tables, probably in the decision table chapter.

    Examples:
    1. The Input Expression Order.Total that evaluates to 5, combined with the Input Entry “>0” will result in the evaluation of “5>0” and a “true” result.

    2. The Input Expression Order.Total that evaluates to 5, combined with the Input Entry “?>0” will result in the evaluation of “5>0” and a “true” result.

    3. The Input Expression 'List of Codes' that evaluates to [“red”, “blue”], combined with the Input Entry “list contains (?,”green”)” will evaluate as “list contains ([“red”, “blue”],”green”) resulting in “false”.

    4. The Input Expression Tax.Threshold that evaluates to 100000 combined with the Input Entry “?>gross pay*0.7” will result in the evaluation of “100000>gross pay*0.7” where gross pay is another Information Requirement.

  • Updated: Wed, 3 Oct 2018 14:17 GMT
  • Attachments: