Using Drools, is there any way to retrieve all the conditions from the business rules document (excel sheet used). To be more specific, please refer to the attachment (The contents are deliberately removed).
As per the attachment, we have several conditions like cond1, cond2, cond3 and actions. As far as i understand drools (have not worked before), based on the condition, action is selected. i.e , if we select cond1, act1 is selected from "action2" column. Now, does drools provides any feature that lists out all the conditions, in some kind of a Set of strings etc.
The way I see this drools is, for a unique key, we get a row from excel. Initially, I was looking for a reverse lookup, i.e for a given action, find out the condition. This does not sound logical and makes sense, as we after all do not get the Key from value. So, then I'm thinking if there is any way, drools returns the list of all the conditions.
In our code, currently we load the rules from excel sheet as below
Now I suppose ruleBase has the collection of all rules, which I assume that each row from excel is stored as a row in ruleBase, atleast as per theory. Please correct me if I'm wrong here.
Now, if I wanted to load a object, say a Map<Condition, Action> from this ruleBase. Does Drools provide any api to handle such requirement? If Drools does not have anything already available, can we accomplish that from ruleBase object in other ways. Hope I made this question as clear as possible and I would appreciate, if someone could guide me here.
By the way, the version of drools being used is 4.0.7
subject: How to retrieve the collection of conditions using Drools ?