DMN 1.6 RTF Avatar
  1. OMG Issue

DMN16 — FEEL descendants operator

  • Key: DMN16-72
  • Status: open  
  • Source: Bruce Silver Associates ( Mr. Bruce Silver)
  • Summary:

    In some decision models, the input data must conform to an industry-standard xml schema in which elements of interest are many levels deep. Converting such a schema directly to a FEEL item definition requires very long path references. The xpath language has a descendants operator that significantly shortens the path expression. I propose a similar operator (or, less ideally, a function) for FEEL.

    An example is MISMO from the Mortgage Bankers Association. In home appraisals, one item of interest is the Appraiser. To reference the Appraiser from the FEEL item definition generated from the xsd requires this:
    MESSAGE.DOCUMENT_SETS.DOCUMENT_SET.DOCUMENTS.DOCUMENT.DEAL_SETS.DEAL_SET.DEALS.DEAL.SERVICES.SERVICE.VALUATION.VALUATION_RESPONSE.VALUATION_ANALYSES.VALUATION_ANALYSIS.PARTIES.PARTY[ROLES.ROLE.ROLE_DETAIL.PartyRoleType="Appraiser"][1]

    In xpath, omitting namespace prefixes, the descendants operator // simplifies this considerably:
    MESSAGE//PARTY[.//PartyRoleType='Appraiser']

    If // were used as a FEEL descendants operator, you would need only
    MESSAGE//PARTY//PartyRoleType="Appraiser"[1]

    To get the Appraiser's name, instead of
    MESSAGE.DOCUMENT_SETS.DOCUMENT_SET.DOCUMENTS.DOCUMENT.DEAL_SETS.DEAL_SET.DEALS.DEAL.SERVICES.SERVICE.VALUATION.VALUATION_RESPONSE.VALUATION_ANALYSES.VALUATION_ANALYSIS.PARTIES.PARTY[ROLES.ROLE.ROLE_DETAIL.PartyRoleType="Appraiser"].INDIVIDUAL.NAME[1]

    you would need only

    MESSAGE//PARTY//PartyRoleType="Appraiser"//NAME[1]

  • Reported: DMN 1.4b1 — Tue, 14 Mar 2023 19:38 GMT
  • Updated: Wed, 17 Jan 2024 00:32 GMT