Bug 825977 - Designer: Editor for Data Assigments generates invalid code
Designer: Editor for Data Assigments generates invalid code
Status: ASSIGNED
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRM (Guvnor) (Show other bugs)
BRMS 5.3.0.GA
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tihomir Surdilovic
Sona Mala
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-29 04:55 EDT by Sona Mala
Modified: 2012-08-30 10:53 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Editor screenshot (73.52 KB, image/png)
2012-05-29 09:48 EDT, Sona Mala
no flags Details

  None (edit)
Description Sona Mala 2012-05-29 04:55:54 EDT
Description of problem:
Editor for Data Assigments generates invalid code. When I use Editor for Parameter Mapping, I am not able to save process. When I use just input field and use same code which is used in http://vimeo.com/26126678 (in 7:38), I am able to save process.

Version-Release number of selected component (if applicable):
BRMS-5.3.0 ER8

How reproducible:
Every time

Steps to Reproduce:
1. Start server (default settings)
2. Open Guvnor
3. Create new process
4. Define simple process (Start -> Service Task (Email) -> End)
5. Set process variable (requestEmail, medicineName)
6. Open properties for Service Task
    - set Assigments (text mode): Body=Hi,medicineName->Subject,requestEmail->To,From=sjamboro@redhat.com
    - open Editor (remember setting)
7. Save
8. Open properties for Service Task
    - set Assigments to idle (text mode):Body=,Subject=,To=,From=
    - open Editor and set Editor same like it was in step #6
9. Save

  
Actual results:
I get alert "Validate your process before saving, and view server logs to see error details."
and in Assigments is: Body=HI,Subject->medicineName,To->reqEmail,From=sjamboro@redhat.com

Expected results:
In Assigments: Body=Hi,medicineName->Subject,requestEmail->To,From=sjamboro@redhat.com
And save process without alert.

Additional info:
Comment 2 Tihomir Surdilovic 2012-05-29 09:36:11 EDT
I am unable to reproduce this - can you do it by using the Assignments Editor instead of typing in the string directly into the text input? Typically all of our users would use the Assignments Editor to create assignments for their tasks.
Comment 3 Sona Mala 2012-05-29 09:47:44 EDT
Set Assigments Editor like is on screenshot.

Process Variable: requestEmail, medicineName
ServiceTask: Email
Comment 4 Sona Mala 2012-05-29 09:48:13 EDT
Created attachment 587416 [details]
Editor screenshot
Comment 5 Sona Mala 2012-05-29 09:54:00 EDT
Problem is that after I click button "OK" in Editor and look inside Assigments input, I can see invalid code: TaskName=Email,To->requestEmail,From=,Subject->medicineName


instead of:
TaskName=Email,requestEmail->To,From=,medicineName->Subject

Designer version:
2.2.0-DEV
Comment 6 Tihomir Surdilovic 2012-05-29 10:07:23 EDT
I think I understand the problem now - the editor currently is not that smart to know to switch your left-hand side and right-hand side assignments. if you want to set mappings, you would need to switch the order, for example in the editor map medicineName process var to the From data input and not From data input to the medicineName process var. The order here matters, and the editor is just doing what you tell him to do :) Smarter mapping should be added, but that's for the future I think.
Comment 7 Sona Mala 2012-05-29 10:20:06 EDT
Is there any possibility to choose if I want to write var1->var2 or var2->var1?
Comment 8 Tihomir Surdilovic 2012-05-29 10:22:25 EDT
Currently no and you have to set the "From Object" and "To Object" to reflect exactly what you want. Maybe we could add a "switch order" button there but again this could introduce more bugs for BRMS 5.3, that's why I am inclined to see this done after the product release, but please keep this bug open and write your great ideas on how we can improve this as it really should be improved :)
Comment 9 Sona Mala 2012-05-29 10:32:12 EDT
Ok ... my mistake I saw that variable was at left side and I did not notice Names of Columns. I did not find anythink in documentation about it.
Comment 10 Sona Mala 2012-05-30 04:39:32 EDT
It will be wonderfull, if I find this in documentation.

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