Bug 1330882

Summary: Expression with embedded double-quotes can't be saved in task assignments UI
Product: [Retired] JBoss BPMS Platform 6 Reporter: Suresh Pritmani <spritman>
Component: jBPM DesignerAssignee: Tihomir Surdilovic <tsurdilo>
Status: CLOSED EOL QA Contact: Kirill Gaevskii <kgaevski>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: rrajasek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 19:10:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.