Re: [rules-users] Drools 5.0 -> 5.2 Migration Issue

2011-07-01 Thread Edson Tirelli
   Thanks for reporting. It was a bug indeed. Fixed now.

   Edson

2011/6/30 Wolfgang Laun 

> Hi Steven,
>
> I've been able to reproduce the bug and narrow down why and where it
> occurs. Given a String property 'name' of some fact type, a constraint using
> "not in" such as
>
> $name: name not in ( "Joe", "Jack" )
>
> fails. You can work around by avoiding the binding
>
>name not in ( "Joe", "Jack" )
>
> or by separating the binding from the constraint
>
>$name: name, name not in ( "Joe", "Jack" )
>
>
> In your case, it happens in v1/Direction.drl, the constraint
>
>$t:text not in ("AND", "OR", "THEN")
>
> HTH
> -W
>
> 2011/6/29 Steven Waldren 
>
>> Wolfgang,
>>
>> The ActorType definition is here:
>> https://github.com/openhealthdata/CCR-Validator/blob/drools5.0/src/main/java/org/astm/ccr/ActorType.java
>>
>>
>> The
>> point of this rule (and the other rules in this package) is to "walk"
>> through a very complex object graph and insert the objects into working
>> memory.
>>
>> I do not use the rule attribute "dialect".  The drl in question is here:
>> https://github.com/openhealthdata/CCR-Validator/blob/drools5.0/src/main/resources/rules/core/ActorType.drl
>>
>>
>> I
>> tried to create a simple project that caused the same error, but I create a
>> Class with inner classes similar to ActorType and write a rule like the one
>> in question, but it does not cause the error.
>>
>> Thanks,
>> Steven
>>  --
>> Steven E. Waldren, MD MS
>> Co-founder, Open Health Data
>>
>>
>>
>> On Jun 29, 2011, at 2:49 AM, rules-users-requ...@lists.jboss.org wrote:
>>
>> Date: Wed, 29 Jun 2011 09:49:10 +0200
>> From: Wolfgang Laun 
>> Subject: Re: [rules-users] Drools 5.0 -> 5.2 Migration Issue
>> To: Rules Users List 
>> Message-ID: 
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>>
>> Please provide the type declaration for ActorType.Person, field gender and
>> typicial examples how gender fields are used in other rules. Ideally, if
>> you
>> could reduce your rule set to this simple rule and one other rule, still
>> causeing the same problem.
>>
>> Also, do you use "dialect 'mvel'"?
>>
>> -W
>>
>>
>>
>> ___
>> 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
>
>


-- 
  Edson Tirelli
  JBoss Drools Core Development
  JBoss by Red Hat @ www.jboss.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Is there any way to compress (gzip) the rules package to optimize network traffic between server and agent?

2011-07-01 Thread Geoffrey De Smet
Nothing out-of-the-box AFAIK, but a patch (or better yet a pull request) 
is welcome.

Just wrapping both ends in ZipOutputstream and ZipInputstream should do 
the trick,
but then we'd have always zipping, but we might want it optional.

If we want optional zipping, the client should include a header/argument 
to the server
to ask it in zip format (similar like the HTTP protocol) and the server 
should always support both (just do what the client asks him to do).
That we we don't rely in the client and server having to be configured 
the same and crashing wierdly if they aren't.

Op 01-07-11 16:42, tarley.lana schreef:
> Ok, but I have to modify the class org.drools.agent.impl.KnowledgeAgentImpl
> for it to do unzip the package on the client. There is no standard mechanism
> for this?
>
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/Is-there-any-way-to-compress-gzip-the-rules-package-to-optimize-network-traffic-between-server-and-a-tp3129297p3129523.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
>

-- 
With kind regards,
Geoffrey De Smet


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


Re: [rules-users] Is there any way to compress (gzip) the rules package to optimize network traffic between server and agent?

2011-07-01 Thread tarley.lana
Ok, but I have to modify the class org.drools.agent.impl.KnowledgeAgentImpl
for it to do unzip the package on the client. There is no standard mechanism
for this?

--
View this message in context: 
http://drools.46999.n3.nabble.com/Is-there-any-way-to-compress-gzip-the-rules-package-to-optimize-network-traffic-between-server-and-a-tp3129297p3129523.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 with Spring - Need Help

2011-07-01 Thread sv
Can you be bit elobrate? What version of drools you are using.

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-with-Spring-Need-Help-tp3115948p3129427.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] Is there any way to compress (gzip) the rules package to optimize network traffic between server and agent?

2011-07-01 Thread Michael Anstis
Whilst I don't believe there is anything "out of the box" could you just not
write a JEE5 javax.servlet.Filter to perform the compression for you?

On 1 July 2011 14:28, tarley.lana  wrote:

> We have a drools application composed of almost 1000 rules. The rules
> deployment package has almost 8MB and we need to distribute it over a 100
> Kbps network for offline use on some client machines.
> If we could zip this package, it would require only 237Kbytes (instead
> 8MB).
> It seems, however, the class org.drools.agent.impl.KnowledgeAgentImpl
> doesn't support  gzip compression.
> Is it right? Is there any workaround for this problem?
>
> Thanks in advance.
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Is-there-any-way-to-compress-gzip-the-rules-package-to-optimize-network-traffic-between-server-and-a-tp3129297p3129297.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] Is there any way to compress (gzip) the rules package to optimize network traffic between server and agent?

2011-07-01 Thread tarley.lana
We have a drools application composed of almost 1000 rules. The rules
deployment package has almost 8MB and we need to distribute it over a 100
Kbps network for offline use on some client machines.
If we could zip this package, it would require only 237Kbytes (instead 8MB).
It seems, however, the class org.drools.agent.impl.KnowledgeAgentImpl
doesn't support  gzip compression.
Is it right? Is there any workaround for this problem?

Thanks in advance.

--
View this message in context: 
http://drools.46999.n3.nabble.com/Is-there-any-way-to-compress-gzip-the-rules-package-to-optimize-network-traffic-between-server-and-a-tp3129297p3129297.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] System actions available within RHS

2011-07-01 Thread Wolfgang Laun
All of Java can be used on the RHS of a rule.

Inserting a fact (or event) is done simply by: insert( X )

-W

On 1 July 2011 13:58, jpullmann  wrote:

>  Hello,
>does Drools 5.2. provides API calls for:
> a) advancing the pseudo clock time
> b) inserting a new (aggregate) event into an entry point
>   from within the RHS of a rule ?
>
>  Thank you!
>Jaro
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/System-actions-available-within-RHS-tp3129049p3129049.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] System actions available within RHS

2011-07-01 Thread jpullmann
  Hello, 
does Drools 5.2. provides API calls for: 
 a) advancing the pseudo clock time
 b) inserting a new (aggregate) event into an entry point 
   from within the RHS of a rule ? 

  Thank you!
Jaro

 

--
View this message in context: 
http://drools.46999.n3.nabble.com/System-actions-available-within-RHS-tp3129049p3129049.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] Removing rule (DRL) from resource throwing NullPointerException...

2011-07-01 Thread prashant.badhe

Hi,

I am using Drools Kbase stateful sessions and using "changeset.xml" file to
dynamically load resources (DRL files) from a folder. 
The KnowledgeAgent configuration property 'drools.agent.newInstance' is set
to false.
And the 'drools.resource.scanner.interval' property is set to 1.

As I am using Spring, these properties are passed-in to the agent from
spring-beans.xml.

Now, when I start tomcat, everything works fine (some rules also get fired),
But when I remove a DRL rule from my resource folder following exception is
thrown:

Exception in thread "Thread-8" java.lang.NullPointerException
at
org.drools.reteoo.RuleTerminalNode$RTNCleanupAdapter.cleanUp(RuleTerminalNode.java:507)
at org.drools.reteoo.BetaNode.doRemove(BetaNode.java:253)
at org.drools.common.BaseNode.remove(BaseNode.java:109)
at
org.drools.reteoo.RuleTerminalNode.doRemove(RuleTerminalNode.java:411)
at org.drools.common.BaseNode.remove(BaseNode.java:109)
at
org.drools.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:237)
at
org.drools.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:432)
at
org.drools.common.AbstractRuleBase.removeRule(AbstractRuleBase.java:831)
at
org.drools.common.AbstractRuleBase.removeRule(AbstractRuleBase.java:809)
at
org.drools.impl.KnowledgeBaseImpl.removeRule(KnowledgeBaseImpl.java:206)
at
org.drools.agent.impl.KnowledgeAgentImpl.removeKnowledgeDefinitionFromBase(KnowledgeAgentImpl.java:842)
at
org.drools.agent.impl.KnowledgeAgentImpl.incrementalBuildResources(KnowledgeAgentImpl.java:763)
at
org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:586)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:185)
at
org.drools.agent.impl.KnowledgeAgentImpl$ChangeSetNotificationDetector.run(KnowledgeAgentImpl.java:1106)
at java.lang.Thread.run(Thread.java:662)


Is there anything more that needs to be set for 'changeset' to work for
add/update/remove of resources?

FYI - I am using Drools 5.1.1

Thanks,
Prashant


--
View this message in context: 
http://drools.46999.n3.nabble.com/Removing-rule-DRL-from-resource-throwing-NullPointerException-tp3128955p3128955.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