Re: [rules-users] Getting Error while using Drools 5.3.0

2012-04-24 Thread Wolfgang Laun
The type of quoteRequest.modelyear is what?

If it's String, change it to int.

-W


On 24/04/2012, mkhan_rt54fde  wrote:
>
> Hi,
>
> My application works fine with Drools v 4.0.7. However, when I run my
> application using Drools 5.3.0, I am getting the following error:
>
> org.drools.rule.InvalidRulePackage: Evaluator '>' does not support type
> 'ValueType = 'String' : [Rule name='VIN required for newer vehicles']
>
>
>   at org.drools.rule.Package.checkValidity(Package.java:478)
>   at
> org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:481)
>   at org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:458)
>   at org.drools.reteoo.ReteooRuleBase.addPackage(ReteooRuleBase.java:465)
>
> Here is the condition I am using in my .dsl file:
>
> [condition][]request contains no VIN and the car was built after year
> {value}=info: CarRulesInfo(quoteRequest.VIN == null, quoteRequest.modelyear
>> 1982 )
>
> Any suggestions on how to fix this problem.
>
> Thanks in advance.
>
>
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Getting-Error-while-using-Drools-5-3-0-tp3936714p3936714.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] 2 Drools Rules in one DRL file and second Rule is not firing.

2012-04-24 Thread Joe Donnelly
I ended up fixing the issue. Well one of my coworkers who setup the Drools
Rules engine had to make some changes to the Drools setup, he had enabled
multi-threading.  Once he disabled it my rules ran fine.

 

 

From: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Joe Donnelly
Sent: Tuesday, April 24, 2012 4:56 PM
To: rules-users@lists.jboss.org
Subject: [rules-users] 2 Drools Rules in one DRL file and second Rule is not
firing.

 

Hi All,

 

I'm new to drools and using 5.2.0

 

I have 2 test cases I want to run on my test xml files

1.   Is the xml node there

2.   Does it match XSD data type pattern 

 

The XML file contents is loaded into a DTO(which has sub DTOs) and the DTO
is passed to the RuleService

I created one rule file called F1.drl with 2 rules in it.

 

rule "F1 - Exists"

when

fact : basicFact()

ojb1 :  ObjectDTO() from fact.Objects

not(String() from ojb1.node1())

then

System.out.println("Missing Node Data");


end

rule "F1- Pattern Match"

when

fact : basicFact()

ObjectDTO( node1 not matches
"^[\\S]{1,100}$") from fact.Objects

then

System.out.println("Bad Node value");

end 

 

test.java has 2 junit test cases

 

@test for TestFailExists.XML

 

@Test for TestFailPattern.XML

 

Regardless of which rule is first the first is only one that fires on the
file that it would apply to.

I tried commenting out 1 rule and the other works fine and vice versa.  I
even tried separating the 

Into separate DRL files which worked as expected.

 

Hopefully someone can shed some light on this for me

 

Thank you for your time,

 

Joe

 

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Best practice for 0..1 relations

2012-04-24 Thread Mark Proctor
On 23/04/2012 21:31, Christopher Dolan wrote:
> Sorry, I wasn't clear... In the example, it's the spouse that's the optional 
> fact. I want the rule to fire whether or not a spouse exists, but the RHS 
> computes the income differently if a spouse exists or not. If a spouse is 
> added/removed, I want the rule to re-fire and the income should be changed.
Take a look at my Pong game and the "Create Ball" rule
https://github.com/droolsjbpm/drools/blob/master/drools-examples/src/main/resources/org/drools/games/pong/init.drl

I create a ball with different dx directions depend on different states, 
all from within one rule:

rule "Create Ball" when
  not Ball()
  ( PointWin(player.id == PlayerId.PlayerOne ) and dx : Number() from 2 ) or
  ( PointWin(player.id == PlayerId.PlayerTwo ) and dx : Number() from -2 ) 
or
  ( not PointWin( ) and dx : Number() from -2 )
then
 ball = new Ball( (pconf.tableWidth/2)-(pconf.ballWidth/2),
  (pconf.tableHeight/2)-(pconf.ballWidth/2),
   pconf.ballWidth);
 ball.speed = pconf.ballStartingSpeed;
 ball.dx = dx;
 insert( ball );
end


>
> Chris
>
> -Original Message-
> From: rules-users-boun...@lists.jboss.org 
> [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Welsh, Armand
> Sent: Monday, April 23, 2012 3:22 PM
> To: rules-users@lists.jboss.org
> Subject: Re: [rules-users] Best practice for 0..1 relations
>
> So, I assume the fact that is not needed in the LHS is Income.
>
> By inserting Income into Working Memory, you are subjecting it to rete 
> evaluation against the current knowledge tree.  I consider the cost of each 
> operation.  Insert is very costly, and insertLogical even more costly.
>
> I don't know anything about how your data model is built, but based on this 
> very simple example, I would think you would be better off with a Global like 
> this:
>
> Global Income income
>
> Style 1: one rule for each scenario
>  rule "household income, single"
>  when
>  $p1 : Person()
>  not Relation(person1 == $p1, type == "spouse")
>  then
>  income = new Income($p1.getIncome());
>  end
>  rule "household income, married"
>  when
>  $p1 : Person()
>  Relation(person1 == $p1, type == "spouse", $p2: person2)
>  then
>  income = new Income($p1.getIncome() + $p2.getIncome());
>  end
>
> Style 2: a single rule with a collection
>  rule "household income "
>  when
>  $p1 : Person()
>  $rels : List() from collect(Relation($p1 == person1, type == 
> "spouse"))
>  then
>  income = new Income($p1.getIncome() + ($rels.size() == 0 ? 0 : 
> $rels.get(0).getPerson2().getIncome());
>  end
>
> Then in code, you can get the Global value to determine what it got set to, 
> if you need outside of the Drools processing.  All thread safety factors must 
> be considered in a multi-threaded environment.  Global are not objects know 
> to rete, and therefore, use of them is very fast in the LHS.  And the RHS is 
> never aware of changes to Globals (drools assumes them to be static values, 
> that do not change) so care must be taken if using them in the RHS of rules, 
> which I would advise against doing except for special cases where you know a 
> change in the global variable won't be a problem (such as this simple 
> scenario where the global is not used in the RHS at all).
>
> -Original Message-
> From: rules-users-boun...@lists.jboss.org 
> [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Christopher Dolan
> Sent: Monday, April 23, 2012 1:01 PM
> To: rules-users@lists.jboss.org
> Subject: [rules-users] Best practice for 0..1 relations
>
> What's the best way to encode a fact that's needed in the RHS but is not 
> important in the LHS?
>
> Consider a contrived example of computing total household income for single 
> or married persons. I can think of two ways to encode this rule, but I don't 
> like either of them:
>
> Style 1: one rule for each scenario
>  rule "household income, single"
>  when
>  $p1 : Person()
>  not Relation(person1 == $p1, type == "spouse")
>  then
>  insertLogical(new Income($p1.getIncome()));
>  end
>  rule "household income, married"
>  when
>  $p1 : Person()
>  Relation(person1 == $p1, type == "spouse", $p2: person2)
>  then
>  insertLogical(new Income($p1.getIncome() + $p2.getIncome()));
>  end
>
> Style 2: a single rule with a collection
>  rule "household income "
>  when
>  $p1 : Person()
>  $rels : List() from collect(Relation($p1 == person1, type == 
> "spouse"))
>  then
>  insertLogical(new Income($p1.getIncome() + ($rels.size() == 0 ? 
> 0 : $rels.get(0).getPerson2().getIncome()));
>  end
>
>
> (please

Re: [rules-users] Problem with logging using Drools 5.3.0

2012-04-24 Thread Mark Proctor
On 24/04/2012 13:26, FlyingEagle wrote:
> Thx Ingo for your reply, but logging with KnowledgeRuntimeLogger is not my
> problem.
Suspect the SystemEventListener default implementation got changed. Make 
have a dig around there, and provide your own impl.

Mark
> This works fine.
>
> Drools itself uses log4j for logging of its activites. These log entries are
> very helpful for analyzing, what happens in Drools.
>
> For example, I had the following output with the runtime 5.1.0, while
> creating a new KnowledgeAgent:
> [2012:04:115 14:04:889:info] ResourceChangeNotification created
> [2012:04:115 14:04:889:info] ResourceChangeScanner created with default
> interval=60
> [2012:04:115 14:04:889:debug] ResourceChangeNotification monitor added
> monitor=org.drools.io.impl.ResourceChangeScannerImpl@7f5580
> [2012:04:115 14:04:889:debug] KnowledgeAgent building resource map
> [2012:04:115 14:04:889:info] KnowledgeAgent created, with configuration:
> monitorChangeSetEvents=true scanResources=true scanDirectories=true
> newInstance=true
> [2012:04:115 14:04:889:info] KnowledegAgent has started listening for
> ChangeSet notifications
>
> Using now the runtime 5.3.0 I have no such entries anymore.
>
>
>
>
>
>
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/Problem-with-logging-using-Drools-5-3-0-tp3934918p3935165.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools variables

2012-04-24 Thread Mark Proctor
On 24/04/2012 18:43, skatta1986 wrote:
> what about the paramaters of timer( int:  ? )
> ?
>
> timer(int : 10s) -->  is working properly
> but timer(int :  s ) -->  not working
Expressions are not supported in 5.3 release. The matching code may not 
be correct identifying your invalid expression. You can see the code 
here, buildtimers() method. If you can see how we can tighten the code 
better, please let me know:
https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/main/java/org/drools/rule/builder/RuleBuilder.java

5.4 adds support for time expressions. Which will be released soon 
(within next two weeks).

Mark
>
> -
> working Rule:
>
> rule "tmeout case"
> timer( int: 10s )
>  when
>   $request : EventRecord(eventType == "EVENT_REGISTER", user ==
> "katta") from entry-point "AggStream"
>  and not (EventRecord( eventType == "EVENT_RESPONSE", ", user ==
> "katta", this after[ 0s, 10s ] $request ) from entry-point "AggStream")
>
>   then
>System.out.println("-- timeout for user : "+ $request.getUser() );
> end
> ---
>
> Now I want to replace value "10" given in the above rule with a global
> variable.
>
> -
>
> ksession.setGlobal( "timeout", new Integer(10));
>
>
> Improper (not working) rule:
> global Integer timeout;
>
> rule "tmeout case"
> timer( int: timeout.intValue() s )
>  when
>   $request : EventRecord(eventType == "EVENT_REGISTER", user ==
> "katta") from entry-point "AggStream"
>  and not (EventRecord( eventType == "EVENT_RESPONSE", ", user ==
> "katta", this after[ 0s, 10s ] $request ) from entry-point "AggStream")
>
>   then
>System.out.println("-- timeout for user : "+ $request.getUser() );
> end
> --
>
> This new rule doesn't give any error but it is giving unexpected result.
>
> For example if a fire only one EventRecord(eventType == "EVENT_REGISTER",
> user == "katta") into the working memory, then after 10seconds I should get
> timeout.
>
> But for the new rule as soon as I fire the EventRecord it is giving as
> timeout.
>
>
> Please help me in this regard
>
>
>
>
>
>
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/Drools-variables-tp3935404p3936009.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] [Drools.5.0.1] insertLogical abnormalities

2012-04-24 Thread Mark Proctor
On 24/04/2012 23:27, rou...@mm.di.uoa.gr wrote:
> Thanks for the prompt reply, please see comments inline.
>
> Mark Proctor wrote:
>> this rule is invalid, can't have bindings on 'not' as you can't bind
>> something that doesn't exist.
>>
>> not ( logg : InternalResultCode( ruleId=="5", goodNo==gnId.goodNo) )
> Sorry, I don't get it.
> The rule is certainly valid as it compiles and executes fine on Drools.
> There may be other instances of "InternalResultCode" just not with these
> values.
> The values used are binded outside the not() and not used in the rest of
> the rule.
Not talking about compilation, trying to understand your intent. You are 
binding to a single pattern inside of a not, that binding is not used 
else where within that 'not'.

Anyway check your hashcodes, and latest version of drools.

Mark
>> Make sure you implement equals/hashcode properly for logical facts. Aslo
> I haven't implemented anything. I rely solely on Drools to properly handle
> facts and it does so as expected.
>
>> make sure you understand that only one equal instance of logical
>> insertion will ever exist, futher equal insertions are ignored.
> That is understood. The RHS of the rule logicalInserts three different
> kind of facts, but only two of them are reported as inserted. Where did
> the third one go, since the RHS is executed?
>
>> Also please try it on 5.4.CR1 too, as lots of bug fixes in there.
> Changing Drools version is not feasible at the moment, although at the
> TODO list.
>
> Thank you for your time,
> -Stathis
>
>> Mark
>>
>> On 24/04/2012 18:43, Stathis Rouvas wrote:
>>> Hi List.
>>>
>>> I am using Drools.5.0.1.
>>>
>>> I am experiencing abnormalities using insertLogical(),
>>> namely that in the following code
>>> RaResultCode and RegistryUsed are found inserted (using the relevant
>>> queries), while
>>> InternalResultCode is not found (using the query "get ircQuery")
>>> and I cannot explain why this is hapenning.
>>>
>>> The code in question is:
>>>
>>> query "get RaCode"
>>> rrc : RaResultCode()
>>> end
>>>
>>> query "get RaRegUsed"
>>> regUsed : RegistryUsed()
>>> end
>>>
>>> query "get ircQuery"
>>> irc : InternalResultCode()
>>> end
>>>
>>> rule "r5"
>>> no-loop true
>>> dialect "mvel"
>>> when
>>> gnId : GoodNumbers()
>>> not ( logg : InternalResultCode( ruleId=="5", goodNo==gnId.goodNo) )
>>> LogicalValue : HeaderMessage( gnId.goodNo==goodNo , totalItemNo == 3
>>> )
>>> v261 : t2206( )
>>> then
>>> InternalResultCode irrc = new InternalResultCode();
>>>   irrc.setRuleId("5");
>>>   irrc.setGoodNo(gnId.goodNo);
>>> insertLogical(irrc);
>>> RaResultCode rrc = new RaResultCode();
>>>   rrc.setResultRuleId("5");
>>>   rrc.setResultGoodNo(gnId.goodNo);
>>> insertLogical(rrc);
>>> RegistryUsed ruv261 = new RegistryUsed();
>>>   ruv261.setResultGoodNo(gnId.goodNo);
>>>   ruv261.setRegRowId(v261.regRowId);
>>>   ruv261.setVersionId(v261.versionId);
>>>   ruv261.setRuleId("5");
>>> insertLogical(ruv261);
>>> end
>>>
>>> Using a statefull session,
>>> the KnowledgeBase is created,
>>> then 26 facts for "t2206" and one fact for "HeaderMessage" are inserted
>>> and finally
>>> fireAllRules() is called.
>>>
>>> Afterwards the defined queries are used to gather the results, but as
>>> noted in the begininning
>>> results for "InternalResultCode", are missing.
>>> There should be one for each of the "InternalResultCode", "RaResultCode"
>>> and "RegistryUsed" entities.
>>>
>>> Can anyone shed some light?
>>>
>>> Thank you for your time,
>>> -Stathis
>>> ___
>>> rules-users mailing list
>>> rules-users@lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/rules-users
>> ___
>> rules-users mailing list
>> rules-users@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] [Drools.5.0.1] insertLogical abnormalities

2012-04-24 Thread rouvas
Thanks for the prompt reply, please see comments inline.

Mark Proctor wrote:
> this rule is invalid, can't have bindings on 'not' as you can't bind
> something that doesn't exist.
>
>not ( logg : InternalResultCode( ruleId=="5", goodNo==gnId.goodNo) )

Sorry, I don't get it.
The rule is certainly valid as it compiles and executes fine on Drools.
There may be other instances of "InternalResultCode" just not with these
values.
The values used are binded outside the not() and not used in the rest of
the rule.

>
> Make sure you implement equals/hashcode properly for logical facts. Aslo

I haven't implemented anything. I rely solely on Drools to properly handle
facts and it does so as expected.

> make sure you understand that only one equal instance of logical
> insertion will ever exist, futher equal insertions are ignored.

That is understood. The RHS of the rule logicalInserts three different
kind of facts, but only two of them are reported as inserted. Where did
the third one go, since the RHS is executed?

>
> Also please try it on 5.4.CR1 too, as lots of bug fixes in there.

Changing Drools version is not feasible at the moment, although at the
TODO list.

Thank you for your time,
-Stathis

>
> Mark
>
> On 24/04/2012 18:43, Stathis Rouvas wrote:
>> Hi List.
>>
>> I am using Drools.5.0.1.
>>
>> I am experiencing abnormalities using insertLogical(),
>> namely that in the following code
>>RaResultCode and RegistryUsed are found inserted (using the relevant
>> queries), while
>>InternalResultCode is not found (using the query "get ircQuery")
>> and I cannot explain why this is hapenning.
>>
>> The code in question is:
>>
>> query "get RaCode"
>>rrc : RaResultCode()
>> end
>>
>> query "get RaRegUsed"
>>regUsed : RegistryUsed()
>> end
>>
>> query "get ircQuery"
>>irc : InternalResultCode()
>> end
>>
>> rule "r5"
>>no-loop true
>>dialect "mvel"
>> when
>>gnId : GoodNumbers()
>>not ( logg : InternalResultCode( ruleId=="5", goodNo==gnId.goodNo) )
>>LogicalValue : HeaderMessage( gnId.goodNo==goodNo , totalItemNo == 3
>> )
>>v261 : t2206( )
>> then
>>InternalResultCode irrc = new InternalResultCode();
>>  irrc.setRuleId("5");
>>  irrc.setGoodNo(gnId.goodNo);
>>insertLogical(irrc);
>>RaResultCode rrc = new RaResultCode();
>>  rrc.setResultRuleId("5");
>>  rrc.setResultGoodNo(gnId.goodNo);
>>insertLogical(rrc);
>>RegistryUsed ruv261 = new RegistryUsed();
>>  ruv261.setResultGoodNo(gnId.goodNo);
>>  ruv261.setRegRowId(v261.regRowId);
>>  ruv261.setVersionId(v261.versionId);
>>  ruv261.setRuleId("5");
>>insertLogical(ruv261);
>> end
>>
>> Using a statefull session,
>> the KnowledgeBase is created,
>> then 26 facts for "t2206" and one fact for "HeaderMessage" are inserted
>> and finally
>> fireAllRules() is called.
>>
>> Afterwards the defined queries are used to gather the results, but as
>> noted in the begininning
>> results for "InternalResultCode", are missing.
>> There should be one for each of the "InternalResultCode", "RaResultCode"
>> and "RegistryUsed" entities.
>>
>> Can anyone shed some light?
>>
>> Thank you for your time,
>> -Stathis
>> ___
>> rules-users mailing list
>> rules-users@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] [Drools.5.0.1] insertLogical abnormalities

2012-04-24 Thread Mark Proctor
this rule is invalid, can't have bindings on 'not' as you can't bind 
something that doesn't exist.

   not ( logg : InternalResultCode( ruleId=="5", goodNo==gnId.goodNo) )

Make sure you implement equals/hashcode properly for logical facts. Aslo 
make sure you understand that only one equal instance of logical 
insertion will ever exist, futher equal insertions are ignored.

Also please try it on 5.4.CR1 too, as lots of bug fixes in there.

Mark

On 24/04/2012 18:43, Stathis Rouvas wrote:
> Hi List.
>
> I am using Drools.5.0.1.
>
> I am experiencing abnormalities using insertLogical(),
> namely that in the following code
>RaResultCode and RegistryUsed are found inserted (using the relevant 
> queries), while
>InternalResultCode is not found (using the query "get ircQuery")
> and I cannot explain why this is hapenning.
>
> The code in question is:
>
> query "get RaCode"
>rrc : RaResultCode()
> end
>
> query "get RaRegUsed"
>regUsed : RegistryUsed()
> end
>
> query "get ircQuery"
>irc : InternalResultCode()
> end
>
> rule "r5"
>no-loop true
>dialect "mvel"
> when
>gnId : GoodNumbers()
>not ( logg : InternalResultCode( ruleId=="5", goodNo==gnId.goodNo) )
>LogicalValue : HeaderMessage( gnId.goodNo==goodNo , totalItemNo == 3 )
>v261 : t2206( )
> then
>InternalResultCode irrc = new InternalResultCode();
>  irrc.setRuleId("5");
>  irrc.setGoodNo(gnId.goodNo);
>insertLogical(irrc);
>RaResultCode rrc = new RaResultCode();
>  rrc.setResultRuleId("5");
>  rrc.setResultGoodNo(gnId.goodNo);
>insertLogical(rrc);
>RegistryUsed ruv261 = new RegistryUsed();
>  ruv261.setResultGoodNo(gnId.goodNo);
>  ruv261.setRegRowId(v261.regRowId);
>  ruv261.setVersionId(v261.versionId);
>  ruv261.setRuleId("5");
>insertLogical(ruv261);
> end
>
> Using a statefull session,
> the KnowledgeBase is created,
> then 26 facts for "t2206" and one fact for "HeaderMessage" are inserted and 
> finally
> fireAllRules() is called.
>
> Afterwards the defined queries are used to gather the results, but as noted 
> in the begininning
> results for "InternalResultCode", are missing.
> There should be one for each of the "InternalResultCode", "RaResultCode" and 
> "RegistryUsed" entities.
>
> Can anyone shed some light?
>
> Thank you for your time,
> -Stathis
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Getting Error while using Drools 5.3.0

2012-04-24 Thread mkhan_rt54fde

Hi,

My application works fine with Drools v 4.0.7. However, when I run my
application using Drools 5.3.0, I am getting the following error:

org.drools.rule.InvalidRulePackage: Evaluator '>' does not support type
'ValueType = 'String' : [Rule name='VIN required for newer vehicles']


at org.drools.rule.Package.checkValidity(Package.java:478)
at
org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:481)
at org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:458)
at org.drools.reteoo.ReteooRuleBase.addPackage(ReteooRuleBase.java:465)

Here is the condition I am using in my .dsl file:

[condition][]request contains no VIN and the car was built after year
{value}=info: CarRulesInfo(quoteRequest.VIN == null, quoteRequest.modelyear
> 1982 )

Any suggestions on how to fix this problem.

Thanks in advance.





--
View this message in context: 
http://drools.46999.n3.nabble.com/Getting-Error-while-using-Drools-5-3-0-tp3936714p3936714.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] 2 Drools Rules in one DRL file and second Rule is not firing.

2012-04-24 Thread Joe Donnelly
Hi All,

 

I'm new to drools and using 5.2.0

 

I have 2 test cases I want to run on my test xml files

1.   Is the xml node there

2.   Does it match XSD data type pattern 

 

The XML file contents is loaded into a DTO(which has sub DTOs) and the DTO
is passed to the RuleService

I created one rule file called F1.drl with 2 rules in it.

 

rule "F1 - Exists"

when

fact : basicFact()

ojb1 :  ObjectDTO() from fact.Objects

not(String() from ojb1.node1())

then

System.out.println("Missing Node Data");


end

rule "F1- Pattern Match"

when

fact : basicFact()

ObjectDTO( node1 not matches
"^[\\S]{1,100}$") from fact.Objects

then

System.out.println("Bad Node value");

end 

 

test.java has 2 junit test cases

 

@test for TestFailExists.XML

 

@Test for TestFailPattern.XML

 

Regardless of which rule is first the first is only one that fires on the
file that it would apply to.

I tried commenting out 1 rule and the other works fine and vice versa.  I
even tried separating the 

Into separate DRL files which worked as expected.

 

Hopefully someone can shed some light on this for me

 

Thank you for your time,

 

Joe

 

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] 'Condition' dialog screen size too narrow (BRL)

2012-04-24 Thread Michael Anstis
Oh, and is your browser window maximized (in case we're doing 80% of window
height or something)?

On 24 April 2012 19:19, Michael Anstis  wrote:

> Height is a strange problem though.
>
> What version of Guvnor are you using?
>
>
> On 24 April 2012 19:02, TonyN  wrote:
>
>> ok, Mike..and I think I made a typo.  should say 'height' instead of
>> 'width'...
>>
>> --
>> View this message in context:
>> http://drools.46999.n3.nabble.com/Condition-dialog-screen-size-too-narrow-BRL-tp3935733p3936071.html
>> Sent from the Drools: User forum mailing list archive at Nabble.com.
>> ___
>> rules-users mailing list
>> rules-users@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] 'Condition' dialog screen size too narrow (BRL)

2012-04-24 Thread Michael Anstis
Height is a strange problem though.

What version of Guvnor are you using?

On 24 April 2012 19:02, TonyN  wrote:

> ok, Mike..and I think I made a typo.  should say 'height' instead of
> 'width'...
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Condition-dialog-screen-size-too-narrow-BRL-tp3935733p3936071.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools variables

2012-04-24 Thread Wolfgang Laun
I suppose that it's a bug that this expression is accepted by the parser.

The simple object reference "timeout" is rightly rejected.

-W


On 24/04/2012, skatta1986  wrote:
> what about the paramaters of timer( int:  ?
> )
> ?
>
> timer(int : 10s) --> is working properly
> but timer(int :  s ) --> not working
>
> -
> working Rule:
>
> rule "tmeout case"
> timer( int: 10s )
> when
>  $request : EventRecord(eventType == "EVENT_REGISTER", user ==
> "katta") from entry-point "AggStream"
> and not (EventRecord( eventType == "EVENT_RESPONSE", ", user ==
> "katta", this after[ 0s, 10s ] $request ) from entry-point "AggStream")
>
>  then
>   System.out.println("-- timeout for user : "+ $request.getUser() );
> end
> ---
>
> Now I want to replace value "10" given in the above rule with a global
> variable.
>
> -
>
> ksession.setGlobal( "timeout", new Integer(10));
>
>
> Improper (not working) rule:
> global Integer timeout;
>
> rule "tmeout case"
> timer( int: timeout.intValue() s )
> when
>  $request : EventRecord(eventType == "EVENT_REGISTER", user ==
> "katta") from entry-point "AggStream"
> and not (EventRecord( eventType == "EVENT_RESPONSE", ", user ==
> "katta", this after[ 0s, 10s ] $request ) from entry-point "AggStream")
>
>  then
>   System.out.println("-- timeout for user : "+ $request.getUser() );
> end
> --
>
> This new rule doesn't give any error but it is giving unexpected result.
>
> For example if a fire only one EventRecord(eventType == "EVENT_REGISTER",
> user == "katta") into the working memory, then after 10seconds I should get
> timeout.
>
> But for the new rule as soon as I fire the EventRecord it is giving as
> timeout.
>
>
> Please help me in this regard
>
>
>
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Drools-variables-tp3935404p3936009.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] 'Condition' dialog screen size too narrow (BRL)

2012-04-24 Thread TonyN
ok, Mike..and I think I made a typo.  should say 'height' instead of
'width'...

--
View this message in context: 
http://drools.46999.n3.nabble.com/Condition-dialog-screen-size-too-narrow-BRL-tp3935733p3936071.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] [Drools.5.0.1] insertLogical abnormalities

2012-04-24 Thread Stathis Rouvas
Hi List.

I am using Drools.5.0.1.

I am experiencing abnormalities using insertLogical(), 
namely that in the following code 
  RaResultCode and RegistryUsed are found inserted (using the relevant 
queries), while 
  InternalResultCode is not found (using the query "get ircQuery")
and I cannot explain why this is hapenning.

The code in question is:

query "get RaCode"
  rrc : RaResultCode()
end

query "get RaRegUsed"
  regUsed : RegistryUsed()
end

query "get ircQuery"
  irc : InternalResultCode()
end

rule "r5"
  no-loop true
  dialect "mvel"
when
  gnId : GoodNumbers()
  not ( logg : InternalResultCode( ruleId=="5", goodNo==gnId.goodNo) )
  LogicalValue : HeaderMessage( gnId.goodNo==goodNo , totalItemNo == 3 )
  v261 : t2206( )
then
  InternalResultCode irrc = new InternalResultCode();
irrc.setRuleId("5");
irrc.setGoodNo(gnId.goodNo);
  insertLogical(irrc);
  RaResultCode rrc = new RaResultCode();
rrc.setResultRuleId("5");
rrc.setResultGoodNo(gnId.goodNo);
  insertLogical(rrc);
  RegistryUsed ruv261 = new RegistryUsed();
ruv261.setResultGoodNo(gnId.goodNo);
ruv261.setRegRowId(v261.regRowId);
ruv261.setVersionId(v261.versionId);
ruv261.setRuleId("5");
  insertLogical(ruv261);
end

Using a statefull session, 
the KnowledgeBase is created, 
then 26 facts for "t2206" and one fact for "HeaderMessage" are inserted and 
finally
fireAllRules() is called.

Afterwards the defined queries are used to gather the results, but as noted in 
the begininning
results for "InternalResultCode", are missing.
There should be one for each of the "InternalResultCode", "RaResultCode" and 
"RegistryUsed" entities.

Can anyone shed some light?

Thank you for your time,
-Stathis
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools variables

2012-04-24 Thread skatta1986
what about the paramaters of timer( int:  ? ) 
?

timer(int : 10s) --> is working properly
but timer(int :  s ) --> not working 

-
working Rule:

rule "tmeout case"
timer( int: 10s )
when
 $request : EventRecord(eventType == "EVENT_REGISTER", user ==
"katta") from entry-point "AggStream" 
and not (EventRecord( eventType == "EVENT_RESPONSE", ", user ==
"katta", this after[ 0s, 10s ] $request ) from entry-point "AggStream")

 then
  System.out.println("-- timeout for user : "+ $request.getUser() );
end
---

Now I want to replace value "10" given in the above rule with a global
variable.

-

ksession.setGlobal( "timeout", new Integer(10));


Improper (not working) rule:
global Integer timeout;

rule "tmeout case"
timer( int: timeout.intValue() s )
when
 $request : EventRecord(eventType == "EVENT_REGISTER", user ==
"katta") from entry-point "AggStream" 
and not (EventRecord( eventType == "EVENT_RESPONSE", ", user ==
"katta", this after[ 0s, 10s ] $request ) from entry-point "AggStream")

 then
  System.out.println("-- timeout for user : "+ $request.getUser() );
end
--

This new rule doesn't give any error but it is giving unexpected result.

For example if a fire only one EventRecord(eventType == "EVENT_REGISTER",
user == "katta") into the working memory, then after 10seconds I should get
timeout.

But for the new rule as soon as I fire the EventRecord it is giving as
timeout.


Please help me in this regard






--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-variables-tp3935404p3936009.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] 'Condition' dialog screen size too narrow (BRL)

2012-04-24 Thread Michael Anstis
We have a JIRA to make it so the list is (at least) in a scroll panel. I
can't remember the number right now, but it's on our list.

We also have another JIRA to make the selection process better too but time
is not our friend

Feel free to contribute a pull request or wait until the wheels have
turned...

Of course 1.5 inches is all relative - your screen may only be 2 inches ;)

On 24 April 2012 17:00, TonyN  wrote:

> Hi,
>
> I am wondering if folks have this issue:  When I'm in the guided editor and
> open the 'condition' dialog to add more conditions, the width of the
> condition dialog rendered is only about 1.5 inches (which is way too small
> to display all the DSLs that we have).  This makes it very user-unfriendly.
> Is there a way to make it bigger?  attached is an example:
>
> http://drools.46999.n3.nabble.com/file/n3935733/conditionDialog.jpg
>
> Configuration:
> Guvnor (5.2.0 Final)
> Windows XP Pro (SP3)
> FireFox (10.0.3)
> IE 8.0.6
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Condition-dialog-screen-size-too-narrow-BRL-tp3935733p3935733.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] 'Condition' dialog screen size too narrow (BRL)

2012-04-24 Thread TonyN
Hi,

I am wondering if folks have this issue:  When I'm in the guided editor and
open the 'condition' dialog to add more conditions, the width of the
condition dialog rendered is only about 1.5 inches (which is way too small
to display all the DSLs that we have).  This makes it very user-unfriendly. 
Is there a way to make it bigger?  attached is an example:

http://drools.46999.n3.nabble.com/file/n3935733/conditionDialog.jpg 

Configuration:  
Guvnor (5.2.0 Final)
Windows XP Pro (SP3)
FireFox (10.0.3)
IE 8.0.6

--
View this message in context: 
http://drools.46999.n3.nabble.com/Condition-dialog-screen-size-too-narrow-BRL-tp3935733p3935733.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools variables

2012-04-24 Thread Wolfgang Laun
On 24/04/2012, skatta1986  wrote:
> Hi,
>
> Could you please answer my queries:
> 1. Can we create int variable inside LHS (when)? If yes please give me an
> example

You can bind a variable to a field, but I don't think you mean that.

A Number object can result from an "accumulate from" - see the Expert manual.

Otherwise: no.


> 2. I have a gobal variable which I want to use in timer(int :  s)
> and also in after[0s,  s)
> timer is accepting global variable but after is giving error.
>
> [74,200]: [ERR 102] Line 74:200 mismatched input 'after' in rule
> "EVENT_SUCCESS"
> [0,0]: Parser returned a null Package
>
> Please help out me in this. I would like to use a global variable which can
> be changed at runtime.

Changes in global variables are not visible to the Engine; therefore
you cannot do what I think you intend to do.

The parameters for temporal operators must be literals.

-W


>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Drools-variables-tp3935404p3935404.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] please provide a rule for events timeout cases

2012-04-24 Thread Vincent LEGENDRE
and thanks for providing feedback !

- Mail original -
De: "skatta1986" 
À: rules-users@lists.jboss.org
Envoyé: Mardi 24 Avril 2012 16:08:02
Objet: Re: [rules-users] please provide a rule for events timeout cases

thanks for the reply its giving expected results

--
View this message in context: 
http://drools.46999.n3.nabble.com/please-provide-a-rule-for-events-timeout-cases-tp3907955p3935376.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools variables

2012-04-24 Thread skatta1986
Hi,

Could you please answer my queries:
1. Can we create int variable inside LHS (when)? If yes please give me an
example
2. I have a gobal variable which I want to use in timer(int :  s)
and also in after[0s,  s)
timer is accepting global variable but after is giving error.

[74,200]: [ERR 102] Line 74:200 mismatched input 'after' in rule
"EVENT_SUCCESS"
[0,0]: Parser returned a null Package

Please help out me in this. I would like to use a global variable which can
be changed at runtime.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-variables-tp3935404p3935404.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] please provide a rule for events timeout cases

2012-04-24 Thread skatta1986
thanks for the reply its giving expected results

--
View this message in context: 
http://drools.46999.n3.nabble.com/please-provide-a-rule-for-events-timeout-cases-tp3907955p3935376.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Fwd: Re: make the Guvnor interface into French

2012-04-24 Thread Michael Anstis
Sorry for the broken link, try this instead:
http://docs.jboss.org/drools/release/5.4.0.CR1/droolsjbpm-introduction-docs/html_single/index.html#gettingstarted

On 24 April 2012 13:42, Qchevalier wrote:

> Thank you for your answer.
> No, I didn't tag the corrections. I will do the fork.
> Your 
> linkdoesn't
>  work, I got this :
> HTTP Status 404 -
> --
>
> *type* Status report
>
> *message*
>
> *description* *The requested resource () is not available.*
> --
> JBoss Web/2.1.12.GA-patch-03
> *Sorry for the delay :), **I was in holidays **.
>
> Regards,
>
> Quenitn
> *
> 2012/4/7 Vincent Legendre [via Drools] <[hidden 
> email]
> >
>
>> This is exactly what I did. This procedure works like a charm.
>>
>> You said "a lot" of errors ? I can't be possible :) !!
>> Did you tag your corrections ? the NWELL ?
>>
>>
>>  Message original 
>>  Sujet: Re: [rules-users] make the Guvnor interface into French  Date : Fri,
>> 6 Apr 2012 21:27:47 +0100  De : Michael Anstis [hidden 
>> email]  Répondre
>> à : Rules Users List [hidden 
>> email]  Pour :
>> Rules Users List [hidden 
>> email]
>>
>>
>> Hi Quentin,
>>
>> The droolsjbom-build-bootstrap\README.md is a good source (and kept up to
>> date).
>>
>> The simplest (and preferred) approach might be to fork the github
>> repository, apply your changes and submit a pull request.
>>
>> Please see 
>> herefor
>>  more information.
>>
>> With kind regards,
>>
>> Mike
>>
>>
>> On 6 April 2012 10:53, Qchevalier <[hidden 
>> email]
>> > wrote:
>>
>>> Hello,
>>>
>>> I got your last file (Constants_fr_FR.properties) Vincent, but I found a
>>> lot
>>> of errors. So here is my corrected file :
>>>
>>> http://drools.46999.n3.nabble.com/file/n3889908/Constants_fr_FR.properties
>>> Constants_fr_FR.properties
>>>
>>> I didn't manage to integrate this file into the guvnor war file.
>>>
>>> I understood that I have to rebuild the sources of guvnor, but I didn't
>>> manage to do it. I found several documentations about "how to build
>>> guvnor
>>> sources" but each time it was either old instructions, either partial
>>> instructions.
>>>
>>> Can you share a good instruction source?
>>>
>>> Thanks & Regards,
>>>
>>> Quentin
>>>
>>>
>>> --
>>> View this message in context:
>>> http://drools.46999.n3.nabble.com/rules-users-make-the-Guvnor-interface-into-French-tp3737267p3889908.html
>>> Sent from the Drools: User forum mailing list archive at Nabble.com.
>>>  ___
>>> rules-users mailing list
>>> [hidden email] 
>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>
>>
>>
>> ___
>> rules-users mailing list
>> [hidden email] 
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>> --
>>  If you reply to this email, your message will be added to the
>> discussion below:
>>
>> http://drools.46999.n3.nabble.com/rules-users-make-the-Guvnor-interface-into-French-tp3737267p3892685.html
>>  To unsubscribe from [rules-users] make the Guvnor interface into French, 
>> click
>> here.
>> NAML
>>
>
>
> --
> View this message in context: Re: [rules-users] Fwd: Re: make the Guvnor
> interface into 
> French
> Sent from the Drools: User forum mailing list 
> archiveat 
> Nabble.com.
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Fwd: Re: make the Guvnor interface into French

2012-04-24 Thread Qchevalier
Thank you for your answer.
No, I didn't tag the corrections. I will do the fork.
Your 
linkdoesn't
work, I got this :
HTTP Status 404 -
--

*type* Status report

*message*

*description* *The requested resource () is not available.*
--
JBoss Web/2.1.12.GA-patch-03
*Sorry for the delay :), **I was in holidays **.

Regards,

Quenitn
*
2012/4/7 Vincent Legendre [via Drools] <
ml-node+s46999n389268...@n3.nabble.com>

> This is exactly what I did. This procedure works like a charm.
>
> You said "a lot" of errors ? I can't be possible :) !!
> Did you tag your corrections ? the NWELL ?
>
>
>  Message original 
>  Sujet: Re: [rules-users] make the Guvnor interface into French  Date : Fri,
> 6 Apr 2012 21:27:47 +0100  De : Michael Anstis [hidden 
> email]  Répondre
> à : Rules Users List [hidden 
> email]  Pour :
> Rules Users List [hidden 
> email]
>
>
> Hi Quentin,
>
> The droolsjbom-build-bootstrap\README.md is a good source (and kept up to
> date).
>
> The simplest (and preferred) approach might be to fork the github
> repository, apply your changes and submit a pull request.
>
> Please see 
> herefor
>  more information.
>
> With kind regards,
>
> Mike
>
>
> On 6 April 2012 10:53, Qchevalier <[hidden 
> email]
> > wrote:
>
>> Hello,
>>
>> I got your last file (Constants_fr_FR.properties) Vincent, but I found a
>> lot
>> of errors. So here is my corrected file :
>> http://drools.46999.n3.nabble.com/file/n3889908/Constants_fr_FR.properties
>> Constants_fr_FR.properties
>>
>> I didn't manage to integrate this file into the guvnor war file.
>>
>> I understood that I have to rebuild the sources of guvnor, but I didn't
>> manage to do it. I found several documentations about "how to build guvnor
>> sources" but each time it was either old instructions, either partial
>> instructions.
>>
>> Can you share a good instruction source?
>>
>> Thanks & Regards,
>>
>> Quentin
>>
>>
>> --
>> View this message in context:
>> http://drools.46999.n3.nabble.com/rules-users-make-the-Guvnor-interface-into-French-tp3737267p3889908.html
>> Sent from the Drools: User forum mailing list archive at Nabble.com.
>>  ___
>> rules-users mailing list
>> [hidden email] 
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
>
>
> ___
> rules-users mailing list
> [hidden email] 
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://drools.46999.n3.nabble.com/rules-users-make-the-Guvnor-interface-into-French-tp3737267p3892685.html
>  To unsubscribe from [rules-users] make the Guvnor interface into French, 
> click
> here
> .
> NAML
>


--
View this message in context: 
http://drools.46999.n3.nabble.com/Re-rules-users-Fwd-Re-make-the-Guvnor-interface-into-French-tp3935200p3935200.html
Sent from the Drools: User forum mailing list archive at Nabble.com.___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Problem with logging using Drools 5.3.0

2012-04-24 Thread FlyingEagle
Thx Ingo for your reply, but logging with KnowledgeRuntimeLogger is not my
problem.
This works fine.

Drools itself uses log4j for logging of its activites. These log entries are
very helpful for analyzing, what happens in Drools.

For example, I had the following output with the runtime 5.1.0, while
creating a new KnowledgeAgent:
[2012:04:115 14:04:889:info] ResourceChangeNotification created
[2012:04:115 14:04:889:info] ResourceChangeScanner created with default
interval=60
[2012:04:115 14:04:889:debug] ResourceChangeNotification monitor added
monitor=org.drools.io.impl.ResourceChangeScannerImpl@7f5580
[2012:04:115 14:04:889:debug] KnowledgeAgent building resource map
[2012:04:115 14:04:889:info] KnowledgeAgent created, with configuration:
monitorChangeSetEvents=true scanResources=true scanDirectories=true
newInstance=true
[2012:04:115 14:04:889:info] KnowledegAgent has started listening for
ChangeSet notifications

Using now the runtime 5.3.0 I have no such entries anymore.






--
View this message in context: 
http://drools.46999.n3.nabble.com/Problem-with-logging-using-Drools-5-3-0-tp3934918p3935165.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Problem with logging using Drools 5.3.0

2012-04-24 Thread Ingo Beyerlein
Hi FlyingEagle,
might be that you need some listeners generating output.
As soon as you have the session, try 
KnowledgeRuntimeLogger logger =
KnowledgeRuntimeLoggerFactory.newThreadedFileLogger( ksession, "./petshop",
1000 );

And after firing rules apply 

  logger.close();

The thing I don't know is, how the LoggerFactory can be connected to log4j.

Hope I could help,
Ingo

***
Ingo Beyerlein

myToys.de GmbH
A member of the otto group
Bergmannstrasse 72
10961 Berlin

ingo.beyerl...@mytoys.de - www.myToys.de

Amtsgericht Berlin Charlottenburg HRB 77235
Geschaeftsfuehrer: Dr. Oliver Lederle (Vorsitzender), Virpy Richter,
Alexander Lederle 

-Ursprüngliche Nachricht-
Von: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] Im Auftrag von FlyingEagle
Gesendet: Dienstag, 24. April 2012 12:23
An: rules-users@lists.jboss.org
Betreff: [rules-users] Problem with logging using Drools 5.3.0

Hello,

I am debugging my drools application with Eclipse. Using Drools runtime
5.1.0 I've got automatically log entries from Drools on the console window.
Now I am using the 5.3.0 runtime and no log entries are available.
I have defined a log4j.properties and put it in the classpath. As trace
level I have defined ALL.
Own log entries are produced and shown on the console, but no entries from
Drools are shown.

Has anybody an idea, what I can do to get the log entries?

Thx 

--
View this message in context:
http://drools.46999.n3.nabble.com/Problem-with-logging-using-Drools-5-3-0-tp
3934918p3934918.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] How to query rules to create reports to analyze usage

2012-04-24 Thread Wolfgang Laun
For analyzing "rules usage" an AgendaEventListener should be used to
register the information you are interested in. (You wouldn't need to
query the rules DB for this anyway.)

-W

On 24/04/2012, thatz  wrote:
> Am new user to Drools, have 300+ rules, but need to query them using SQL
> syntax to create reports and analyze rules usage (if rules are being called,
> etc.).  App developer said cannot query the rules db directly because it is
> proprietary.  Is there anyway to query rules or what is best way to analyze
> rules usage.  Thanks
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/How-to-query-rules-to-create-reports-to-analyze-usage-tp3934833p3934833.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Problem with logging using Drools 5.3.0

2012-04-24 Thread FlyingEagle
Hello,

I am debugging my drools application with Eclipse. Using Drools runtime
5.1.0 I've got automatically log entries from Drools on the console window.
Now I am using the 5.3.0 runtime and no log entries are available.
I have defined a log4j.properties and put it in the classpath. As trace
level I have defined ALL.
Own log entries are produced and shown on the console, but no entries from
Drools are shown.

Has anybody an idea, what I can do to get the log entries?

Thx 

--
View this message in context: 
http://drools.46999.n3.nabble.com/Problem-with-logging-using-Drools-5-3-0-tp3934918p3934918.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] How to query rules to create reports to analyze usage

2012-04-24 Thread thatz
Am new user to Drools, have 300+ rules, but need to query them using SQL
syntax to create reports and analyze rules usage (if rules are being called,
etc.).  App developer said cannot query the rules db directly because it is
proprietary.  Is there anyway to query rules or what is best way to analyze
rules usage.  Thanks

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-query-rules-to-create-reports-to-analyze-usage-tp3934833p3934833.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users