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

        neilgalarneau Neil Galarneau created issue -
        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
        matthijs.burke Matthijs Burke made changes -
        Field Original Value New Value
        Link This issue is depended on by SUPPORT-2858 [ SUPPORT-2858 ]
        michael.schoettes Michael Schoettes made changes -
        Labels SUPPORT
        michael.schoettes Michael Schoettes made changes -
        Fix Version/s 7.4.x [ 14196 ]
        Fix Version/s 7.5.x [ 14200 ]
        Fix Version/s 7.6.x [ 14597 ]
        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
        michael.schoettes Michael Schoettes made changes -
        Fix Version/s 7.7.x [ 14699 ]
        michael.schoettes Michael Schoettes made changes -
        Assignee Johannes Heinemann [ johannes.heinemann ]
        michael.schoettes Michael Schoettes made changes -
        Fix Version/s 7.7.0 [ 14607 ]
        Fix Version/s 7.7.x [ 14699 ]
        michael.schoettes Michael Schoettes made changes -
        Fix Version/s 7.5.8 [ 14701 ]
        Fix Version/s 7.5.x [ 14200 ]
        michael.schoettes Michael Schoettes made changes -
        Fix Version/s 7.5.x [ 14200 ]
        Fix Version/s 7.5.8 [ 14701 ]
        michael.schoettes Michael Schoettes made changes -
        Fix Version/s 7.6.2 [ 14700 ]
        Fix Version/s 7.6.x [ 14597 ]
        meyer Daniel Meyer made changes -
        Assignee Johannes Heinemann [ johannes.heinemann ] Christopher Zell [ christopher.zell ]
        meyer Daniel Meyer made changes -
        Assignee Christopher Zell [ christopher.zell ] Johannes Heinemann [ johannes.heinemann ]
        johannes.heinemann Johannes Heinemann made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        johannes.heinemann Johannes Heinemann made changes -
        Status In Progress [ 3 ] Open [ 1 ]
        johannes.heinemann Johannes Heinemann made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        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
        johannes.heinemann Johannes Heinemann made changes -
        Fix Version/s 7.5.8 [ 14701 ]
        Fix Version/s 7.4.12 [ 14702 ]
        Fix Version/s 7.4.x [ 14196 ]
        Fix Version/s 7.5.x [ 14200 ]
        johannes.heinemann Johannes Heinemann made changes -
        Fix Version/s 7.4.12 [ 14702 ]
        johannes.heinemann Johannes Heinemann made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Original Estimate 0 minutes [ 0 ]
        Remaining Estimate 0 minutes [ 0 ]
        Assignee Johannes Heinemann [ johannes.heinemann ] Smirnov Roman [ roman.smirnov ]
        Resolution Fixed [ 1 ]
        roman.smirnov Smirnov Roman made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Assignee Smirnov Roman [ roman.smirnov ] Johannes Heinemann [ johannes.heinemann ]
        johannes.heinemann Johannes Heinemann made changes -
        Status Reopened [ 4 ] In Progress [ 3 ]
        johannes.heinemann Johannes Heinemann made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Assignee Johannes Heinemann [ johannes.heinemann ] Smirnov Roman [ roman.smirnov ]
        Resolution Fixed [ 1 ]
        roman.smirnov Smirnov Roman made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        meyer Daniel Meyer made changes -
        Fix Version/s 7.7.0-alpha1 [ 14792 ]

          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