Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-5624

If an expression doesn't start with '${' it is treated as a literal

    Details

    • Title Keywords:
      expression language composite

      Description

      When an expression starts with ${ it is evaluated with juel, but if it doesn't start that way, it appears not to evaluate it with juel.

      For example, 'the result is $

      {result}

      ' is output literally, with no evaluation.

      The UEL documentation calls such an expression a composite expression.

        Activity

        Hide
        meyer Daniel Meyer added a comment -

        Interesting. This whould need to be fixed in all the places where the code attempts to detect whether a provided String is an expression.
        Would you be interested in contributing to this?

        Show
        meyer Daniel Meyer added a comment - Interesting. This whould need to be fixed in all the places where the code attempts to detect whether a provided String is an expression. Would you be interested in contributing to this?
        Hide
        hans.huebner@lambdawerk.com Hans Hübner added a comment -

        When will this bug be fixed?

        Why does the code need to detect whether a string is an expression? If it contains no JUEL constructs, it will be returned as-is, so "detecting" should be left to the JUEL evaluator rather than trying to replicate that functionality in the Camunda engine.

        Show
        hans.huebner@lambdawerk.com Hans Hübner added a comment - When will this bug be fixed? Why does the code need to detect whether a string is an expression? If it contains no JUEL constructs, it will be returned as-is, so "detecting" should be left to the JUEL evaluator rather than trying to replicate that functionality in the Camunda engine.
        Hide
        meyer Daniel Meyer added a comment -

        Hi Hans Hübner are you interested in contributing a solution?

        Show
        meyer Daniel Meyer added a comment - Hi Hans Hübner are you interested in contributing a solution?
        Hide
        hans.huebner@lambdawerk.com Hans Hübner added a comment -

        Are you really asking us to fix a bug in the software that we've licensed from you? I mean, I'm all for open source, but we're paying you for support, so this is not the kind of reply that I was expecting.

        Show
        hans.huebner@lambdawerk.com Hans Hübner added a comment - Are you really asking us to fix a bug in the software that we've licensed from you? I mean, I'm all for open source, but we're paying you for support, so this is not the kind of reply that I was expecting.
        Hide
        meyer Daniel Meyer added a comment - - edited

        Hi Hans,

        It seemed like you had an idea of how to fix this issue that is why I asked.

        If you comment on a community issue you will be treated in the same way as any other community user. We are not checking whether you are a support customer or not. If you want to raise a support case you can open a support case and reference this issue.

        Sorry for the inconvenience.

        Best,
        Daniel

        Show
        meyer Daniel Meyer added a comment - - edited Hi Hans, It seemed like you had an idea of how to fix this issue that is why I asked. If you comment on a community issue you will be treated in the same way as any other community user. We are not checking whether you are a support customer or not. If you want to raise a support case you can open a support case and reference this issue. Sorry for the inconvenience. Best, Daniel
        Hide
        hans.huebner@lambdawerk.com Hans Hübner added a comment -

        Daniel,

        maybe you should think about how you can recognize your paying enterprise customers.

        Sorry for the inconvenience.
        -Hans

        Show
        hans.huebner@lambdawerk.com Hans Hübner added a comment - Daniel, maybe you should think about how you can recognize your paying enterprise customers. Sorry for the inconvenience. -Hans
        Hide
        johannes.heinemann Johannes Heinemann added a comment - - edited

        Hi,

        the bug has now been fixed most cases. However, there are parameter where it is not possible to allow composite expressions. These cases are:

        • camunda:jobPriority/camunda:taskPriority: Those parameters are always evaluated to an integer. On the contrary, are composite expressions always evaluated to Strings. For example, If you would write a composite expression like jobPriority = "1+$ {'1'}

          instead of setting the number 2 you would set the string "1+1".

        • Scripts: In script languages like groovy it is also possible to use "${". Those scripts would then always be evaluated to composite expression. For instance, in groovy you can write the following line:
          text = "Your account shows currently a balance of $ {account - minus}

          If you write this in an inline script then the whole line would be interpreted as an expression instead of a groovy script.

        • config parameter in form field validation: As the leading "#{" or "${" is used to distinguish between if a class name or bean was stated.

        Best,
        Johannes

        Show
        johannes.heinemann Johannes Heinemann added a comment - - edited Hi, the bug has now been fixed most cases. However, there are parameter where it is not possible to allow composite expressions. These cases are: camunda:jobPriority/camunda:taskPriority: Those parameters are always evaluated to an integer. On the contrary, are composite expressions always evaluated to Strings. For example, If you would write a composite expression like jobPriority = "1+$ {'1'} instead of setting the number 2 you would set the string "1+1". Scripts: In script languages like groovy it is also possible to use "${". Those scripts would then always be evaluated to composite expression. For instance, in groovy you can write the following line: text = "Your account shows currently a balance of $ {account - minus} If you write this in an inline script then the whole line would be interpreted as an expression instead of a groovy script. config parameter in form field validation: As the leading "#{" or "${" is used to distinguish between if a class name or bean was stated. Best, Johannes

          People

          • Assignee:
            roman.smirnov Smirnov Roman
            Reporter:
            neilgalarneau Neil Galarneau
          • Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development