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

Expression with embedded double-quotes can't be saved in task assignments UI

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • jBPM 6.3.0.Final
    • Workbench
    • NEW
    • NEW
    • Hide
      1. Create a business process in workbench (I'm using business-central)
      2. Add a task that takes assignments (e.g. email, SendTask, custom, etc.)
      3. In the task properties, open the Assignments editor
      4. Add a data input assignment with any name, data type = "String", and select "Constant" for source
      5. Enter an expression with embedded double-quotes in the input text box for the source, e.g.
        #{String.valueOf("123")}
        
      6. Click save. Nothing happens. Re-edit the assignment constant, replacing it with something that doesn't have double-quotes, e.g. String.class.getName(), and then you can save it.
      Show
      Create a business process in workbench (I'm using business-central) Add a task that takes assignments (e.g. email, SendTask, custom, etc.) In the task properties, open the Assignments editor Add a data input assignment with any name, data type = "String", and select "Constant" for source Enter an expression with embedded double-quotes in the input text box for the source, e.g. #{ String .valueOf( "123" )} Click save. Nothing happens. Re-edit the assignment constant, replacing it with something that doesn't have double-quotes, e.g. String.class.getName(), and then you can save it.

      I'm using expressions (e.g. #{object.method()}) in my task data input/output assignments, especially for email and custom tasks. In some cases, I need to use double-quotes as part of the expression, for example when I have process variable that's a map and I just want to pass one value...

      externalProperties.get("PATH_TO_SERVICE")

      When I try to add any expression to the assignments editor that has double-quotes, and then click save, nothing happens. There's no error message, it just doesn't do anything. If I remove the double-quotes, it saves fine.

      I can escape the double-quotes with backslashes, and it works. But when I re-open the assignments editor the backslashes are gone, and I have to re-edit each such expression whether I want to or not to get it to save.

      Expected behavior: the editor should allow embedded quotes in expressions to be saved without having to be escaped. This is necessary to allow data input assignments to be made from maps e.g. (myExternalProperties.get("PATH_TO_SERVICE")).

      If that's not possible, then the editor should escape any saved double-quotes when it re-opens.

            kverlaen@redhat.com Kris Verlaenen
            rhit_lapeters Lance Peterson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: