Re: [rules-users] Drools5 in tomcat 5

2010-05-14 Thread Premkumar Stephen
Ruben,

Drools Server is a web service which executes rules that can be deployed
from Guvnor.

Regards,
Prem


2010/5/14 Rubén Marrero 

> Oh!
>
> I'm tempted to ask _why_ did anyone think that having a great web interface
> where you can create, test, store & version (I would think that at least
> exposing and securing) business tulers simply should fall short of
> _executing_ said rules?  If Guvnor (or some other component, I'm learning
> here) could help me outsource my business rules, I could use in no matter
> what platform/ language. All the java coders could embed it and the rest of
> us could just execute it.
>
> But I won't ask :)
>
> Instead let me rephrase my original question. What's the best way to setup
> a remote server, that can receive my data, go through the rules, and return
> a response? That does not involve java coding? drools-server?
>
> Thanks,
> Rubén
> --
> *De: *"Esteban Aliverti" 
> *Para: *"Rules Users List" 
> *CC: *"Diego Fabian Lopez Ruiz" 
> *Enviados: *Viernes, 14 de Mayo 2010 12:09:35
>
> *Asunto: *Re: [rules-users] Drools5 in tomcat 5
>
> Bad news! Guvnor doesn't execute the rules! It only acts as a repository!
> You can create your rules, test your rules and versioning them too, but if
> you want to execute them in a real business scenario, you have to code it. I
> know Drools already has some modules to do what you are trying to achieve,
> they are drools-pipeline (Which can use camel) or even drools-server (which
> is a simple servlet that executes commands). Unfortunately I'm not an expert
> on those modules, but you can always ask here for help.
>
> Best,
>
> 2010/5/14 Rubén Marrero 
>
>> The idea is to use Guvnor as a REST-accessible BRMS.
>>
>> We'll design, edit, test rules in guvnor, then execute them from the PHP
>> web app in the background (with cURL or something ) or maybe we'll use
>> proper webservices, as long as we can keep thing simple.
>>
>> Since we are already using tomcat 5 as our reporting endpoint, we'd like
>> to just add the guvnor as a web app, as long as guvnor can execute the rules
>> we setup in the nice web interface and respond with a json package to a REST
>> json request.
>>
>> Guvnor _does_ execute rules, right? :-)
>>
>> I'll try removing the jars you mention and then report back.
>>
>> Thx,
>> Rubén
>> --
>> *De: *"Esteban Aliverti" 
>> *Para: *"Rules Users List" 
>> *Enviados: *Viernes, 14 de Mayo 2010 6:49:53
>> *Asunto: *Re: [rules-users] Drools5 in tomcat 5
>>
>>
>> I didn't test Guvnor in Tomcat 5, but I did it in Tomcat 6. The only thing
>> you need to do is to remove el-ri-xxx.jar and el-api-xxx.jar from Guvnors
>> libraries (open the war file, browse to WEB-INF/lib and remove the files).
>> This is because Tomcat already provides this libraries. That is the only
>> thing I have to do when I want to use Guvnor deployed in a Tomcat.
>> And remember that Drools is just a framework (a bunch of jars if you
>> want), so you can use it everywhere: console app, desktop app, web app.
>> Guvnor is a BRMS that you can use to create your rules, manage their life
>> cycle and set as main repository (You can do more things too). It is
>> important to make this distinction, maybe you just want to use drools
>> expert/flow/fusion and not Guvnor.
>>
>> Best,
>>
>> 2010/5/14 Rubén Marrero 
>>
>>> Hi all:
>>>
>>> I want to add drools to a php application. Currently we are using Tomcat
>>> 5 to execute BIRT reports and works great.
>>>
>>> We want to keep using Tomcat (this version in particular) and just drop
>>> the Drools WAR so to disturb as little as possible our current setup.
>>>
>>> Is Tomcat 5 a supported platform to run Drools 5? any pointers to current
>>> docs?
>>>
>>> Thanks in advance,
>>> Rubén
>>>
>>> ___
>>> rules-users mailing list
>>> rules-users@lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>>
>>
>>
>> --
>> 
>>
>> Esteban Aliverti
>>
>> ___
>> 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
>>
>>
>
>
> --
> 
>
> Esteban Aliverti
>
> ___
> 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] NullPointerException @ modify()

2010-05-14 Thread H.C.

OK...the following rules seems to work:


rule "Assign awardable activity to default context"
ruleflow-group "select qualified activity"
when
$context : ResultContext( activity != null &&
activity.qualifiedActivity == null )
$activity : Activity() from $context.activity
$candidate : CandidateMatch( member != null && 
match != null &&
eval( match instanceof QualifiedActivity))
eval(((QualifiedActivity)$candidate.getMatch()).isAwardable())  

then
modify($activity){
setQualifiedActivity((QualifiedActivity) 
$candidate.getMatch());
}   
end


The key seemed to be to modify the activity directly in working memory
rather than traversing to it from the context. Not sure if this gives any
hints towards why drools is throwing a NullPointerException in the prior
case.
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/NullPointerException-modify-tp818403p818575.html
Sent from the Drools - User 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] NullPointerException @ modify()

2010-05-14 Thread H.C.

OK...

Did some digging in drools source code and found this:

Line 151 in RightInputAdapterNode:

// retrieve handle from memory
final InternalFactHandle factHandle = (InternalFactHandle) memory.remove(
tuple );

Tuple value:
[fact 0:-1:0:1711615772:41:null]
[fact
0:40:260358:2136057917:40:com.biperf.optumhealth.domain.activ...@7f51a83d]
[fact
0:1:32722618:32722618:1:com.biperf.optumhealth.rules.resultcont...@1f34eba]

WorkingMemory value:
[fact 0:-1:0:1711615772:41:null]
[fact
0:40:260358:2136057917:40:com.biperf.optumhealth.domain.activ...@7f51a83d]
[fact
0:1:32722618:32722618:1:com.biperf.optumhealth.rules.resultcont...@1f34eba]

After executing the above line, factHandle == null which causes the next
line to throw a NullPointer:

for ( RightTuple rightTuple = factHandle.getRightTuple(); rightTuple !=
null; rightTuple = (RightTuple) rightTuple.getHandleNext() ) {
rightTuple.getRightTupleSink().retractRightTuple( rightTuple,
  context,
  workingMemory
);
}

Be happy to do some more digging given some direction


-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/NullPointerException-modify-tp818403p818479.html
Sent from the Drools - User 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] NullPointerException @ modify()

2010-05-14 Thread H.C.

Oh...and I am using drools 5.1.0-M1...Jdk 1.6 rev 20
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/NullPointerException-modify-tp818403p818414.html
Sent from the Drools - User 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] NullPointerException @ modify()

2010-05-14 Thread H.C.

Hi, 

I am getting a very puzzling NullPointerException when I call modify() on my
object in working memory. I have the following rule:


rule "Assign awardable activity to default context"
ruleflow-group "select qualified activity"
when
$context : ResultContext( activity != null &&
activity.qualifiedActivity == null )
$candidate : CandidateMatch( member != null && 
match != null &&
$awardable : match &&
eval( match instanceof QualifiedActivity) &&
eval(((QualifiedActivity)$awardable).isAwardable()))
$qa : QualifiedActivity() from $candidate.match
then
modify($context){
getActivity().setQualifiedActivity($qa);
}   
end


The NullPointerException happens right at modify($context). I can clearly
see the $context object in working memory and this rule wouldn't fire
without this object having a value anyway.

Here is some activation info for what it's worth:

[Activation rule=Assign awardable activity to default context, tuple=[fact
0:129:21218203:1244484333:141:QualifiedActivity[groupID=TRGT41,activityID=OHC.Self.Physical,evaluateGoal=false,shared=false,awardable=true]]
[fact
0:54:30003599:-98318528:138:com.biperf.optumhealth.domain.candidatema...@fa2943b2]
[fact
0:1:24821875:24821875:1:com.biperf.optumhealth.rules.resultcont...@17ac073]
]

Stacktrace:

org.drools.runtime.rule.ConsequenceException: java.lang.NullPointerException
at
org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:23)
at 
org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:980)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:917)
at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1126)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:697)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:663)
at
org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:200)
at
com.biperf.optumhealth.service.impl.RuleEngineSession.execute(RuleEngineSession.java:89)
at
com.biperf.optumhealth.rules.qualifiedactivity.TestQualifiedActivity.testFindQualifiedActivity(TestQualifiedActivity.java:88)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
at
org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
at
org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
at
org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
at
org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
at
org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
at
org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
at 
org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
at
org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.NullPointerException
at
org.drools.reteoo.RightInputAdapterNode.retractLeftTuple(RightInputAdapterNode.java:153)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateRetractLeftTuple(SingleLeftTupleSinkAdapter.java:131)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateRetractLeftTuple(SingleLeftTupleSinkAdapter.java:42)
at org.drools.reteoo.ExistsNode.retractLeftTuple(ExistsNode.java:356)
at
org.drools.reteoo.CompositeLeftTupleSinkAdapter.doPr

Re: [rules-users] Drools5 in tomcat 5

2010-05-14 Thread Esteban Aliverti
Again, I think drools-server or drools-pipeline is your answer. Try to
search for examples using them. As I already said, I'm not an expert in this
area :(

2010/5/14 Rubén Marrero 

> Oh!
>
> I'm tempted to ask _why_ did anyone think that having a great web interface
> where you can create, test, store & version (I would think that at least
> exposing and securing) business tulers simply should fall short of
> _executing_ said rules?  If Guvnor (or some other component, I'm learning
> here) could help me outsource my business rules, I could use in no matter
> what platform/ language. All the java coders could embed it and the rest of
> us could just execute it.
>
> But I won't ask :)
>
> Instead let me rephrase my original question. What's the best way to setup
> a remote server, that can receive my data, go through the rules, and return
> a response? That does not involve java coding? drools-server?
>
> Thanks,
> Rubén
> --
> *De: *"Esteban Aliverti" 
> *Para: *"Rules Users List" 
> *CC: *"Diego Fabian Lopez Ruiz" 
> *Enviados: *Viernes, 14 de Mayo 2010 12:09:35
>
> *Asunto: *Re: [rules-users] Drools5 in tomcat 5
>
> Bad news! Guvnor doesn't execute the rules! It only acts as a repository!
> You can create your rules, test your rules and versioning them too, but if
> you want to execute them in a real business scenario, you have to code it. I
> know Drools already has some modules to do what you are trying to achieve,
> they are drools-pipeline (Which can use camel) or even drools-server (which
> is a simple servlet that executes commands). Unfortunately I'm not an expert
> on those modules, but you can always ask here for help.
>
> Best,
>
> 2010/5/14 Rubén Marrero 
>
>> The idea is to use Guvnor as a REST-accessible BRMS.
>>
>> We'll design, edit, test rules in guvnor, then execute them from the PHP
>> web app in the background (with cURL or something ) or maybe we'll use
>> proper webservices, as long as we can keep thing simple.
>>
>> Since we are already using tomcat 5 as our reporting endpoint, we'd like
>> to just add the guvnor as a web app, as long as guvnor can execute the rules
>> we setup in the nice web interface and respond with a json package to a REST
>> json request.
>>
>> Guvnor _does_ execute rules, right? :-)
>>
>> I'll try removing the jars you mention and then report back.
>>
>> Thx,
>> Rubén
>> --
>> *De: *"Esteban Aliverti" 
>> *Para: *"Rules Users List" 
>> *Enviados: *Viernes, 14 de Mayo 2010 6:49:53
>> *Asunto: *Re: [rules-users] Drools5 in tomcat 5
>>
>>
>> I didn't test Guvnor in Tomcat 5, but I did it in Tomcat 6. The only thing
>> you need to do is to remove el-ri-xxx.jar and el-api-xxx.jar from Guvnors
>> libraries (open the war file, browse to WEB-INF/lib and remove the files).
>> This is because Tomcat already provides this libraries. That is the only
>> thing I have to do when I want to use Guvnor deployed in a Tomcat.
>> And remember that Drools is just a framework (a bunch of jars if you
>> want), so you can use it everywhere: console app, desktop app, web app.
>> Guvnor is a BRMS that you can use to create your rules, manage their life
>> cycle and set as main repository (You can do more things too). It is
>> important to make this distinction, maybe you just want to use drools
>> expert/flow/fusion and not Guvnor.
>>
>> Best,
>>
>> 2010/5/14 Rubén Marrero 
>>
>>> Hi all:
>>>
>>> I want to add drools to a php application. Currently we are using Tomcat
>>> 5 to execute BIRT reports and works great.
>>>
>>> We want to keep using Tomcat (this version in particular) and just drop
>>> the Drools WAR so to disturb as little as possible our current setup.
>>>
>>> Is Tomcat 5 a supported platform to run Drools 5? any pointers to current
>>> docs?
>>>
>>> Thanks in advance,
>>> Rubén
>>>
>>> ___
>>> rules-users mailing list
>>> rules-users@lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>>
>>
>>
>> --
>> 
>>
>> Esteban Aliverti
>>
>> ___
>> 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
>>
>>
>
>
> --
> 
>
> Esteban Aliverti
>
> ___
> 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
>
>


-- 


Esteban Aliverti
___
rules-users mailing list
rules-users

[rules-users] How to find ALL active sub/processes for a root process instance?

2010-05-14 Thread tolitius

Having several active processes ( parent + its subprocesses + subprocesses of
the parent subproccesses ):

mysql> select InstanceId, processId, state from processinstanceinfo;
+++---+
| InstanceId  |processId |  state |
+++---+
|   1 |main-flow |   1 |
|   2 |first-level-subprocess-flow  |   1 |
|   3 |second-level-subprocess-flow  |   1 |
+++---+

Having a parent process instance ID, how to programmatically (using the out
of the box framework capabilities) find all _active_ subprocesses? [ of all
levels, e.g. including subprocesses of the parent subprocesses ]?

I would think that the answer is:

StatefulKnowledgeSession session =
knowledgeProvider.loadStatefulKnowledgeSession( sessionId );

WorkflowProcessInstance parentProcess = ( 
WorkflowProcessInstance )
session.getProcessInstance( processInstanceId );

for ( NodeInstance node : parentProcess.getNodeInstances() ) {
   ... ...
}

But no, it only returns a one level of subprocesses.

So two(2) questions here:

1. How to programmatically, using OTB framework features get them?
2. Why does not processInstance"Info" have "Info" about a sub process,
like a PARENT_ID?


Thank you,
/Anatoly
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/How-to-find-ALL-active-sub-processes-for-a-root-process-instance-tp818268p818268.html
Sent from the Drools - User 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] Drools5 in tomcat 5

2010-05-14 Thread Rubén Marrero
Oh! 


I'm tempted to ask _why_ did anyone think that having a great web interface 
where you can create, test, store & version (I would think that at least 
exposing and securing) business tulers simply should fall short of _executing_ 
said rules? If Guvnor (or some other component, I'm learning here) could help 
me outsource my business rules, I could use in no matter what platform/ 
language. All the java coders could embed it and the rest of us could just 
execute it. 


But I won't ask :) 


Instead let me rephrase my original question. What's the best way to setup a 
remote server, that can receive my data, go through the rules, and return a 
response? That does not involve java coding? drools-server? 


Thanks, 
Rubén 

De: "Esteban Aliverti"  
Para: "Rules Users List"  
CC: "Diego Fabian Lopez Ruiz"  
Enviados: Viernes, 14 de Mayo 2010 12:09:35 
Asunto: Re: [rules-users] Drools5 in tomcat 5 

Bad news! Guvnor doesn't execute the rules! It only acts as a repository! You 
can create your rules, test your rules and versioning them too, but if you want 
to execute them in a real business scenario, you have to code it. I know Drools 
already has some modules to do what you are trying to achieve, they are 
drools-pipeline (Which can use camel) or even drools-server (which is a simple 
servlet that executes commands). Unfortunately I'm not an expert on those 
modules, but you can always ask here for help. 


Best, 


2010/5/14 Rubén Marrero < ru...@lingo.mx > 




The idea is to use Guvnor as a REST-accessible BRMS. 


We'll design, edit, test rules in guvnor, then execute them from the PHP web 
app in the background (with cURL or something ) or maybe we'll use proper 
webservices, as long as we can keep thing simple. 


Since we are already using tomcat 5 as our reporting endpoint, we'd like to 
just add the guvnor as a web app, as long as guvnor can execute the rules we 
setup in the nice web interface and respond with a json package to a REST json 
request. 


Guvnor _does_ execute rules, right? :-) 


I'll try removing the jars you mention and then report back. 


Thx, 
Rubén 

De: "Esteban Aliverti" < esteban.alive...@gmail.com > 
Para: "Rules Users List" < rules-users@lists.jboss.org > 
Enviados: Viernes, 14 de Mayo 2010 6:49:53 
Asunto: Re: [rules-users] Drools5 in tomcat 5 




I didn't test Guvnor in Tomcat 5, but I did it in Tomcat 6. The only thing you 
need to do is to remove el-ri-xxx.jar and el-api-xxx.jar from Guvnors libraries 
(open the war file, browse to WEB-INF/lib and remove the files). This is 
because Tomcat already provides this libraries. That is the only thing I have 
to do when I want to use Guvnor deployed in a Tomcat. 
And remember that Drools is just a framework (a bunch of jars if you want), so 
you can use it everywhere: console app, desktop app, web app. Guvnor is a BRMS 
that you can use to create your rules, manage their life cycle and set as main 
repository (You can do more things too). It is important to make this 
distinction, maybe you just want to use drools expert/flow/fusion and not 
Guvnor. 


Best, 


2010/5/14 Rubén Marrero < ru...@lingo.mx > 




Hi all: 


I want to add drools to a php application. Currently we are using Tomcat 5 to 
execute BIRT reports and works great. 


We want to keep using Tomcat (this version in particular) and just drop the 
Drools WAR so to disturb as little as possible our current setup. 


Is Tomcat 5 a supported platform to run Drools 5? any pointers to current docs? 


Thanks in advance, 
Rubén 
___ 
rules-users mailing list 
rules-users@lists.jboss.org 
https://lists.jboss.org/mailman/listinfo/rules-users 




-- 
 

Esteban Aliverti 

___ 
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 




-- 
 

Esteban Aliverti 

___ 
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] Jbilling Drools performance

2010-05-14 Thread Greg Barton
No problem.  I'm not sure how you'd do this in a decision table (it's probably 
pretty trivial) but in DRL you'd do:

rule "makePhoneNumber" 
when
  s: String()
then
  insert(new PhoneNumber(s));
  retract(s);
end

With two caveats: 

1) you need some conditions on the String matched if there are other Strings 
that don't make PhoneNumbers.
2) The rule could use a salience value higher than the pricing rules, but that 
isn't necessary.

Actually, there's a third caveat, and it's a big one: this won't work with 
sequential mode. This is because the rule above would alter working memory with 
the expectation that the pricing rules would react to the change.  If you want 
to use sequential mode you'll have to convert to PhoneNumber objects before 
hand.  I understand that you're using this Jbilling package, but is there no 
way you can put an intermediate adapter between the two?  It'd be as simple as 
inserting "new PhoneNumber(someString)" instead of "someString".

--- On Fri, 5/14/10, Antonio Anderson Souza  
wrote:

From: Antonio Anderson Souza 
Subject: Re: [rules-users] Jbilling Drools performance
To: "Rules Users List" 
Date: Friday, May 14, 2010, 2:16 PM

Dear Greg,

Thanks very much for your reply.

I'm using sequential mode = true

Is there a way to create this PhoneNumber class, and convert the String to the 
PhoneNumber  object inside the Drools? Because I'm using a system called 
JBilling and it send the phoneNumber as a String.



Sorry if those are basic questions, but I'm a newbie in Drools...

Thank you very much,

Antonio Anderson Souza
Voice Technology
http://www.antonioams.com





2010/5/14 Greg Barton 


Right off the bat I'd say try to get rid of the eval usage.  Can you put the 
phone number into an object like this:



class PhoneNumber {
  private char digit0;
  private char digit1;
  ///...same for the rest of the digits

  public char getDigit0() { return digit0; }

  public char getDigit1() { return digit1; }
}

Then the conditions would look like this:

digit0 == '$param'

Behind the scenes hopefully this will optimize better.  The use of eval won't 
optimize well.



Are you using sequential mode?  This might be a good candidate for that if 
setting the price does not trigger any other rules to fire.

--- On Fri, 5/14/10, Antonio Anderson Souza  wrote:



From: Antonio Anderson Souza 


Subject: [rules-users] Jbilling Drools performance
To: "Drools Users Mailing list" 
Date: Friday, May 14, 2010, 1:28 PM



Dear All,

I'm deploying  a
 JBilling using Drools in a Telecom Carrier in Brazil, and I'm using Decision 
tables in xls files to execute the pricing, my pricing table has about 40.000 
rules, and I'm getting a terrible performance about 1.5 minute to execute the 
price of each CDR (Call Detail Record) mediated.







Follow bellow a small piece of my decision table:
















RuleTable Padrao
































CONDITION






CONDITION
ACTION
PRIORITY 


PricingField






PricingManager
manager
salience


name
eval (strValue.charAt(0) == '$param')
eval (strValue.charAt(1) == '$param')
eval (strValue.charAt(2) == '$param')
eval (strValue.charAt(3) == '$param')
eval (strValue.charAt(4) == '$param')
eval (strValue.charAt(5) == '$param')
eval (strValue.charAt(6) == '$param')
eval (strValue.charAt(7) == '$param')
eval (strValue.charAt(8) == '$param')
eval (strValue.charAt(9) == '$param')
eval (strValue.charAt(10) == '$param')
eval (strValue.charAt(11) == '$param')
itemId
setPrice($param)




Campo
Digito1
Digito2
Digito3
Digito4
Digito5
Digito6
Digito7
Digito8
Digito9
 

Re: [rules-users] Jbilling Drools performance

2010-05-14 Thread Antonio Anderson Souza
Dear Greg,

Thanks very much for your reply.

I'm using sequential mode = true

Is there a way to create this PhoneNumber class, and convert the String to
the PhoneNumber object inside the Drools? Because I'm using a system called
JBilling and it send the phoneNumber as a String.

Sorry if those are basic questions, but I'm a newbie in Drools...

Thank you very much,

Antonio Anderson Souza
Voice Technology
http://www.antonioams.com


2010/5/14 Greg Barton 

> Right off the bat I'd say try to get rid of the eval usage.  Can you put
> the phone number into an object like this:
>
> class PhoneNumber {
>   private char digit0;
>   private char digit1;
>   ///...same for the rest of the digits
>
>   public char getDigit0() { return digit0; }
>   public char getDigit1() { return digit1; }
> }
>
> Then the conditions would look like this:
>
> digit0 == '$param'
>
> Behind the scenes hopefully this will optimize better.  The use of eval
> won't optimize well.
>
> Are you using sequential mode?  This might be a good candidate for that if
> setting the price does not trigger any other rules to fire.
>
> --- On *Fri, 5/14/10, Antonio Anderson Souza *wrote:
>
>
> From: Antonio Anderson Souza 
> Subject: [rules-users] Jbilling Drools performance
> To: "Drools Users Mailing list" 
> Date: Friday, May 14, 2010, 1:28 PM
>
>
> Dear All,
>
> I'm deploying  a JBilling using Drools in a Telecom Carrier in Brazil, and
> I'm using Decision tables in xls files to execute the pricing, my pricing
> table has about 40.000 rules, and I'm getting a terrible performance about
> 1.5 minute to execute the price of each CDR (Call Detail Record) mediated.
>
> Follow bellow a small piece of my decision table:
>
>   *RuleTable Padrao* *
> * *
> * *
> * *
> * *
> * *
> * *
> * *
> * *
> * *
> * *
> * *
> * *
> *
>
>  *CONDITION* *CONDITION* *ACTION* *PRIORITY *  *PricingField* *
> PricingManager* *manager* *salience*  name eval (strValue.charAt(0) ==
> '$param') eval (strValue.charAt(1) == '$param') eval (strValue.charAt(2)
> == '$param') eval (strValue.charAt(3) == '$param') eval
> (strValue.charAt(4) == '$param') eval (strValue.charAt(5) == '$param') eval
> (strValue.charAt(6) == '$param') eval (strValue.charAt(7) == '$param') eval
> (strValue.charAt(8) == '$param') eval (strValue.charAt(9) == '$param') eval
> (strValue.charAt(10) == '$param') eval (strValue.charAt(11) == '$param')
> itemId setPrice($param)
>  Campo Digito1 Digito2 Digito3 Digito4 Digito5 Digito6 Digito7 Digito8
> Digito9 Digito10 Digito11 Digito12 ID do Item Preço Ordem
> destinationnumber 5 5 1 1 3 5 8 8 0 1 8 8 300 0.0 1  destinationnumber
> 5 5 1 1 3 5 8 8 0 1 8 7 300 0.0 2  destinationnumber 5 5 1 1 3 5 8 8 0
> 1 8 6 300 0.0 3  destinationnumber 5 5 1 1 3 5 8 8 0 1 8 5 300 0.0
> 4  destinationnumber 5 5 1 1 3 5 8 8 0 1 8 4 300 0.0 5
> destinationnumber 5 5 1 1 3 5 8 8 0 1 8 3 300 0.0 6  destinationnumber
> 5 5 1 1 3 5 8 8 0 1 8 2 300 0.0 7  destinationnumber 5 5 1 1
>
>
>
>
>
>
>
> 300 0.4 8
>
> Is it normal? Are there somebody using Jbilling in a similar way? Does
> anybody can help me?
>
> Best regards,
>
> Antonio Anderson Souza
> Voice Technology
> http://www.antonioams.com
>
>
>
> -Inline Attachment Follows-
>
> ___
> 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] Access to variables form sub-flows

2010-05-14 Thread nanic23

Hi PVM,

You have to declare the variable in both flows, the parent flow as well as
the sub flow. Then you also have to map it to the sub flow node. To do that,
in the parent flow click the sub flow node and in the properties map the
variable in "Parameter In Mapping".

I hope it helps :)

-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Access-to-variables-form-sub-flows-tp817279p818122.html
Sent from the Drools - User 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] Jbilling Drools performance

2010-05-14 Thread Greg Barton
Right off the bat I'd say try to get rid of the eval usage.  Can you put the 
phone number into an object like this:

class PhoneNumber {
  private char digit0;
  private char digit1;
  ///...same for the rest of the digits

  public char getDigit0() { return digit0; }

  public char getDigit1() { return digit1; }
}

Then the conditions would look like this:

digit0 == '$param'

Behind the scenes hopefully this will optimize better.  The use of eval won't 
optimize well.

Are you using sequential mode?  This might be a good candidate for that if 
setting the price does not trigger any other rules to fire.

--- On Fri, 5/14/10, Antonio Anderson Souza  wrote:

From: Antonio Anderson Souza 
Subject: [rules-users] Jbilling Drools performance
To: "Drools Users Mailing list" 
Date: Friday, May 14, 2010, 1:28 PM

Dear All,

I'm deploying  a JBilling using Drools in a Telecom Carrier in Brazil, and I'm 
using Decision tables in xls files to execute the pricing, my pricing table has 
about 40.000 rules, and I'm getting a terrible performance about 1.5 minute to 
execute the price of each CDR (Call Detail Record) mediated.





Follow bellow a small piece of my decision table:
















RuleTable Padrao
































CONDITION




CONDITION
ACTION
PRIORITY 


PricingField




PricingManager
manager
salience


name
eval (strValue.charAt(0) == '$param')
eval (strValue.charAt(1) == '$param')
eval (strValue.charAt(2) == '$param')
eval (strValue.charAt(3) == '$param')
eval (strValue.charAt(4) == '$param')
eval (strValue.charAt(5) == '$param')
eval (strValue.charAt(6) == '$param')
eval (strValue.charAt(7) == '$param')
eval (strValue.charAt(8) == '$param')
eval (strValue.charAt(9) == '$param')
eval (strValue.charAt(10) == '$param')
eval (strValue.charAt(11) == '$param')
itemId
setPrice($param)




Campo
Digito1
Digito2
Digito3
Digito4
Digito5
Digito6
Digito7
Digito8
Digito9
Digito10
Digito11
Digito12
ID do Item
Preço
Ordem


destinationnumber
5
5
1
1
3
5
8
8
0
1
8
8
300
0.0
1


destinationnumber
5
5
1
1
3
5
8
8
0
1
8
7
300
0.0
2


destinationnumber
5
5
1
1
3
5
8
8
0
1
8
6
300
0.0
3


des

[rules-users] Jbilling Drools performance

2010-05-14 Thread Antonio Anderson Souza
Dear All,

I'm deploying  a JBilling using Drools in a Telecom Carrier in Brazil, and
I'm using Decision tables in xls files to execute the pricing, my pricing
table has about 40.000 rules, and I'm getting a terrible performance about
1.5 minute to execute the price of each CDR (Call Detail Record) mediated.

Follow bellow a small piece of my decision table:

  *RuleTable Padrao* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
*

 *CONDITION* *CONDITION* *ACTION* *PRIORITY *  *PricingField* *
PricingManager* *manager* *salience*  name eval (strValue.charAt(0) ==
'$param') eval (strValue.charAt(1) == '$param') eval (strValue.charAt(2) ==
'$param') eval (strValue.charAt(3) == '$param') eval (strValue.charAt(4) ==
'$param') eval (strValue.charAt(5) == '$param') eval (strValue.charAt(6) ==
'$param') eval (strValue.charAt(7) == '$param') eval (strValue.charAt(8) ==
'$param') eval (strValue.charAt(9) == '$param') eval (strValue.charAt(10) ==
'$param') eval (strValue.charAt(11) == '$param') itemId setPrice($param)
 Campo Digito1 Digito2 Digito3 Digito4 Digito5 Digito6 Digito7 Digito8
Digito9 Digito10 Digito11 Digito12 ID do Item Preço Ordem  destinationnumber
5 5 1 1 3 5 8 8 0 1 8 8 300 0.0 1  destinationnumber 5 5 1 1 3 5 8 8 0 1
8 7 300 0.0 2  destinationnumber 5 5 1 1 3 5 8 8 0 1 8 6 300 0.0 3
destinationnumber 5 5 1 1 3 5 8 8 0 1 8 5 300 0.0 4  destinationnumber 5
5 1 1 3 5 8 8 0 1 8 4 300 0.0 5  destinationnumber 5 5 1 1 3 5 8 8 0 1 8
3 300 0.0 6  destinationnumber 5 5 1 1 3 5 8 8 0 1 8 2 300 0.0 7
destinationnumber 5 5 1 1







300 0.4 8

Is it normal? Are there somebody using Jbilling in a similar way? Does
anybody can help me?

Best regards,

Antonio Anderson Souza
Voice Technology
http://www.antonioams.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Schedule Rules to Fire in Drools Expert

2010-05-14 Thread andre . fonseca

 

 Hi all,

It's possible to schedule (and reschedule) rules to fire in Drools Expert?
As my understood the Agenda is a kind of TODO list right? Can I reorder the 
priority of that list so?

Could someone give-me and idea (a pseudo-code or something like that) to show 
that concept?

Thanks In Advance!



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


Re: [rules-users] Drools5 in tomcat 5

2010-05-14 Thread Esteban Aliverti
Bad news! Guvnor doesn't execute the rules! It only acts as a repository!
You can create your rules, test your rules and versioning them too, but if
you want to execute them in a real business scenario, you have to code it. I
know Drools already has some modules to do what you are trying to achieve,
they are drools-pipeline (Which can use camel) or even drools-server (which
is a simple servlet that executes commands). Unfortunately I'm not an expert
on those modules, but you can always ask here for help.

Best,

2010/5/14 Rubén Marrero 

> The idea is to use Guvnor as a REST-accessible BRMS.
>
> We'll design, edit, test rules in guvnor, then execute them from the PHP
> web app in the background (with cURL or something ) or maybe we'll use
> proper webservices, as long as we can keep thing simple.
>
> Since we are already using tomcat 5 as our reporting endpoint, we'd like to
> just add the guvnor as a web app, as long as guvnor can execute the rules we
> setup in the nice web interface and respond with a json package to a REST
> json request.
>
> Guvnor _does_ execute rules, right? :-)
>
> I'll try removing the jars you mention and then report back.
>
> Thx,
> Rubén
> --
> *De: *"Esteban Aliverti" 
> *Para: *"Rules Users List" 
> *Enviados: *Viernes, 14 de Mayo 2010 6:49:53
> *Asunto: *Re: [rules-users] Drools5 in tomcat 5
>
>
> I didn't test Guvnor in Tomcat 5, but I did it in Tomcat 6. The only thing
> you need to do is to remove el-ri-xxx.jar and el-api-xxx.jar from Guvnors
> libraries (open the war file, browse to WEB-INF/lib and remove the files).
> This is because Tomcat already provides this libraries. That is the only
> thing I have to do when I want to use Guvnor deployed in a Tomcat.
> And remember that Drools is just a framework (a bunch of jars if you want),
> so you can use it everywhere: console app, desktop app, web app. Guvnor is a
> BRMS that you can use to create your rules, manage their life cycle and set
> as main repository (You can do more things too). It is important to make
> this distinction, maybe you just want to use drools expert/flow/fusion and
> not Guvnor.
>
> Best,
>
> 2010/5/14 Rubén Marrero 
>
>> Hi all:
>>
>> I want to add drools to a php application. Currently we are using Tomcat 5
>> to execute BIRT reports and works great.
>>
>> We want to keep using Tomcat (this version in particular) and just drop
>> the Drools WAR so to disturb as little as possible our current setup.
>>
>> Is Tomcat 5 a supported platform to run Drools 5? any pointers to current
>> docs?
>>
>> Thanks in advance,
>> Rubén
>>
>> ___
>> rules-users mailing list
>> rules-users@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>
>
> --
> 
>
> Esteban Aliverti
>
> ___
> 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
>
>


-- 


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


Re: [rules-users] Drools5 in tomcat 5

2010-05-14 Thread Rubén Marrero
The idea is to use Guvnor as a REST-accessible BRMS. 


We'll design, edit, test rules in guvnor, then execute them from the PHP web 
app in the background (with cURL or something ) or maybe we'll use proper 
webservices, as long as we can keep thing simple. 


Since we are already using tomcat 5 as our reporting endpoint, we'd like to 
just add the guvnor as a web app, as long as guvnor can execute the rules we 
setup in the nice web interface and respond with a json package to a REST json 
request. 


Guvnor _does_ execute rules, right? :-) 


I'll try removing the jars you mention and then report back. 


Thx, 
Rubén 

De: "Esteban Aliverti"  
Para: "Rules Users List"  
Enviados: Viernes, 14 de Mayo 2010 6:49:53 
Asunto: Re: [rules-users] Drools5 in tomcat 5 

I didn't test Guvnor in Tomcat 5, but I did it in Tomcat 6. The only thing you 
need to do is to remove el-ri-xxx.jar and el-api-xxx.jar from Guvnors libraries 
(open the war file, browse to WEB-INF/lib and remove the files). This is 
because Tomcat already provides this libraries. That is the only thing I have 
to do when I want to use Guvnor deployed in a Tomcat. 
And remember that Drools is just a framework (a bunch of jars if you want), so 
you can use it everywhere: console app, desktop app, web app. Guvnor is a BRMS 
that you can use to create your rules, manage their life cycle and set as main 
repository (You can do more things too). It is important to make this 
distinction, maybe you just want to use drools expert/flow/fusion and not 
Guvnor. 


Best, 


2010/5/14 Rubén Marrero < ru...@lingo.mx > 




Hi all: 


I want to add drools to a php application. Currently we are using Tomcat 5 to 
execute BIRT reports and works great. 


We want to keep using Tomcat (this version in particular) and just drop the 
Drools WAR so to disturb as little as possible our current setup. 


Is Tomcat 5 a supported platform to run Drools 5? any pointers to current docs? 


Thanks in advance, 
Rubén 
___ 
rules-users mailing list 
rules-users@lists.jboss.org 
https://lists.jboss.org/mailman/listinfo/rules-users 




-- 
 

Esteban Aliverti 

___ 
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] removeKnowledgePackage Call Hangs!!

2010-05-14 Thread malkhafaji

OK. So, I did an isolated test, and only tested two KP including this bad
one. Both packages have their complete set of rules. But now, the other
package is able to remove this faulty one.

So, it is when I had my complete set of KPs (about 10 of them) all active,
and then attempted to remove this faulty one that is when I got the
exception. By the way, I caught the exception in my application and moved
on, so it is definitely not hanging.

I hope this serves as a good hint to what is happening. It will take me some
time to go through my KP to find the faulty rule or package. Any ideas what
could cause this error? Apparently this KP that refuses to unload, did
unload in my isolated example (in the same application/code). So, what could
be the problem?
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/removeKnowledgePackage-Call-Hangs-tp815616p817617.html
Sent from the Drools - User 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] Entry-Points can cause NullPointerExceptionand/or no rule firing

2010-05-14 Thread Mark Proctor




Vitor,

Please stop replying to posts with unrelated topics and just changing
the title, it messes up the threaded view in most people's email app.
See here for more details on netiquette:
http://www.jboss.org/drools/lists.html

Mark
On 14/05/2010 15:51, Makewise - Vitor Rui Mendonça wrote:

  
  

  
  
  Hi
Greg!
   
  Thanks for your quick answer.
  I’m having some trouble with absence of events in Drools
(I’ve send
some emails on the mailing list regarding that) and I personally think
it’s
some kind of bug (mine or, probably, drools).
   
  So, I’m looking for some help. Instead of explaining all
over
again, I just point the issue out.
   
  Sorry about this mess, too much time around this problem J
   
  Thanks, once again!
   
  

  



  
  

Vítor
Mendonça Moreira
Analista
/ Programador
Direcção de Investigação e Desenvolvimento

Rua Dr. Francisco Sá Carneiro, nº. 4 r/c esq.
2500 - 206 - Caldas da Rainha
Tel: (+351) 262 832 196
Fax: (+351) 262 186 455
Web: www.makewise.pt
Uma empresa: Grupo Sousa Pedro 




  
  




  

  
   
   
  
  From: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Greg
Barton
  Sent: sexta-feira, 14 de Maio de 2010 15:31
  To: Rules Users List
  Subject: Re: [rules-users] Entry-Points can cause
NullPointerExceptionand/or no rule firing
  
   
  

  

JIRA issues are for reporting bugs in
drools.  Is there a bug you're reporting or do you want help with this
particular problem?

--- On Fri, 5/14/10, Makewise - Vitor Rui Mendonça 
wrote:

From: Makewise - Vitor Rui Mendonça 
Subject: [rules-users] Entry-Points can cause NullPointerException
and/or no rule firing
To: "Rules Users List" 
Date: Friday, May 14, 2010, 8:40 AM


Hi again.
 
First of all, I’m running Drools 5.1.0.SNAPSHOT on
Windows and Eclipse 3.4.
 
I’ve submitted a Jira Issue (https://jira.jboss.org/jira/browse/JBRULES-2511):
“
I've got a system that receives transactions. I want to
implement the following rules: 
- raise an alarm(alarm event) when there aren't any transaction for an
hour (or more); 
- if there's an alarm, no more alarms should be raised; 
- if there's an alarm and the system receives a transaction, that alarm
should be retracted and the system should send an recovery event. 

I've implemented the rules this way: 
- ***start*** rule to insert an "EngineStart" event when the rules
engine starts 
- ***notrx_after_start*** rule to detect absence of transactions during
the first hour 
- ***notrx_after_trx*** rule to detect absence of transactions (during
one hour) after last transaction 
- ***rearm*** rule to detect transactions and rearm the system. 

I made a Maven project with junits, which inserts transactions at
specific time, in order to raise the desired events. 

Two set of tests were made: 
- the rules defined in "default" entry-point: the correspondent junit
gives a NullPointerException in DefaultAgenda 
- the rules defined in "incoming" entry-point: the correspondent junit
doesn't activate the ***rearm*** rule
“
 
The issue has an attachment with junits and rules to play
with.
 
T.I.A.
 


  

  
  
  


  
  Vítor
Mendonça Moreira
  Analista
/ Programador
Direcção de Investigação e Desenvolvimento
  
Rua Dr. Francisco Sá Carneiro, nº. 4 r/c esq.
2500 - 206 - Caldas da Rainha
Tel: (+351) 262 832 196
Fax: (+351) 262 186 455
Web: www.makewise.pt
Uma empresa: Grupo Sousa Pedro
  
  
  
  
  


  
  
  
  

  

 




-Inline Attachment Follows-

___
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] ClassCastException: org.drools.reteoo.RuleTerminalNode$TerminalNodeMemory cannot be cast to org.drools.reteoo.EvalConditionNode$EvalMemory

2010-05-14 Thread Paul Ryan
Thank you Edson and no problem on the reply time I completely understand.

-- Paul Ryan

On May 11, 2010, at 6:27 PM, Edson Tirelli wrote:


   Paul,

   Sorry for taking long to answer but I am on vacations with limited internet 
connection. You can find the changeset for that fix here:

https://jira.jboss.org/jira/browse/JBRULES-2465?page=com.atlassian.jira.ext.fisheye:fisheye-issuepanel


   Edson

2010/5/10 Paul Ryan mailto:pr...@infotrustgroup.com>>
Edson,

Any pointers here we're seeing this all over the place and it's starting to 
become a major problem I'm more than willing to do a merge build and test but I 
really need to know which thing it was that you did to try to fix this.

Thank you very much,

-- Paul Ryan

On May 5, 2010, at 1:43 PM, Paul Ryan wrote:

Any ideas what the svn commit revision was I'd like to patch our code as we're 
trying to get to a production state and this plus the issue reported by Jason 
Smith at 
http://drools-java-rules-engine.46999.n3.nabble.com/no-subject-tt48858.html#a48858
 are holding us back.

Any pointers you have here would be appreciated. As well as a review of his 
code for fixing the removeFactHandle issue pointed out in that thread so I can 
try to apply these patches and see if these issues are fixed.

-- Paul Ryan

On Apr 30, 2010, at 8:49 AM, Edson Tirelli wrote:


   Paul,

   I believe this is related to a problem I fixed in trunk a couple weeks ago. 
Can you please test trunk and let me know if the problem persists?

   Thank you,
Edson

2010/4/29 Paul Ryan mailto:pr...@infotrustgroup.com>>
Hi all,

We're receiving some error messages that we don't understand from rules that 
had conditionals that worked and now don't (no upgrade or anything like that, 
they just stopped working), any clues as to what kinds of things to look for 
when we get an error like the following? (if not we can try to pair down to an 
a test case)

org.drools.runtime.rule.ConsequenceException: java.lang.ClassCastException: 
org.drools.reteoo.RuleTerminalNode$TerminalNodeMemory cannot be cast to 
org.drools.reteoo.EvalConditionNode$EvalMemory
   at 
org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:23)
   at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:943)
   at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:885)
   at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1086)
   at 
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:660)
   at 
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:627)
   at 
org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:183)
   at 
com.infotrustgroup.rules.engine.RulesManager.runRules(RulesManager.java:353)
   at 
com.infotrustgroup.util.rules.RuleFileUtil.runRules(RuleFileUtil.java:406)
   at 
com.infotrustgroup.util.rules.RuleFileUtil.runRules(RuleFileUtil.java:370)
   at com.infotrustgroup.util.rules.RuleRunner.run(RuleRunner.java:395)
   at com.infotrustgroup.util.rules.RuleRunner.call(RuleRunner.java:193)
   at 
com.infotrustgroup.jobs.services.auth.EditionsRulesJobRunner.runRules(EditionsRulesJobRunner.java:87)
Caused by: java.lang.ClassCastException: 
org.drools.reteoo.RuleTerminalNode$TerminalNodeMemory cannot be cast to 
org.drools.reteoo.EvalConditionNode$EvalMemory
   at 
org.drools.reteoo.EvalConditionNode.retractLeftTuple(EvalConditionNode.java:199)
   at 
org.drools.reteoo.CompositeLeftTupleSinkAdapter.doPropagateRetractLeftTuple(CompositeLeftTupleSinkAdapter.java:159)
   at 
org.drools.reteoo.CompositeLeftTupleSinkAdapter.propagateRetractLeftTuple(CompositeLeftTupleSinkAdapter.java:68)
   at org.drools.reteoo.JoinNode.retractLeftTuple(JoinNode.java:231)
   at 
org.drools.reteoo.ObjectTypeNode.retractObject(ObjectTypeNode.java:239)
   at 
org.drools.reteoo.EntryPointNode.retractObject(EntryPointNode.java:195)
   at 
org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:1416)
   at 
org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:1360)
   at 
org.drools.base.DefaultKnowledgeHelper.update(DefaultKnowledgeHelper.java:141)
   at 
org.drools.base.DefaultKnowledgeHelper.update(DefaultKnowledgeHelper.java:154)
   at 
com.infotrustgroup.what.Rule_Transform_SGML_to_XML_0.consequence(Rule_Transform_SGML_to_XML_0.java:48)
   at 
com.infotrustgroup.what.Rule_Transform_SGML_to_XML_0ConsequenceInvoker.evaluate(Rule_Transform_SGML_to_XML_0ConsequenceInvoker.java:34)
   at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:934)
   ... 11 more

Thanks in advance for your help with this,

-- Paul Ryan


___
rules-

Re: [rules-users] Entry-Points can cause NullPointerExceptionand/or no rule firing

2010-05-14 Thread Makewise - Vitor Rui Mendonça
Hi Greg!

 

Thanks for your quick answer.

I’m having some trouble with absence of events in Drools (I’ve send some emails 
on the mailing list regarding that) and I personally think it’s some kind of 
bug (mine or, probably, drools).

 

So, I’m looking for some help. Instead of explaining all over again, I just 
point the issue out.

 

Sorry about this mess, too much time around this problem J

 

Thanks, once again!

 

 

Vítor Mendonça Moreira
Analista / Programador
Direcção de Investigação e Desenvolvimento

Rua Dr. Francisco Sá Carneiro, nº. 4 r/c esq.
2500 - 206 - Caldas da Rainha
Tel: (+351) 262 832 196
Fax: (+351) 262 186 455
Web: www.makewise.pt  
Uma empresa: Grupo Sousa Pedro   

 



 

 

From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Greg Barton
Sent: sexta-feira, 14 de Maio de 2010 15:31
To: Rules Users List
Subject: Re: [rules-users] Entry-Points can cause NullPointerExceptionand/or no 
rule firing

 

JIRA issues are for reporting bugs in drools.  Is there a bug you're reporting 
or do you want help with this particular problem?

--- On Fri, 5/14/10, Makewise - Vitor Rui Mendonça  
wrote:


From: Makewise - Vitor Rui Mendonça 
Subject: [rules-users] Entry-Points can cause NullPointerException and/or no 
rule firing
To: "Rules Users List" 
Date: Friday, May 14, 2010, 8:40 AM

Hi again.

 

First of all, I’m running Drools 5.1.0.SNAPSHOT on Windows and Eclipse 3.4.

 

I’ve submitted a Jira Issue (https://jira.jboss.org/jira/browse/JBRULES-2511 
 ):

“

I've got a system that receives transactions. I want to implement the following 
rules: 
- raise an alarm(alarm event) when there aren't any transaction for an hour (or 
more); 
- if there's an alarm, no more alarms should be raised; 
- if there's an alarm and the system receives a transaction, that alarm should 
be retracted and the system should send an recovery event. 

I've implemented the rules this way: 
- ***start*** rule to insert an "EngineStart" event when the rules engine 
starts 
- ***notrx_after_start*** rule to detect absence of transactions during the 
first hour 
- ***notrx_after_trx*** rule to detect absence of transactions (during one 
hour) after last transaction 
- ***rearm*** rule to detect transactions and rearm the system. 

I made a Maven project with junits, which inserts transactions at specific 
time, in order to raise the desired events. 

Two set of tests were made: 
- the rules defined in "default" entry-point: the correspondent junit gives a 
NullPointerException in DefaultAgenda 
- the rules defined in "incoming" entry-point: the correspondent junit doesn't 
activate the ***rearm*** rule

“

 

The issue has an attachment with junits and rules to play with.

 

T.I.A.

 



Vítor Mendonça Moreira
Analista / Programador
Direcção de Investigação e Desenvolvimento

Rua Dr. Francisco Sá Carneiro, nº. 4 r/c esq.
2500 - 206 - Caldas da Rainha
Tel: (+351) 262 832 196
Fax: (+351) 262 186 455
Web: www.makewise.pt  
Uma empresa: Grupo Sousa Pedro   





 


-Inline Attachment Follows-

___
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] Entry-Points can cause NullPointerException and/or no rule firing

2010-05-14 Thread Greg Barton
JIRA issues are for reporting bugs in drools.  Is there a bug you're reporting or do you want help with this particular problem?--- On Fri, 5/14/10, Makewise - Vitor Rui Mendonça  wrote:From: Makewise - Vitor Rui Mendonça Subject: [rules-users] Entry-Points can cause NullPointerException and/or no rule firingTo: "Rules Users List" Date: Friday, May 14, 2010, 8:40 AM




 





Hi again. 

   

First of all, I’m running Drools 5.1.0.SNAPSHOT on Windows and
Eclipse 3.4. 

   

I’ve submitted a Jira Issue (https://jira.jboss.org/jira/browse/JBRULES-2511): 

“ 

I've got a system that receives transactions. I want to
implement the following rules: 
- raise an alarm(alarm event) when there aren't any transaction for an hour (or
more); 
- if there's an alarm, no more alarms should be raised; 
- if there's an alarm and the system receives a transaction, that alarm should
be retracted and the system should send an recovery event. 

I've implemented the rules this way: 
- ***start*** rule to insert an "EngineStart" event when the rules
engine starts 
- ***notrx_after_start*** rule to detect absence of transactions during the
first hour 
- ***notrx_after_trx*** rule to detect absence of transactions (during one
hour) after last transaction 
- ***rearm*** rule to detect transactions and rearm the system. 

I made a Maven project with junits, which inserts transactions at specific
time, in order to raise the desired events. 

Two set of tests were made: 
- the rules defined in "default" entry-point: the correspondent junit
gives a NullPointerException in DefaultAgenda 
- the rules defined in "incoming" entry-point: the correspondent
junit doesn't activate the ***rearm*** rule 

“ 

   

The issue has an attachment with junits and rules to play with. 

   

T.I.A. 

   




 
  
   
  
 
 
  
  Vítor Mendonça Moreira
  Analista / Programador
  Direcção de Investigação e Desenvolvimento
  
  Rua Dr. Francisco Sá Carneiro, nº. 4 r/c esq.
  2500 - 206 - Caldas da Rainha
  Tel: (+351) 262 832 196
  Fax: (+351) 262 186 455
  Web: www.makewise.pt
  Uma empresa: Grupo Sousa Pedro  
  
  
   
  
 
 
  
  
 


   





 

-Inline Attachment Follows-___rules-users mailing listrules-users@lists.jboss.orghttps://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] Entry-Points can cause NullPointerException and/or no rule firing

2010-05-14 Thread Makewise - Vitor Rui Mendonça
Hi again.

 

First of all, I'm running Drools 5.1.0.SNAPSHOT on Windows and Eclipse 3.4.

 

I've submitted a Jira Issue (https://jira.jboss.org/jira/browse/JBRULES-2511):

"

I've got a system that receives transactions. I want to implement the following 
rules: 
- raise an alarm(alarm event) when there aren't any transaction for an hour (or 
more); 
- if there's an alarm, no more alarms should be raised; 
- if there's an alarm and the system receives a transaction, that alarm should 
be retracted and the system should send an recovery event. 

I've implemented the rules this way: 
- ***start*** rule to insert an "EngineStart" event when the rules engine 
starts 
- ***notrx_after_start*** rule to detect absence of transactions during the 
first hour 
- ***notrx_after_trx*** rule to detect absence of transactions (during one 
hour) after last transaction 
- ***rearm*** rule to detect transactions and rearm the system. 

I made a Maven project with junits, which inserts transactions at specific 
time, in order to raise the desired events. 

Two set of tests were made: 
- the rules defined in "default" entry-point: the correspondent junit gives a 
NullPointerException in DefaultAgenda 
- the rules defined in "incoming" entry-point: the correspondent junit doesn't 
activate the ***rearm*** rule

"

 

The issue has an attachment with junits and rules to play with.

 

T.I.A.

 

 

Vítor Mendonça Moreira
Analista / Programador
Direcção de Investigação e Desenvolvimento

Rua Dr. Francisco Sá Carneiro, nº. 4 r/c esq.
2500 - 206 - Caldas da Rainha
Tel: (+351) 262 832 196
Fax: (+351) 262 186 455
Web: www.makewise.pt
Uma empresa: Grupo Sousa Pedro   

 



 

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


[rules-users] Access to variables form sub-flows

2010-05-14 Thread pvm

hi,
i've create a working set of rules via the Eclipse IDE.
I've now factored my rule set into a sub flow that i want to call twice -
each time with differrent parameters.
i've created the sub-flow .rf file, and added a sub-flow call to it in my
main flow.
I've defined variables for the sub flow by clicking on the background and
using properties.

BUT...

I can't access the variable in the sub flow rule groups! e.g. i define
"isManager" as a variable, and then i write:

if
Agent() // there are plenty of these objects in my knowledge base...
then
system.out.println("found an agent, and the local variable is " +
isManager);

i get an error "isManager cannot be resolved"

? How am i supposed to access a variable in the sub flow?

thanks all...
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Access-to-variables-form-sub-flows-tp817279p817279.html
Sent from the Drools - User 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] Guvnor meant for business users?

2010-05-14 Thread nxg912

Hello All,
We are evaluating Drools for our production implementation with special
focus on the fact that it would let less technical people be able to work
effectively with business logic (once developers provide them with a data
model). We are relatively new to Drools and our impression has not been too
good specially around Guvnor (given that DRL is meant for developers and DSL
is nothing but a simple extension for DRL which business analyst won't be
able to use). Has anyone here used Guvnor or DSL effectively for a
reasonable size implementation?

With Guvnor we are facing some issue which are very basic and Guvnor comes
across as a immature web application from the UI perspective (Because of
being less user friendly, incomplete messages for error situations etc).
Also, its difficult to find help on some simple scenario like the following,

We have a "Customer" class and a "Agreement" class with one to many
relationship. We are trying to build a simple rule that if an "Agreement"
has missed payment (indicated by a boolean inside Agreement class), mark
that "Customer" as bad customer by setting the boolean field inside the
"Customer" class. Its a simple scenario to be build in DRL but how to we
implement this under 'WHEN' and 'THEN' section in guided editor without
using the DRL free forms? It shows an error message that access/write
property for Customer not available in Agreement.

Any thoughts or help in these matters will be really helpful. Also, if there
are some helpful links around Drools that would help getting started with
the implementation, that would be great!

Thanks in advance.
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Guvnor-meant-for-business-users-tp817197p817197.html
Sent from the Drools - User 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] Plugtree’s training course for D rools(tm) in June

2010-05-14 Thread Esteban Aliverti
 Hi people! I’m glad to announce that we (Plug Tree: http://plugtree.com)
are preparing a Plugtree’s training course for Drools(tm) during June in
Boston and/or NY the week after the Redhat(tm) Summit.
These courses are going to cover all the Drools(tm) juicy parts from the
insider perspective of a group of community project committers ;-).
We need to know ASAP who is interested, so we can arrange all the details.
Here you can find more information about the event:
http://plugtree.eventbrite.com/
http://plugtree-ny.eventbrite.com/

Plugtree is not associated in any way with Redhat(tm). Drools is a community
project sponsored by JBoss (tm)

-- 


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


Re: [rules-users] Drools5 in tomcat 5

2010-05-14 Thread Esteban Aliverti
I didn't test Guvnor in Tomcat 5, but I did it in Tomcat 6. The only thing
you need to do is to remove el-ri-xxx.jar and el-api-xxx.jar from Guvnors
libraries (open the war file, browse to WEB-INF/lib and remove the files).
This is because Tomcat already provides this libraries. That is the only
thing I have to do when I want to use Guvnor deployed in a Tomcat.
And remember that Drools is just a framework (a bunch of jars if you want),
so you can use it everywhere: console app, desktop app, web app. Guvnor is a
BRMS that you can use to create your rules, manage their life cycle and set
as main repository (You can do more things too). It is important to make
this distinction, maybe you just want to use drools expert/flow/fusion and
not Guvnor.

Best,

2010/5/14 Rubén Marrero 

> Hi all:
>
> I want to add drools to a php application. Currently we are using Tomcat 5
> to execute BIRT reports and works great.
>
> We want to keep using Tomcat (this version in particular) and just drop the
> Drools WAR so to disturb as little as possible our current setup.
>
> Is Tomcat 5 a supported platform to run Drools 5? any pointers to current
> docs?
>
> Thanks in advance,
> Rubén
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>


-- 


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


Re: [rules-users] Guvnor M1 and jBOSS AS 5.1

2010-05-14 Thread Kessler Bortoluzzi, Mariana
Hi Jervis Liu,

Thanks for your reply.
I removed the libraries, and still get the same error.

Cheers,
Mariana

-Ursprüngliche Nachricht-
Von: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] Im Auftrag von Jervisliu
Gesendet: Freitag, 14. Mai 2010 06:34
An: Rules Users List
Betreff: Re: [rules-users] Guvnor M1 and jBOSS AS 5.1

Hi, Have you tried this?

http://community.jboss.org/docs/DOC-14395?uniqueTitle=false

Cheers,
Jervis Liu

Kessler Bortoluzzi, Mariana wrote:
>
> Hi everyone,
>
> I'm having trouble deploying Guvnor M1 in jBOSS AS 5.1.0.GA.
>
> When I start the AS I become a long list of errors and at the end 
> there is the message:
>
> DEPLOYMENTS IN ERROR:
>
> Deployment 
> "vfsfile:/C:/Programme/JBOSS/jboss-5.1.0.GA/server/default/deploy/d
>
> rools-guvnor.war/" is in error due to the following reason(s): 
> javax.management.
>
> InvalidAttributeValueException: Set attribute has class class 
> org.jboss.securit
>
> y.integration.JNDIBasedSecurityManagement loaded from 
> baseclassloa...@113ca76{vf
>
> sfile:/C:/Programme/JBOSS/jboss-5.1.0.GA/server/default/conf/jboss-service.xml}
>
> that is not assignable to attribute class interface 
> org.jboss.security.ISecurity
>
> Management loaded from 
> baseclassloa...@f47144{vfsfile:/C:/Programme/JBOSS/jboss-
>
> 5.1.0.GA/server/default/deploy/drools-guvnor.war/}
>
> Do any of you know what the problem might be?
>
> best regards,
>
> Mariana
>
> 
>
> ___
> 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