[rules-users] WorkingMemoryListener & Declared Types

2013-08-07 Thread droolster
Hello, Please can the community help me. I am attaching a WorkingMemoryListener to a session. In my DRL file, I have a number of declared types for which I want to "watch" when the process is running. How can I implement a "toString()" method in the DRL file for a declared type? I have detailed t

Re: [rules-users] WorkingMemoryListener & Declared Types

2013-08-07 Thread Wolfgang Laun
On 07/08/2013, droolster wrote: > Hello, > > Please can the community help me. > > I am attaching a WorkingMemoryListener to a session. In my DRL file, I have > a number of declared types for which I want to "watch" when the process is > running. How can I implement a "toString()" method in the DR

Re: [rules-users] WorkingMemoryListener & Declared Types

2013-08-07 Thread droolster
Hi, I haven't put Foo in my Java code as it is a transient type which I need to the rule processing and not really part of my ontology model. Anything which isn't part of ontology model but which I need to do the rule processing, I put those types in my DRL file. I'll explain what I am trying to

Re: [rules-users] WorkingMemoryListener & Declared Types

2013-08-07 Thread Stephen Masters
Add commons beanutils to your project: commons-beanutils commons-beanutils 1.8.3 Then all you need is a class with a static method something like this: public static String objectDetails

Re: [rules-users] WorkingMemoryListener & Declared Types

2013-08-07 Thread Wolfgang Laun
On 07/08/2013, droolster wrote: > Hi, > > I haven't put Foo in my Java code as it is a transient type which I need to > the rule processing and not really part of my ontology model. Anything > which > isn't part of ontology model but which I need to do the rule processing, I > put those types in m

Re: [rules-users] WorkingMemoryListener & Declared Types

2013-08-07 Thread Stephen Masters
I just noticed your explanation of what you're trying to do. You might find these handy: https://github.com/gratiartis/scattercode-drools-scenarios/blob/master/src/main/java/uk/co/scattercode/beans/BeanMatcher.java https://github.com/gratiartis/scattercode-drools-scenarios/blob/master/src/main/j

Re: [rules-users] WorkingMemoryListener & Declared Types

2013-08-07 Thread Wolfgang Laun
Nice, but is the result better than the default toString() that's doing much the same thing? -W On 07/08/2013, Stephen Masters wrote: > Add commons beanutils to your project: > > > commons-beanutils > commons-beanutils >

Re: [rules-users] WorkingMemoryListener & Declared Types

2013-08-07 Thread Stephen Masters
It's very similar to what Drools provides by default for declared types. However, it provides the same result for POJO facts and declared types. And it works for Java classes which don't have a toString() method. I also have a slightly tweaked version somewhere which outputs based on property na

Re: [rules-users] WorkingMemoryListener & Declared Types

2013-08-09 Thread droolster
Thanks! I will use your helper classes. -- View this message in context: http://drools.46999.n3.nabble.com/WorkingMemoryListener-Declared-Types-tp4025391p4025435.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-user