Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-7139

FEEL context functions `get value` and `get entries` should support Java POJO as argument

    XMLWordPrintable

Details

    • 2022 Week 35-37 (from Aug 29)
    • NEW
    • NEW
    • ---
    • ---

    Description

      Right now FEEL context functions `get value` and `get entries` support only Java Maps in context argument. An error is thrown if Java POJO is passed as parameter.

      https://github.com/kiegroup/drools/blob/main/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/functions/GetValueFunction.java#L34

      Per Drools documentation a user-defined Java object is a valid context so it should be supported in all FEEL context functions.

      For example the `context put` function allows the use Java POJO as context argument:
      https://github.com/kiegroup/drools/blob/main/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/functions/extended/ContextPutFunction.java#L98

      Attachments

        Activity

          People

            mmortari@redhat.com Matteo Mortari
            vladimir.piyanov@gmail.com Vladimir Piyanov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: