Re: [rules-users] Kie-spring Issues - Not able to autowire sessions

2014-08-20 Thread Stephen Masters
May be worth checking what class/interface your bean is. In the code that works, you are casting it to StatelessKieSession, but I suspect that the object which was injected was a KieSession. Steve On 19 Aug 2014, at 15:17, Ged Byrne wrote: > Hi Matt, > > This may be a problem with Spring r

Re: [rules-users] Mocking Guvnor

2014-08-08 Thread Stephen Masters
Possibly also worth pointing out that inserting a fact and executing a session do not connect to Guvnor anyway? Although, as Mike mentions, the simplest approach tends to be to create a service which wraps knowledge base access and mock that. Although you could also mock the session. Although,

Re: [rules-users] Drools Performance Analysis Required

2014-07-24 Thread Stephen Masters
Your specific rules have so much more impact on these stats than any of the factors you mention such as numbers of rules and facts. The number of rules by itself has very little impact on performance, except at start-up time. There are knowledge bases out there with > 100,000 rules, which achie

Re: [rules-users] How to change the Header color and Logo in Guvnor 5.3.3.Final?

2014-07-01 Thread Stephen Masters
If you explode the WAR, you should find an index.jsp and CSS. Modify them to your heart’s content. On 1 Jul 2014, at 11:26, LaKhI ReDdY!!! wrote: > Hi, > > I need to change the Header color(top header) and Logo in Guvnor 5.3.3.Final. > Any points on where and all i need to do changes?

Re: [rules-users] Drools 6 Junit Random Failures

2014-04-29 Thread Stephen Masters
Looks close enough to what I tend to do. It could be worth firing off something like the following to double-check that your knowledge base and working memory are as expected prior to each test. /** * Iterates through the facts currently in working memory, and logs their details.

Re: [rules-users] (Hot?) rules production deployment

2014-04-24 Thread Stephen Masters
Pretty much correct. re. 5 - It depends on what you mean by it becoming clear that a release is a bad one. I have tended to code up my own knowledge base reloads and check for errors, but I’m pretty sure that if your rules don’t compile, then neither the KnowledgeAgent nor the KieScanner will

Re: [rules-users] (Hot?) rules production deployment

2014-04-22 Thread Stephen Masters
If you want to hot-deploy rule changes, just take a look at the documentation on knowledge agents or KieScanner (v6). It’s also easy enough to code a knowledge base reload yourself. However, you say: Ideally we would like business users to add or modify rules in Production without risk

Re: [rules-users] Loading rules from the filesystem?

2014-04-16 Thread Stephen Masters
These test classes do that between them (with a bit of help from some others): https://github.com/gratiartis/qzr/blob/master/sctrcd-drools/src/test/java/com/sctrcd/drools/spring/DroolsSpringTest.java https://github.com/gratiartis/qzr/blob/master/sctrcd-drools/src/test/java/com/sctrcd/drools/sprin

Re: [rules-users] METADATA in Decision Tables

2014-04-08 Thread Stephen Masters
column should rely on value specified in differente > column. It is possible somehow? > > From: rules-users-boun...@lists.jboss.org > [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Stephen Masters > Sent: Tuesday, April 08, 2014 2:55 PM > To: Drools List > Subject:

Re: [rules-users] METADATA in Decision Tables

2014-04-08 Thread Stephen Masters
It’s not available at runtime. It seems to be there just to help you document things and search within Guvnor/Workbench. On 8 Apr 2014, at 12:28, Andrei Ermicioi wrote: > Can somebody point me on some article, tutorial, etc where will be describe > the work with METADATA from decision tables?

Re: [rules-users] how to deploy rules

2014-03-25 Thread Stephen Masters
Assuming that you’re sticking to 5.0, you’ll need to code it yourself. The simplest way I found was to create a web service, with an operation which destroys your current sessions and knowledge bases, and reinitialises them. You should be able to re-use whatever code you already have for initial

Re: [rules-users] Not able to detect how to correct ERR 102

2014-03-21 Thread Stephen Masters
Not sure whether you reformatted the DSL for the mailing list, but it’s worth pointing out that each phrase defined in the DSL needs to be on a single line. This may have changed in a newer version of Drools (my DSL runs in 5.3), but DSL hasn’t been given much attention for a while, so I suspect

Re: [rules-users] How to allow non-programmers/non-Drools programmers to define rules

2014-03-21 Thread Stephen Masters
DSL is essentially just templates which map phrases (which may look a bit like natural language) to DRL. DSLR is the actual rules and looks a bit like normal DRL, except that inside the ‘when’ and ‘then’ sections you tend to find phrases based on the DSL. This is the bit which could possibly be

Re: [rules-users] kie-sprind xsd for spring 4

2014-03-03 Thread Stephen Masters
@KBaseConfig(name=“kbase1”, packages=“my.domain.fld, my.domain.fld2" ) >> public static class kbase1Config { >> >> @KSessionConfig(name=“ksession1”, clockType=“pseudo”) >> private KieSession kieSession1; >> >> @KSessionConfig(name=“ksession2”, clockType

Re: [rules-users] kie-sprind xsd for spring 4

2014-03-01 Thread Stephen Masters
It definitely wouldn’t miss out on any Drools 6 functionality. It enables you to use everything that is available in 6.x because it give you direct access to the API. Steve On 28 Feb 2014, at 19:41, vinodkiran wrote: > Steve, > > Interesting approach. I am looking through your code. > > I

Re: [rules-users] kie-sprind xsd for spring 4

2014-03-01 Thread Stephen Masters
Probably … I don’t think it uses anything that is specific to Spring 4. Fairly sure it’s all valid for for most of 3.x. On 28 Feb 2014, at 18:22, mattmadhavan wrote: > Hi Stephen, > Thank you and I will review your code soon. > > My client is still at Spring 3.x and we are not moving to Spri

Re: [rules-users] kie-sprind xsd for spring 4

2014-02-28 Thread Stephen Masters
My tip would be to not use the Spring stuff provided as part of Drools. It has always targeted old versions of Spring that I don’t want to use. :) Just a little earlier today, I made the following repo public: https://github.com/gratiartis/qzr … which demonstrates a web application using

[rules-users] Spring and Drools

2014-02-28 Thread Stephen Masters
Hi folks, This may well be rather premature, but I have been knocking up a little example project to demo a web application built with Spring 4 and Drools 6. Notably, *not* using the Drools Spring componentry because I prefer to roll my own Spring components. It gives me a lot of freedom to mak

Re: [rules-users] real world examples wanted

2014-02-14 Thread Stephen Masters
What sort of thing are you looking for? Open source demos with source code? Proprietary applications? I have a few trivial examples of web applications with REST services in GitHub. Also, I have a few works in progress in private repos built around v6. Due to be de-privatised when I get them to

Re: [rules-users] Batch processing large volume of Same type Of Facts

2014-02-08 Thread Stephen Masters
Generally speaking, if you are seeing combinatorial explosions as a result of matching facts of the same type, then you should be looking to add constraints to your pattern matches to reduce them. It’s always possible that there are no additional constraints that you could apply to achieve this

Re: [rules-users] Batch processing large volume of Same type Of Facts

2014-02-07 Thread Stephen Masters
Depending on your rules, you should be able to insert large numbers of facts and then fire all rules. Note that it’s worth testing the optimal number to insert each time. I have previously found it faster to insert in batches, rather than hundreds. Partly because of the smaller memory footprint

Re: [rules-users] Clarification needed on Workbench

2014-02-05 Thread Stephen Masters
Re. Referencing EJBs and JPA form inside rules. Yes, you can do it. However, I have tended to find that it’s best to avoid it if possible. It’s much easier and less error prone, to manage that kind of thing from outside the rules engine. On 4 Feb 2014, at 17:06, John Manko wrote: > I need so

Re: [rules-users] Using both Drop Down(Enumeration) and Text Field for a field in guvnor

2014-01-13 Thread Stephen Masters
Ah … I was looking at the original request about being able to set a value using a text field or an enumeration. It would appear that’s no longer the topic. For examples like that, you might be better off using a DSL. That way you could have a nice phrase with a drop-down menu driven by your en

Re: [rules-users] Using both Drop Down(Enumeration) and Text Field for a field in guvnor

2014-01-13 Thread Stephen Masters
Of course, you could just create multiple get/set methods for an attribute. String myConstraint; getPredefinedConstraint() { return myConstraint; } setPredefinedConstraint(String predefinedConstraint) { this.myConstraint = predefinedConstraint; } getUnrestrictedConstraint() { return m

Re: [rules-users] Using Advanced Enumeration Concepts in guvnor

2014-01-08 Thread Stephen Masters
, Stephen Masters wrote: > The Maven Shade plugin is relatively simple to use. Below is the XML in my > pom.xml. Basically, it finds all of the jars which are required by your > project and bundles all of the classes (and other resources) from them into a > single big fat jar. Thi

Re: [rules-users] Using Advanced Enumeration Concepts in guvnor

2014-01-08 Thread Stephen Masters
The Maven Shade plugin is relatively simple to use. Below is the XML in my pom.xml. Basically, it finds all of the jars which are required by your project and bundles all of the classes (and other resources) from them into a single big fat jar. This means that keeping track of what you have adde

Re: [rules-users] Using Advanced Enumeration Concepts in guvnor

2014-01-07 Thread Stephen Masters
Basically, none of my enumeration methods were being called. It appeared to be a bug, which I raised in Jira. Mike Anstis tested it in 5.6 quite a while back (maybe a year ago), and whatever was wrong seems to have been fixed. If you want to try it, I’d recommend creating a minimal enumeration c

Re: [rules-users] Using Advanced Enumeration Concepts in guvnor

2014-01-07 Thread Stephen Masters
There may be better ways of doing it in newer versions of Guvnor, but the way I did it for for 5.3 made use of Spring. Unfortunately, this did not work in 5.5. Your code will need to do all of its database connectivity itself. Therefore it does need to include the DB connectivity jars. I ensured

Re: [rules-users] Is rule introspection available from the Drools API?

2014-01-07 Thread Stephen Masters
at is why I am trying to identify if it is possible to recive the rule >> metadata from Drools. At first I thought it could be available in a snap of >> a finger with some method calls, however now I am interested to see what is >> the effort to make it happen. >>

Re: [rules-users] Is rule introspection available from the Drools API?

2014-01-07 Thread Stephen Masters
It may also be worth explaining exactly what you aim to achieve through this and why. From what I have seen, most people who ask about introspecting the LHS of rules via the API, don’t actually need to do that. Steve On 7 Jan 2014, at 08:56, Wolfgang Laun wrote: > Hi, > > while you continue

Re: [rules-users] Running Feedback during drools run

2013-12-31 Thread Stephen Masters
fwiw … a couple of examples of event listeners: Rule activations: https://github.com/gratiartis/sctrcd-payment-validation-web/blob/master/src/main/java/com/sctrcd/drools/util/TrackingAgendaEventListener.java Fact insertions, modifications and retractions: https://github.com/gratiartis/sctrcd-paym

Re: [rules-users] Drools KB Object hierarchy Serilisation and Deserialisation thread safety issue

2013-12-18 Thread Stephen Masters
My experience switching a small project from 5.5.0.Final to 5.6.0.CR1 a few days ago, was that the only thing I had to do was change the Drools version number in my Maven pom.xml. It is a fairly simple project though, so it doesn’t exercise a great deal of the platform. On 18 Dec 2013, at 07

Re: [rules-users] Stateless session commands and ExecutionResults (5.5.0.Final)

2013-12-11 Thread Stephen Masters
s.runtime.CommandExecutor > has the generic >T execute(Command command) > > So you dig around in the code and may detect that ksession.execute( > cmd ) with cmd being made by newInsertElements(...) returns a > Collection. Mighty helpful. > > Fixing the Experts would h

Re: [rules-users] Stateless session commands and ExecutionResults (5.5.0.Final)

2013-12-11 Thread Stephen Masters
, Wolfgang Laun wrote: > I think you have to put your insert command into a list > List> cmds = new ArrayList(); > and pass this via batch execution > CommandFactory.newBatchExecution( cmds ) > > -W > > On 04/12/2013, Stephen Masters wrote: >> Hi folks, >&g

[rules-users] Stateless session commands and ExecutionResults (5.5.0.Final)

2013-12-04 Thread Stephen Masters
Hi folks, Can anyone explain how stateless session execution results should work? Working through the docs and tracing the code, it’s getting a bit confusing. Firstly, according to the user manual, one should be able to insert a list of facts as a Command, and get an instance of ExecutionResult

Re: [rules-users] permgen leak

2013-12-02 Thread Stephen Masters
When you say that it won’t help to increase the permgen size, are you saying that you have tried it and it didn’t work? What size does it reach, given an extra gig or 2? How much is it growing for each redeployment? Also from your explanation, it would appear that permgen is hitting 500 meg be

[rules-users] Fwd: [ljc] Call for Help - OSS projects

2013-11-29 Thread Stephen Masters
Hi Mark and the gang, Not sure whether you guys have seen this already (I’m guessing some of you must in in LJC), but if you’re looking for more London-based developers to get involved in the community side of Drools/KIE related projects, then it might be worth checking this out. Steve Begin

Re: [rules-users] Problem in writing rule and apply DSL

2013-11-13 Thread Stephen Masters
Of course, you can just bypass the built in “-“ processing. [condition][]There is a Person = $p: Person() [condition][]The person is aged over "{age}” =$age: Integer(this > {age}) from $person.age Of course that does require that you’re careful about writing the DSLR, so that you always bind a

Re: [rules-users] How to use type-safe enums in rule condition

2013-11-12 Thread Stephen Masters
That rule would work if you added a “name” property to Country. As a general tip on working with countries, always work with their ISO codes, not their names. http://en.wikipedia.org/wiki/ISO_3166-1 … ideally the 2-char codes, which are much more commonly used than the 3-char codes. Feel free

Re: [rules-users] Drools get value from stateful session

2013-11-10 Thread Stephen Masters
I don't understand "if a Java fact is being used". Sure, the > object filter's accept takes an object, so object.getClass() is the > typical way to go. But why the detour into strings? > StudentBean.class isn't much longer than the class name as a > st

Re: [rules-users] Drools get value from stateful session

2013-11-10 Thread Stephen Masters
Good point Wolfgang … it’s a bit of my code that I provided. I tend to use SimpleName to make it easy to find declared types as well as Java classes. But if a Java fact is being used, then getClass() is a much better idea. On 10 Nov 2013, at 07:27, Wolfgang Laun wrote: > Digging a bit into Ja

Re: [rules-users] Drools in a web application

2013-11-09 Thread Stephen Masters
s I don't > really have the idea of how can I do this ) > 4. Add to the model attribute the data that has been send by .drl file. > > Please correct me if I'm wrong. And please guide me a bit more to this. > > > Stephen Masters wrote >> Given that you’re using

Re: [rules-users] Drools in a web application

2013-11-09 Thread Stephen Masters
Given that you’re using Spring MVC, this might be a reasonable example: https://github.com/gratiartis/sctrcd-payment-validation-web It has examples of doing this for a simple validation, with a stateless session. i.e. Request goes to Spring MVC controller. Controller invokes a service be

Re: [rules-users] Where to cache KnowledgeAgent

2013-11-08 Thread Stephen Masters
I avoid knowledge agents myself. It doesn’t take a lot of code to build a knowledge base, and I like to have a more deliberate ‘push’ of new/updated rules. When I'm not planning on changing rules, I just load them from the classpath. If I intend to change them at runtime, then I load them from a

Re: [rules-users] lock-on-active

2013-11-07 Thread Stephen Masters
group set end up in > the "MAIN" (or "DEFAULT", I don't remember) > agenda group and then behave accordingly. > Could you post the Drools version number and some more details on the > example and the "unexpected" behavior? > Thanks > D

[rules-users] lock-on-active

2013-11-07 Thread Stephen Masters
Hi folks, According to the user guide, lock-on-active “inhibits additional activations of all rules with this flag set within the same rule flow or agenda group”. I was doing a little testing of some rules earlier today, and noticed that lock-on-active seems to change behaviour when applied to

Re: [rules-users] How to reduce transaction time

2013-11-05 Thread Stephen Masters
See the lines: WorkingMemory workingMemory = ruleBase.newStatefulSession(); StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(); Everything before those lines should be running on application start-up. i.e. Stored in variables at the class level (as long as the

Re: [rules-users] How to reduce transaction time

2013-11-05 Thread Stephen Masters
Rather than creating the knowledge base every time a request is made, you should be creating a knowledge base once. Probably during application start-up. Each request should just trigger creating a new session, which may well take just a few milliseconds. Steve On 5 Nov 2013, at 10:17, arpitm

Re: [rules-users] Drools 5.5 divide by 0 exception

2013-11-01 Thread Stephen Masters
; $ratio:(volumeAccumulations["total"]/consolidatdVolume.avgVolume)) > should be discarded. This value can safely be computed on the RHS > where the denominator's value being !=0 is asserted. > > -W > > On 01/11/2013, Stephen Masters wrote: >> Divide by zer

Re: [rules-users] Drools 5.5 divide by 0 exception

2013-11-01 Thread Stephen Masters
Divide by zero exceptions usually occur when you try to divide by zero. So … first question … is consolidatdVolume.avgVolume ever zero? On 1 Nov 2013, at 16:17, gboro54 wrote: > I have rules like the following: > > rule "Add Baseline to Context if it does not exists exists or not greater > th

Re: [rules-users] Audit User Action in Drools

2013-10-28 Thread Stephen Masters
In version 5 of Guvnor that information is available on each rule. It includes a version history and the name of the user who made each change. It’s on the “Attribute” tab. Steve On 28 Oct 2013, at 01:24, nzhu972 wrote: > in Guvnor for Drools 5, is there a way to audit which user made change

Re: [rules-users] Guvnor -> Best Practices for Changes in Production / DEV Environment

2013-10-21 Thread Stephen Masters
My approach has been to connect Eclipse to Guvnor in the two environments. I can then refresh each of them and run a compare between the 2 directory structures. Once I had done it a couple of times, it became pretty smooth. Steve On 21 Oct 2013, at 09:49, Peach Wyss wrote: > Hy all > > We'

Re: [rules-users] guvnor startup error

2013-10-18 Thread Stephen Masters
It's not something I'm very familiar with, but I can see that there's an error relating to Servlet 2.3, whilst the Jar it's loading is version 3.0. Not too sure what the resolution would be though. Perhaps Guvnor 5.5 doesn't work on Tomcat 6? Tomcat 7 was the version which introduced Servlet 3.0

Re: [rules-users] Decision Table Row #

2013-10-17 Thread Stephen Masters
It's worth noting that the rule generated for each row does have that row's number in its name. Therefore if you have an AgendaEventListener running, you can see the number if the rule fires. Useful if you're looking to debug/audit the rules which are activated. Steve On 16 Oct 2013, at 19:52

Re: [rules-users] Please help me on hibernate-meet-drools

2013-10-15 Thread Stephen Masters
I would recommend implementing and testing the persistence without Drools first. Given that you're using Spring, then the Spring Data project can make it ultra-simple to create repository classes. http://docs.spring.io/spring-data/data-commons/docs/1.6.1.RELEASE/reference/html/repositories.html

Re: [rules-users] Guvnor authorization

2013-10-04 Thread Stephen Masters
You will need to write an Identity Store implementation. The following code is an example of using one for LDAP (Active Directory). https://gist.github.com/gratiartis/4545962 I wrote that for 5.3. I *think* that means it should be okay for 5.2, but I don't really know. I don't think that there

Re: [rules-users] Suggestion/Feedback for DSL

2013-10-03 Thread Stephen Masters
If you hand-crank the rules based on DSL, then you may be interested in Paul King's talk at SpringOne 2GX last month: https://springone2gx.com/conference/santa_clara/2013/09/session?id=29410 http://www.slideshare.net/paulk_asert/groovy-rules I can't find any video of the talk online at the mome

Re: [rules-users] Integrate Drools with Java application, need recommendations

2013-09-07 Thread Stephen Masters
Something to consider is how you want to scale. If you separate things, then you do have the advantage that you can scale out the web layer easily, whilst maintaining a long running session for your rules evaluation. On the other hand if your rules work well within stateless sessions, that's not

Re: [rules-users] Drools guvnor 5.2 model is not available

2013-09-06 Thread Stephen Masters
Probably worth showing us the code for "testdrl". On 6 Sep 2013, at 09:48, pritha.gh...@wipro.com wrote: > Hi, > > Whenever I am setting the dialect as java the following error comes > > “[testdrl] Unable to generate rule invoker. CountryPriceModeltest cannot be > resolved to a type Country

Re: [rules-users] Integrate Drools with Java application, need recommendations

2013-09-06 Thread Stephen Masters
or partially own rules > authoring) from my limited experience so far, option #2 is the best > approach. > > Let's know what you decide eventually and the challenges / opportunities > > Genene > > -Original Message- > From: rules-users-boun...

Re: [rules-users] What is the defect tracking process for Drools Community Edition

2013-09-06 Thread Stephen Masters
That sounds like a bug I came across a little while back. A bug in my code, not Drools. ;) If you create listeners and attach them to a session, then of course, you need to remove them manually. The session will have references to them, so they can never be garbage collected. It's the same wit

Re: [rules-users] DSL statement in Guvnor too long

2013-09-05 Thread Stephen Masters
As far as I know, we're stuck with it. Or at least I have never found a way around it other than trying to break the DSL sentences up. :( On 5 Sep 2013, at 20:25, Sean Su wrote: > Does anyone know if we can force the DSL statement in Guvnor to be displayed > with multiple lines when it is to

Re: [rules-users] Integrate Drools with Java application, need recommendations

2013-09-05 Thread Stephen Masters
My preference is option 1 … using a Spring application with a class which wraps a knowledge base / session. This has the advantage that sometimes I really do want to be able to mix up rules results with logic that I want to implement in Java code. There's obviously a performance impact if you a

Re: [rules-users] Guvnor: test scenario executes 100000 times

2013-09-05 Thread Stephen Masters
It depends on what kind of rule it is. If it's a 'technical' (DRL) rule, then you just add "no-loop" after the rule name. If it's a web based decision table, then it's on the "attributes" tab for that table. As Rich mentioned, it's much easier for us to help if you post the rule/code. Steve

Re: [rules-users] Guvnor: test scenario executes 100000 times

2013-09-05 Thread Stephen Masters
The usual reason would be that you have a rule which is updating a fact on which it has a constraint. After each update it is therefore re-evaluated. In which case, you just need to add "no-loop" to it. Steve On 5 Sep 2013, at 10:47, Smurfs wrote: > Hi > I am working on guvnor in jboss. >

Re: [rules-users] Fully qualified name for generated classes

2013-09-04 Thread Stephen Masters
It could be worth using the REST API to browse to the source of each package. It would be telling if the DRL included imports for com.mypkg.a.Foo and com.mypkg.b.Foo depending on which package it was in. Steve On 4 Sep 2013, at 18:43, Lance Leverich wrote: > The issue isn't that Foo cannot b

[rules-users] SpringOne 2GX

2013-09-04 Thread Stephen Masters
Hi folks, There seem to be quite a few queries on using Spring and Grails with Drools just recently, so I was just wondering whether anybody is heading to SpringOne 2GX next week. If anyone is going, it might be fun to meet up and natter about what we're all up to. Please do give me a shout if

Re: [rules-users] How to create drools web application and deploy in tomcat

2013-09-02 Thread Stephen Masters
If you use Maven to build it as a war, then it's simple to deploy to Tomcat. Nothing special needs to be done. My preferred way of doing this is to create a Spring web application, as it makes REST services simple. Create a Spring bean to wrap the knowledge base & session (if it's a long-runnin

Re: [rules-users] Getting data from a relational database

2013-08-30 Thread Stephen Masters
As a general rule, query the database in the Java code, and insert the objects retrieved as facts in the session. Then your LHS just needs to match on those facts. Either that or populate a global. If you have a stateless session, then you could get away with facts with getter methods which ret

Re: [rules-users] Authorization is not working in guvnor

2013-08-29 Thread Stephen Masters
There's a known bug in authentication for with that version: https://community.jboss.org/thread/206645 Perhaps that's the trouble you're having? However, it's worth pointing out that the users that are set up within Guvnor do not have logins. Instead they need to match up to existing use

Re: [rules-users] Guvnor - more than one resource in changeset.xml

2013-08-28 Thread Stephen Masters
It sounds like you might need to look at activation groups. Otherwise, just create separate knowledge bases to cover the different blends of packages you wish to work together. Steve On 28 Aug 2013, at 08:30, rganesh84 wrote: > Hi, > > Thanks for the reply. I understand that. > > However

Re: [rules-users] Line breaks in DSLR

2013-08-27 Thread Stephen Masters
Every DSL template phrase must be written on a single line. That's just how the syntax works. Hence why I do unfortunately have lines of DSL that are over 1000 characters long. :( Steve On 27 Aug 2013, at 19:14, Stefan wrote: > I have written a simple DSLR-rule with a rather long sentence

Re: [rules-users] Mapping complex objects info Guvnor compatible shim classes?

2013-08-12 Thread Stephen Masters
o maintain, but well worth it in terms of the power and simplicity it offers to users. tip - Don't bother using the DSL editor in Guvnor or in Eclipse. in 5.5 it doesn't actually work (bug has since been fixed), and any plain text editor is better anyway. On 12 Aug 2013, at 15:51, M

Re: [rules-users] Mapping complex objects info Guvnor compatible shim classes?

2013-08-11 Thread Stephen Masters
uot; rules creation? I > read that Guvnor could be embedded, but not sure that really helps either. > > -- > Mark Bennett / LucidWorks: Search & Big Data / mark.benn...@lucidworks.com > Office: 408-898-4201 / Telecommute: 408-733-0387 / Cell: 408-829-6513 > > On Aug 10, 2013,

Re: [rules-users] Mapping complex objects info Guvnor compatible shim classes?

2013-08-10 Thread Stephen Masters
Your plan seems about right to me. When working in pure Drools, you don't always need to do this. However, when working in Guvnor, I have always found it necessary to create a simplified domain model for facts. In Guvnor, you can bind variables to fields and drill in, but it's fiddly. Guided ru

Re: [rules-users] How to avoid stateless session rule fire on every fact ?

2013-08-07 Thread Stephen Masters
Only a few minutes of our time spent responding I suspect. I was more concerned that you could easily spend days developing an inappropriate solution which would need to be re-written. :) As a rule, when asking questions here, it's far better to explain the problem you're trying to solve. Witho

Re: [rules-users] How to avoid stateless session rule fire on every fact ?

2013-08-07 Thread Stephen Masters
>> According to my requirement I have to keep rule for each book separately. > > That's the weirdest thing I ever heard. What's the point? It sounds to me like one of the following: A poor requirement from someone who doesn't understand the technology. An overly literal interpretation of a requ

Re: [rules-users] WorkingMemoryListener & Declared Types

2013-08-07 Thread Stephen Masters
ing memory with specific property values. Steve On 7 Aug 2013, at 10:40, Wolfgang Laun wrote: > 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: >

Re: [rules-users] WorkingMemoryListener & Declared Types

2013-08-07 Thread Stephen Masters
cular properties. Steve On 7 Aug 2013, at 10:27, Stephen Masters wrote: > Add commons beanutils to your project: > > > commons-beanutils > commons-beanutils > 1.8.3 > > > The

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] How do you explicitly uses a designated DSL file when parsing dslr?

2013-08-06 Thread Stephen Masters
As far as I have ever been able to work out, the 'expander' keyword is redundant. If you add a DSL to the knowledge base, then it is active, and the expander keyword is not required. I am curious whether it used to do something which it is no longer needed for, whether it's needed for an obscur

Re: [rules-users] Drools 5.5 Decision Tables - Add check without requiring user input

2013-08-05 Thread Stephen Masters
I'm not aware of an 'out of the box' mechanism for this. However, my own preference for doing this is to get the RHS insert a restriction fact. Essentially, you have no LHS, so that that all rules in the decision table will fire after creating a session, inserting something like: Customer :: id

Re: [rules-users] Creati custom Ui for Drools

2013-08-05 Thread Stephen Masters
There is a REST API to enable an application such as yours to integrate with Guvnor: http://docs.jboss.org/drools/release/5.5.0.Final/drools-guvnor-docs/html/ch09.html Steve On 5 Aug 2013, at 12:58, ashish6276 wrote: > I am trying those things. > > Apart from this is there any way

Re: [rules-users] decision and prediction based on the same set of rules

2013-07-31 Thread Stephen Masters
authorizing the > rules. But I will keep that as an option. > > Thanks > > Sean > > > On Tue, Jul 30, 2013 at 5:36 PM, Stephen Masters > wrote: > Something to consider, which I have used for some rules is that instead of > those rules making a 'decisi

Re: [rules-users] decision and prediction based on the same set of rules

2013-07-30 Thread Stephen Masters
Something to consider, which I have used for some rules is that instead of those rules making a 'decision' they can insert a restriction fact. You can then create technical rules, which match on those restriction facts. Also, it's very simple to write code to look at the facts in the working me

Re: [rules-users] NullPointerException when updating a fact

2013-07-30 Thread Stephen Masters
So far I have stuck with 5.3.0. It's not perfect, but I have found it pretty good and reliable. I think that 5.4.0 was a reasonable improvement, but I haven't used it in anger. For me, there wasn't enough improvement in it from 5.3 to merit spending time on an upgrade, so I was waiting for 5.5.

Re: [rules-users] Any API accessing to the rule logic instead of only Facts

2013-07-30 Thread Stephen Masters
technical staff. This is why > there is a need to build these log information automatically by accessing > "rule LHS" through API. > > Visiting rules and their histories after the rule name has been logged is > always an option for this process. However it takes time

Re: [rules-users] NullPointerException when updating a fact

2013-07-30 Thread Stephen Masters
yours is failing. The project above uses Drools 5.4.0. I'm guessing that you're using 5.5.0.Final, because if I switch version in my pom.xml, then I get a NullPointerException. I suspect that you have hit upon one of the many bugs in 5.5.0.Final. Steve On 30 Jul 2013, at 09:5

Re: [rules-users] NullPointerException when updating a fact

2013-07-30 Thread Stephen Masters
It may be worth looking at what exception is being thrown now. You need to ensure that none of those classes have static flags on them (or the Java won't compile), and the Message.message method needs to become a constructor instead of some kind of static factory, so that the RHS of your rule in

Re: [rules-users] NullPointerException when updating a fact

2013-07-30 Thread Stephen Masters
The fact that all of your classes were static was ringing alarm bells, so I tested it without that. It works perfectly well if you remove 'static' from everything. Steve On 30 Jul 2013, at 08:43, schenka7 wrote: > I have appended the code that leads to the exception. > > I have also noticed

Re: [rules-users] Any API accessing to the rule logic instead of only Facts

2013-07-29 Thread Stephen Masters
Do your other applications log the source code of the application every time a call is made to it? It may be better to look at what Guvnor has to offer. For instance, it provides version history of the rules, so that if you know the name of a rule (which you get from the activation details), th

Re: [rules-users] using "From" keyword in the rule

2013-07-27 Thread Stephen Masters
Ah … spotted the specific exception by going back to Nabble. I was just looking for reasons why it might not compile. :) To be honest the line: > record : POC_CombineString($value.getField1(),$value.getField2()) … looks wrong. I can't work out a way in which it could compile, even if I a

Re: [rules-users] using "From" keyword in the rule

2013-07-27 Thread Stephen Masters
I guess it depends on whether there is a static connect() method on the Database class which returns a DatabaseConnection, which in turn has a method getUserRisk(POC_CombineString), which returns an instance of the TestValue class. On a side note, it's a very bad idea to put database calls in t

Re: [rules-users] help on drools guvnor

2013-07-17 Thread Stephen Masters
Have you tested that the rules fire when you load them as DRL? It would probably be worth showing us what EmployeeMap looks like and the rule which you expect to fire if there is an EmployeeMap in working memory. The Drools version would also be useful. Steve On 17 Jul 2013, at 14:04, pritha.

Re: [rules-users] A design decision to use Guvnor

2013-07-03 Thread Stephen Masters
You wouldn't need to change Guvnor source code to define rules which are client-specific. You just need to write rules which use the client ID as a constraint. Steve On 3 Jul 2013, at 17:57, Radhika Inugala wrote: > My requirement is as below: > > We need to give end users to provide us wit

Re: [rules-users] Decision table invoked frm Spring app

2013-06-12 Thread Stephen Masters
A knowledge agent can be used to refer to your Guvnor URL and load your rules into a knowledge base: http://docs.jboss.org/drools/release/5.5.0.Final/drools-guvnor-docs/html_single/#d0e3433 Within Spring, you just need to create a Spring bean/component, which has a field referring to the knowle

Re: [rules-users] choose method from fact object in guided editor

2013-06-10 Thread Stephen Masters
I think I have a better idea of what you're trying to do now. Below is the content of a message I sent to this list the other day. I think you might find the technique relevant to what you are doing. i.e. Create a DSL which refers to an enumeration which you define. That way, you get drop-down m

Re: [rules-users] choose method from fact object in guided editor

2013-06-10 Thread Stephen Masters
Is there some reason you can't just create a no-args method on the fact such as "getReviewedContent()"? Or why the pattern match couldn't directly match on reviewed content instead of using rules in Java to determine whether content has been reviewed? If you don't want to do either of those, ho

Re: [rules-users] Guvnor-5.5

2013-06-06 Thread Stephen Masters
It sounds like trying the latest 6.0 beta on WAS might be a good thing for me to check out next week. :) On 6 Jun 2013, at 05:25, abhinay_agarwal wrote: > hey steve, > > Yes the 5.3 works perfectly with was 7, just a few warning, but works fine. > 5.3 has problem running on was 8. > > 5.5 ha

Re: [rules-users] Url Resource Guvnor connection + ProtocolException

2013-06-05 Thread Stephen Masters
There's a pretty good chance that you're being redirected as a result of not being authenticated. As a tip on diagnosing, try using curl from the server you're deploying on, to see what you get, like so: Find out what happens with unauthenticated access: curl http://whatevertheurlis/ A

  1   2   3   >