Description of problem: Model used: declare fact f1: String f2: String end Enumeration used: 'fact.f1' : ['a','b'] 'fact.f2[f1=a]' : ['a1', 'a2'] 'fact.f2[f1=b]' : ['b1', 'b2'] After playing a bit with Test Scenarios, I found out that: If you insert a given fact (see above for the model and enumeration), - any enum value you want has to be first selected, otherwise, Guvnor thinks it's null (this shows in the Audit log after clicking Show events). This means, for the "default" value in the dropdown, you have to select something else and then select the default again. You have to confirm your choice by saving the test scenario or running it. - the depending enum value works the same as above. The dropdown list with the correct values is shown after "correctly" selecting and confirming the first value (the one it depends on). Using Facts with Enumerations the above mentioned way makes it work, the right rules are fired. Version-Release number of selected component (if applicable): BRMS 5.2.0 ER5/CR1
Fixed.
Update status to ON_QA. Please verify them against ER6.
Great work Michael, thanks. But I still need a minor fix for this issue - basically it all works, except for the case when you decide to use a different value for the first field, the one depended upon, if you already have the second field value selected. In such a case, the second field retains it's old values, until you run the scenario or save it. Let's say I add the field f1 and choose value b. Then I add the field f2 - there's b1 selected. Then I change my mind and for the f1 field, I select value a. For the field f2, there's still b1 selected and b1 and b2 as options. It already works with business rules, so I hope it won't be too hard to fix.
The fix consists out of 2 parts. This is part 1 on master: https://github.com/droolsjbpm/guvnor/commit/36c9395e4572ce98a73a4efdf6f116e78990d863
Note: This is not flagged as a blocker. Do you want it for 5.3.x release?
I think we don't need it for 5.3.x - it can be worked around and the original issue was already "reduced". Better to dedicate the time to blockers now. Thanks guys.
OK. I will *NOT* work on this BZ for 5.3.x unless told otherwise. I will devel_ack "-" in accordance with comment #6.
This has been completed on the master and *5.4.x* branch.0dfe4f289d571a2bf6ce532f2a81af50e4bf29ff
Excuse the (accidentally pasted) commit SHA on the end of comment #8 :)
This has been fixed in community release 5.4.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: When using enumerations with facts, the correct enumeration is not always selected. If the enumeration is the default value and it is not selected, by first selecting another value and then selecting the default value, Null is used in its place. The workaround is to select another value.
I'm sorry to say, I still see the bug from comment 3 - perhaps the fix has not been picked up? Julian, Michael, could you, please, look at it again? Just for info, I'm using standalone distro for testing.
Hi, according to comment #8 the fix for #3 was only made to master and 5.4.x :( I will look into back-porting the fix (https://github.com/droolsjbpm/guvnor/commit/1be140a05f19325b02b5a607c22d7e19a39d8ea3).. bit busy today though.
Back-ported to 5.3.1. Original commits:- https://github.com/droolsjbpm/guvnor/commit/36c9395e4572ce98a73a4efdf6f116e78990d863 https://github.com/droolsjbpm/guvnor/commit/1be140a05f19325b02b5a607c22d7e19a39d8ea3 Back-port commit:- https://github.com/droolsjbpm/guvnor/commit/ba1c1d7805178f5f4f91b43a473c65c246d5f6ce
Works like a charm, thank you.
Hi Michael, If you'd like this issue to be included in the release notes, please let me know how the issues was resolved. Thanks Lee
(In reply to comment #17) > Hi Michael, > > If you'd like this issue to be included in the release notes, please let me > know how the issues was resolved. > > Thanks > Lee Hi Lee, The QA screen did not have support for dependent enums. The fix was to add support for dependent enums. Cheers, Mike
Thanks Mike.