Bug 1330882 - Expression with embedded double-quotes can't be saved in task assignments UI
Summary: Expression with embedded double-quotes can't be saved in task assignments UI
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: jBPM Designer
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Tihomir Surdilovic
QA Contact: Kirill Gaevskii
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-27 08:41 UTC by Suresh Pritmani
Modified: 2020-03-27 19:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 19:10:06 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Suresh Pritmani 2016-04-27 08:41:06 UTC
Description of problem:

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...
{code}externalProperties.get("PATH_TO_SERVICE"){code}
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.

This is similar bug filed on community.

https://issues.jboss.org/browse/JBPM-5064

Version-Release number of selected component (if applicable):
BPM Suite 6.2.0

How reproducible:


Steps to Reproduce:
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.

Actual results:

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 results:

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.


Note You need to log in before you can comment on or make changes to this bug.