-
Bug
-
Resolution: Done
-
Critical
-
6.0.1
-
None
Description of problem:
Guided rule editor changes an expression from "list.size() == 0" to "list.size == 0" when an user reopens this rule. Such expression is not valid.
Version-Release number of selected component (if applicable):
6.0.1 ER2 BPMS
How reproducible:
Use array of facts which was created in Data Modeler. Number[0..N] works fine.
Steps to Reproduce:
1. create new project (org.test:testProject:1.0)
2. create fact "FactA" in data modeler with filed "name" (select type String)
2. create fact "Fact" in data modeler
3. create field "list" in "Fact" (select type org.test.testproject.FactA [0..N])
4. create guided rule "test"
a] add condition for "Fact"
b] choose Expression editor
c] select field "list"
d] select method size()
e] select operator "equal to"
f] use literal value "0"
5. validate rule
6. save rule
7. close rule
8. open rule
9. validate rule
Actual results:
Step 4d: editor shows "size()", source code is "Fact( list.size() == 0 )"
Step 5: validation is successful
Step 8: editor shows "size", source code is "Fact( list.size == 0 )"
Step 9: validation fails with alert "Unable to Analyse Expression list.size == 0: [Error: Comparison operation requires compatible types. Found class org.test.testproject.FactA and class java.lang.Integer] [Near :
] ^"
Expected results:
Step 8 returns same result as step 4d.
Step 9: validation is successful
Additional info:
Do not forget import "java.util.List" into project and rule. Step 8 returns Error message with NPE.
- is related to
-
RHBRMS-1062 Guided rule editor fails to open rules that use fields from fields whose type is not imported
- Closed
- relates to
-
RHBRMS-1062 Guided rule editor fails to open rules that use fields from fields whose type is not imported
- Closed