Red Hat Bugzilla – Bug 825977
Designer: Editor for Data Assigments generates invalid code
Last modified: 2012-08-30 10:53:53 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):
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,Fromfirstname.lastname@example.org
- open Editor (remember setting)
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
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,Fromemail@example.com
In Assigments: Body=Hi,medicineName->Subject,requestEmail->To,Fromfirstname.lastname@example.org
And save process without alert.
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.
Set Assigments Editor like is on screenshot.
Process Variable: requestEmail, medicineName
Created attachment 587416 [details]
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
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.
Is there any possibility to choose if I want to write var1->var2 or var2->var1?
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 :)
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.
It will be wonderfull, if I find this in documentation.