Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-8900

MVEL expressions with data objects in multiinstance completion condition

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 7.35.0.Final
    • 7.29.0.Final
    • Runtime Engine
    • None
    • NEW
    • NEW
    • Hide

      Add a MI completion condition like this
      ($ in outputcollection if $.reasonCode == 'deny').size() > 0;

      DataObject containg that reasonCode attribute has to be included also in the definition of the project.

      Show
      Add a MI completion condition like this ($ in outputcollection if $.reasonCode == 'deny').size() > 0; DataObject containg that reasonCode attribute has to be included also in the definition of the project.

      Community issue:

      This exception is thrown
      Caused by: java.lang.IllegalArgumentException: Could not evaluate completion condition ($ in outputcollection if $.reasonCode == 'deny').size() > 0;

      when using that MVEL expression (including access to data object) in multiinstance completion condition.

      It seems like the root cause is this:

      Caused by: java.lang.IllegalArgumentException: VariableScopes can only resolve variable names: null

      Not sure if it can be solved at MVEL side, but at least JBPM can protect "resolveContext" method when receiving a null param, returning null instead of throwing the exception.

      https://groups.google.com/forum/#!topic/jbpm-usage/Z4KuKX9q7b4

              elguardian@gmail.com Enrique González Martínez (Inactive)
              gmunozfe@redhat.com Gonzalo Muñoz Fernández
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: