Hide Forgot
Description of problem: Using mvel dialect, it should be possible to have RHS with $fact.setItems(["item1", "item2"]); if fact type has "List<String> items;" field. I can input the value ["item1, "item2"] in the text input for field items and the rule validates successfully. When I save the rule, close it and reopen the text input is empty. Version-Release number of selected component (if applicable): ER5 How reproducible: - Steps to Reproduce: 1. add java.util.List to Project Imports 2. in Data Modeler, create new object type MyFact with field items of type java.util.List, save the model 3. create new Guided Rule 4. add $fact : MyFact() to LHS 5. modify $fact in RHS, set items to ["item1", "item2"] 6. save the rule, check DRL source, validate it (ignore raw types warnings), close it 7. reopen the rule Actual results: The text input for items field of $fact is empty. DRL source is different from what has been saved, too. Expected results: After reopening, the rule should look exactly like it was saved before it was closed. Additional info: When fixing, please take maps and arrays into account too. http://mvel.codehaus.org/Inline+List,+Maps+and+Arrays
Unit test for this. https://github.com/droolsjbpm/drools/commit/c9d4924dc
Fixed by https://github.com/droolsjbpm/drools/commit/4f9e49d18201f803e806109234ebd34b8876061c
Verified in BPMS 6.0.0.ER7. After reopen, free form drls are transfered into readable statements and the contents for List variables are filled. The source code remains the same.