Re: [rules-users] Drools server and knowledge agent functionality

2013-10-30 Thread scarlettxu
Hi Esteban, Esteban wrote > There are, though, some caveats: > >- If you are deploying drools-server in tomcat, then you can't use >classpath resources in the kagent. I have reported this problem today. >- drools-server doesn't start ResourceChangeNotifierService >nor ResourceCha

[rules-users] KIE Workbench data model import

2013-10-30 Thread rockford
Hello, I am trying to import a data model from inside the Drools 6 KIE Workbench. (I have used this functionality in the Guvnor.) So far I have: - Uploaded a jar containing a data model to the repository from the "Asset repository" editor. Now I am trying to see where to make the data model visi

Re: [rules-users] KIE Workbench data model import

2013-10-30 Thread Michael Anstis
Sure, make a new project, go to the Project Editor and add it as a dependency. On 30 October 2013 13:43, rockford wrote: > Hello, > > I am trying to import a data model from inside the Drools 6 KIE Workbench. > (I have used this functionality in the Guvnor.) > > So far I have: > - Uploaded a ja

[rules-users] How to use global hashmap in drools

2013-10-30 Thread bbarani
I am trying to use a global hashmap in drools but not sure how to create a global hashmap. I have a very simple function that counts the number of values passed hence I would need a global hash map to increment the count. The below function initializes the map every time the function is called, I

Re: [rules-users] How to use global hashmap in drools

2013-10-30 Thread rjr201
Hi, you need to be clearer what it is you are trying to do. That function is very bizarre. It's called *get *value, but you pass it two values and then *put *them into a hashmap. You also say it's going to return a string, but then return an integer. The size of that hash map is always going to b

Re: [rules-users] How to use global hashmap in drools

2013-10-30 Thread bbarani
Sorry for the confusion. I am just trying to store the value in to a global hashmap (more like a counter) and get back the total size of the hashmap after all the data is processed. function setValue(String a, String b){ hashValue.put(a,b); } function int getValue(){ return hashValue.s

Re: [rules-users] How to use global hashmap in drools

2013-10-30 Thread Wolfgang Laun
If all what you need is the number of distinct key values, a Set would be sufficient. Wrapping the access to hashMap into a function doesn't really have any merits - you can use hashMap.put(a,b); and hashMap.size() directly. If you do want to use a global in a DRL function, you'll have to pass it

Re: [rules-users] How to use global hashmap in drools

2013-10-30 Thread bbarani
Sorry, I think I didn't explain my problem correctly. Consider I have to process 2 records. Each record will pass through the rule in drl file. Name Count a 100 b 200 a 100 Now I want to store the above values in a global hash map as below (When I process the 3rd document). I

[rules-users] Drools Decision Table with no rules matches blank rule

2013-10-30 Thread srtatz
I have an xls file with the appropriate header lines to make the xls a Drools Decision Table that I provide to my users. I validate the content/data they enter, but do allow it to be "blank", that is, no user data, just the Drools Decision Table key words, conditions, actions, etc. When using the