I've just created 2 class like you show me with some changes to fit and test all (timestamp are long in fact, i have put int, double and string as well)In the second class you don't need the attributes as members, because Drools uses get / set methods to deduce them, and anyway you never use them as they are stored in the map.
Then i have imported this in Guvnor.That is non-sense. Jars are not linked to a category but to a package.
I have made 2 categories. I have put the model (jar) in the 2 categories.
I have created 2 simple rules playing with the attributes id, timestamp...With Guided editor ?
Its a way.
1) For the condition Map $m1 different then Map $m2. I suppose i have to use the function define in MapPojo? I have to write it by hand using "free from drl" : eval($m1 != $m2) ? or is there a better way?
Same. Add the test directly in the condition.
The same for testing that $m1 timestamp (Long) is befor $m2. I have to write it by hand : eval($m1.isBefore($m2))? So they have to know it exist a method isBefore if not said by the gui?
It is MapTest1, because this is the class used .... and drools knows it because it uses it ... You don't use Map directly anymore
2) In the code It's written MapTest1(..) instead of Map(...) so i suppose drools has to do it with the precompiled package .pkg to know about the MapPojo and MapTest1.. If i take only the .drl, drools won't know about class MapTest1.
Yes you can !
Yes i can set a category to each of my rule.
YesDo you mean create 4 categories (cat1, cat2, cat3, cat4) and for rules of file1.drl, put them it cat1, for file2.drl, put them in cat2... ?
Choose between categories and first condition. Don't use bothSet a first condition in the rules?
You certainly can filter your KB afterwards, but this is not really an out-of-the-box function. To me you have two options. For both options, you have only one Guvnor package :Am i obliged to create a package per file and filter by category or is it possible to make a package with all and filtering when creating the knowledgeBase or something like that?