[rules-users] gwt-console

2010-05-17 Thread Shanika Wijerathna
Hi
Im new to drools. Im trying to get gwt-console work with jboss server. So I
downloaded the gwt-console code from svn (
http://anonsvn.jboss.org/repos/soag/bpm-console/trunk) and when I try
excecute mvn install command from trunk it gives me following error. I tried
googling but I couldn't find a way to get rid of this error. And also in
forums they say that we need to change pom.xml to use drools as defult
profile. Where I can change it? Thanks alot if some one can help me. Im
trying to start learning jboss drools and i have already installed jboss and
Guvnor.

shan...@shanika-laptop:~/JBossDrools/gwtConsole$ mvn -version
Maven version: 2.0.9
Java version: 1.6.0_0
OS name: "linux" version: "2.6.28-18-generic" arch: "i386" Family: "unix"
shan...@shanika-laptop:~/JBossDrools/gwtConsole$ mvn install
[INFO] Scanning for projects...
[INFO]

[ERROR] FATAL ERROR
[INFO]

[INFO] Error building POM (may not be this project's POM).


Project ID: org.jboss.bpm:gwt-console
POM Location: /home/shanika/JBossDrools/gwtConsole/gui/war/pom.xml

Reason: Cannot read project model from interpolating filter of serialized
version. for project org.jboss.bpm:gwt-console at
/home/shanika/JBossDrools/gwtConsole/gui/war/pom.xml


[INFO]

[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Cannot read project model
from interpolating filter of serialized version. for project
org.jboss.bpm:gwt-console at
/home/shanika/JBossDrools/gwtConsole/gui/war/pom.xml
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:378)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:292)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.project.InvalidProjectModelException: Cannot
read project model from interpolating filter of serialized version. for
project org.jboss.bpm:gwt-console at
/home/shanika/JBossDrools/gwtConsole/gui/war/pom.xml
at
org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:882)
at
org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:506)
at
org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:198)
at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:583)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:461)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:535)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:535)
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365)
... 11 more
Caused by:
org.apache.maven.project.interpolation.ModelInterpolationException: Cannot
read project model from interpolating filter of serialized version.
at
org.apache.maven.project.interpolation.RegexBasedModelInterpolator.interpolate(RegexBasedModelInterpolator.java:114)
at
org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(DefaultMavenProjectBuilder.java:1016)
at
org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:878)
... 18 more
Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: markup
not allowed inside attribute value - illegal <  (position: TEXT seen
...https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] error while executing business rules

2010-05-17 Thread Puneet duggal
@ wolfgang,

com.fpl.dsm.busrules.parameters.Para_568
is my fact class or my getter setter class


On 5/17/10, Wolfgang Laun  wrote:
>
> From the stack trace:
>   com.fpl.dsm.busrules.parameters.Para_568
> Maybe this is a hint which rule is causing the problem.
> -W
>
>
> 2010/5/17 Puneet duggal 
>
>> drool 4 , it was provided to us
>> so we have to use it  any thing new in drool5 that can help much ?
>> i dont know which rue is giving error because there are  60 rules
>> and i dnt know how to debug bcz i m having a web application
>> which  loads rules from database.
>>
>> do u know any way to know why its giving error??
>>
>>   On 5/17/10, Esteban Aliverti  wrote:
>>>
>>> Any reason why you are using Drools 4?
>>> Try to figure out which rule is failing and post it here.
>>> I have never used Drools 4. I started from V5.
>>>
>>> 2010/5/17 Puneet duggal 
>>>
 @ esteban,

 i am using drools-compiler-4.0.7.jar

 i dont know which rule is exactlly giving the error
 but while executing i am getting this error
 Any idea ?


 [2010-05-17 09:37:22,419] [FATAL] Error occured while creating rules
 package for parameter : 568 (BusinessRuleServiceImpl.java:2285)

 org.drools.RuntimeDroolsException: unable to determine ValueType for
 Class [class com.fpl.dsm.busrules.parameters.Para_568]

 at
 org.drools.base.ValueType.determineValueType(ValueType.java:222)

 at
 org.drools.base.ClassObjectType.(ClassObjectType.java:56)

 at
 org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:130)

 at
 org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:93)

 at
 org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:69)

 at
 org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:53)

 at
 org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:446)

 at
 org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:304)

 at
 org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:167)

 at
 com.fpl.dsm.service.busrules.BusinessRuleServiceImpl.initializeRuleBase(BusinessRuleServiceImpl.java:2261)

 at
 com.fpl.dsm.util.BusinessRuleUtils.initializeContext(BusinessRuleUtils.java:2304)

 at
 com.fpl.dsm.web.module.action.IncentiveTemplateAction.performLogic(IncentiveTemplateAction.java:292)

 at
 com.fpl.dsm.web.base.DSMBaseAction.execute(DSMBaseAction.java:97)

 at
 org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)

 at
 org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)

 at
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)

 at
 org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)

 at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:743)

 at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

 at
 com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146)

 at
 com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:592)

 at
 com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)

 at
 com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)

 at
 com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748)

 at
 com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)

 at
 com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:122)

 at
 com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)

 at
 com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)

 at
 com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)

 at
 com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)

 at
 com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)

 at
 com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)

 at
 com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)

 at
 com.ibm.i

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

2010-05-17 Thread tolitius

had to go with custom solution... g

audit logs are too heavy 
-- 
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-tp818268p825293.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] Guvnor M1 and jBOSS AS 5.1

2010-05-17 Thread Jervisliu
Kessler Bortoluzzi, Mariana wrote:
> Hi Jervis Liu,
>
> Thanks for your reply.
> I removed the libraries, and still get the same error.
>
>   
What version of Guvnor are you using? When you said M1, did you mean the 
drools-guvnor.war from Drools 5.1 M1?


> 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
>   

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


Re: [rules-users] NullPointerException @ modify()

2010-05-17 Thread H.C.

I resorted to rolling back our Drools version to 5.0.1 and the code works
without changes. So...guess this must be a bug with 5.1.0-M1.


-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/NullPointerException-modify-tp818403p824720.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] Access to variables form sub-flows

2010-05-17 Thread nanic23

try kcontext.getVariable("isManager")
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Access-to-variables-form-sub-flows-tp817279p824541.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-17 Thread H.C.

OK...still running into this...

Is this a bug? Anyone from the drools team here?
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/NullPointerException-modify-tp818403p824515.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] removeKnowledgePackage Call Hangs!!

2010-05-17 Thread malkhafaji

Any help is appreciated. I am stuck on this. I stripped everything down to
two simple drls, and one of them loads the other as a new KP, and then tries
to unload it.

Any ideas why the removeKnowledgePackage could possibly throw a
NullPointerException in M1?? This is really hurting us as we are going live
with this in a couple of weeks or so.

Any help would be greatly appreciated!
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/removeKnowledgePackage-Call-Hangs-tp815616p824494.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] get image of flow from xml

2010-05-17 Thread Daniel Gimenes
I'm trying to show an image of a workflow on a web page, based on it's xml.

I've first tried to do this by using drools-eclipse project functionality of
export workflows as images, but gave up because the project has many
dependencies.

Then I tried the drools-guvnor, which do exactly what I want, but it's
developed using GWT. My problem i'm having now is with using drools-guvnor
jar in my GWT project, and then i'll still have to integrate it with SEAM. I


want to know if this can be done. Have someone already done this before? Is
there a better way?
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] [Drools Fusion] Can't detect 2 occurrences with sliding window

2010-05-17 Thread Wolfgang Laun
Try this sequence:

advance clock from 0 to Fri Apr 30 18:26:47 CEST 2010
insert 1st operation
advance clock to next time
insert 2nd operation
fireAllRules

-W



2010/5/17 Xavier Coulon 

> Hello Wolfgang,
>
> Thanks for you answer. I changed my JUnit test method to the following :
>
>
> @Test
> public void testActivity() throws IOException, ParseException,
> InterruptedException {
> // parse the log file
> Resource logFile = new ClassPathResource(
> "activity/activite18h20-18h30-tpcnop01s-extract.log");
>
> // converter and inject tracks in the session,
> List logLines = FileUtils.readLines(logFile.getFile(),
> "UTF-8");
>
> // fire all rules
> session.fireAllRules();
> LOGGER.info("loading events");
> // load events from stream
> for (String logLine : logLines) {
> Operation operation = LineConverterUtil.getOperation(logLine);
> LOGGER.debug("Moving clock from "
> + (new Date(clock.getCurrentTime())).toString() + " to
> "
> + operation.getDate());
> *clock.advanceTime(operation.getDate().getTime()*
> *
> - clock.getCurrentTime(), TimeUnit.MILLISECONDS);
> session.fireAllRules();
> *
> **// clock.advanceTime(10, TimeUnit.SECONDS);
> LOGGER.debug("Inserting " + operation);
>
> FactHandle operationHandle = entryPoint.insert(operation);
> LOGGER.debug("Insertion done: " +
> operationHandle.toExternalForm());
>
> }
> LOGGER.info("done with events");
> // check...
> Assert.assertTrue("Rule not fired...", listener
> .isRuleFired("overActivity"));
> }
>
> But it still does not work : the first "operation" is retracted from the
> session when the clock is moved (see my logs below), yet the window of 60s
> is not expired (18:26:47 to 18:27:11)
>
> Console> 2010-05-17 14:08:22|DEBUG||DroolsRulesTestCase.testActivity|Moving
> clock from Thu Jan 01 01:00:00 CET 1970 to Fri Apr 30 18:26:47 CEST 2010
> Console> 2010-05-17
> 14:08:22|DEBUG||DroolsRulesTestCase.testActivity|Inserting Operation
> [date=Fri Apr 30 18:26:47 CEST 2010, executionTime=1, hostname=server1,
> ipAddress=1.2.3.4, operation=null, requestSize=0, responseSize=0]
> *Console> 2010-05-17 14:08:22|WARN
> ||TrackingWorkingMemoryEventListener.objectInserted|Object inserted: [event
> fid:1:1:Operation [date=Fri Apr 30 18:26:47 CEST 2010, executionTime=1,
> hostname=server1, ipAddress=1.2.3.4, operation=null, r*equestSize=0,
> responseSize=0]]
> Console> 2010-05-17
> 14:08:22|DEBUG||DroolsRulesTestCase.testActivity|Insertion done: [event
> fid:1:1:Operation [date=Fri Apr 30 18:26:47 CEST 2010, executionTime=1,
> hostname=server1, ipAddress=1.2.3.4, operation=null, requestSize=0,
> responseSize=0]]
> *Console> 2010-05-17
> 14:08:22|DEBUG||DroolsRulesTestCase.testActivity|Moving clock from Fri Apr
> 30 18:26:47 CEST 2010 to Fri Apr 30 18:27:11 CEST 2010
> **Console> 2010-05-17 14:08:22|WARN
> ||TrackingWorkingMemoryEventListener.objectRetracted|Object retracted:
> [event fid:1:1:Operation [date=Fri Apr 30 18:26:47 CEST 2010,
> executionTime=1, *hostname=server1, ipAddress=1.2.3.4, operation=null,
> requestSize=0, responseSize=0]]
> Console> 2010-05-17
> 14:08:22|DEBUG||DroolsRulesTestCase.testActivity|Inserting Operation
> [date=Fri Apr 30 18:27:11 CEST 2010, executionTime=164, hostname=server1,
> ipAddress=1.2.3.4, operation=CONSULTATION, requestSize=1299,
> responseSize=895]
>
>
> My code is based on an example from the "Drools JBoss Rules 5.0 developer
> guide" (chapt 7)
>
> Any idea ?
>
> Thank you in advance
> Regards,
> Xavier
>
> 2010/5/17 Wolfgang Laun 
>
> You are inserting Operation facts, interleaved with advancing the clock,
>> both of which correctly updates the agenda and eliminates the facts that
>> are pseudo-too-old to matter.
>>
>> But you are never goiving the Engine a chance to fire - until it is
>> pseudo-too-late.
>>
>> Either you call session.fireUntilHalt() in a separate thread or, for unit
>> test, call
>> fireAllRules() after each clock manipulation.
>>
>> HTH
>> -W
>>
>>
>>
>> On Mon, May 17, 2010 at 11:18 AM, Xavier Coulon wrote:
>>
>>>
>>> Hello,
>>>
>>> I'm new to Drools (5.0.1) and i've tryied the following (basic) fusion
>>> rule
>>> for a few days now without success.
>>> The rule is to determine if a user performs 2 operations in the sliding
>>> window of 60s. In such a condition, a log message should be triggered.
>>>
>>> Here is my DRL code :
>>>
>>> # declare events
>>> declare Operation
>>>@role(event)
>>>@timestamp(date)
>>> end
>>>
>>> rule "overActivity"
>>> dialect "mvel"
>>>when
>>>#condition : 2 operation in less than 1 minute
>>>$operation1 : Operation()
>>>over window:time(60s) from entry-point
>>> "OperationStream"
>>>  

Re: [rules-users] Drools5 in tomcat 5

2010-05-17 Thread Rubén Marrero
thanks a lot! 


I'm trying to setup a decision service, _without_ having to code in java. 


I'm kind of swamped at the moment in other stuff but will get back to this ASAP 
and report back. 


Thanks again, 
Rubén 


De: "Jervisliu"  
Para: "Rules Users List"  
Enviados: Lunes, 17 de Mayo 2010 1:25:32 
Asunto: Re: [rules-users] Drools5 in tomcat 5 

Examples below shows how to use drools Camel integration. With Camel 
integration, you can host drools rule engine as a Camel service. The 
service can be based on Web services, REST, JMS or whatever capabilities 
Camel offers. 
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-pipeline/drools-camel/src/test/java/org/drools/camel/component
 

You can also use Drools pipeline to expose a drools rule engine as 
service. For example, example below is exposing Drools through JMS: 
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-pipeline/drools-messenger-jms/src/test/java/org/drools/runtime/pipeline/impl/SimpleJmsMessengerTest.java
 

If you do a google search, you can also find some nice docs on how to 
use drools-pipeline to expose drools engine as web services etc. 

Hope this helps, 
Jervis 


Rubén Marrero wrote: 
> 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 mailto: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"  > 
> *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 mailto: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 

Re: [rules-users] error while executing business rules

2010-05-17 Thread Wolfgang Laun
>From the stack trace:
  com.fpl.dsm.busrules.parameters.Para_568
Maybe this is a hint which rule is causing the problem.
-W


2010/5/17 Puneet duggal 

> drool 4 , it was provided to us
> so we have to use it  any thing new in drool5 that can help much ?
> i dont know which rue is giving error because there are  60 rules
> and i dnt know how to debug bcz i m having a web application
> which  loads rules from database.
>
> do u know any way to know why its giving error??
>
> On 5/17/10, Esteban Aliverti  wrote:
>>
>> Any reason why you are using Drools 4?
>> Try to figure out which rule is failing and post it here.
>> I have never used Drools 4. I started from V5.
>>
>> 2010/5/17 Puneet duggal 
>>
>>> @ esteban,
>>>
>>> i am using drools-compiler-4.0.7.jar
>>>
>>> i dont know which rule is exactlly giving the error
>>> but while executing i am getting this error
>>> Any idea ?
>>>
>>>
>>> [2010-05-17 09:37:22,419] [FATAL] Error occured while creating rules
>>> package for parameter : 568 (BusinessRuleServiceImpl.java:2285)
>>>
>>> org.drools.RuntimeDroolsException: unable to determine ValueType for
>>> Class [class com.fpl.dsm.busrules.parameters.Para_568]
>>>
>>> at
>>> org.drools.base.ValueType.determineValueType(ValueType.java:222)
>>>
>>> at
>>> org.drools.base.ClassObjectType.(ClassObjectType.java:56)
>>>
>>> at
>>> org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:130)
>>>
>>> at
>>> org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:93)
>>>
>>> at
>>> org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:69)
>>>
>>> at
>>> org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:53)
>>>
>>> at
>>> org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:446)
>>>
>>> at
>>> org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:304)
>>>
>>> at
>>> org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:167)
>>>
>>> at
>>> com.fpl.dsm.service.busrules.BusinessRuleServiceImpl.initializeRuleBase(BusinessRuleServiceImpl.java:2261)
>>>
>>> at
>>> com.fpl.dsm.util.BusinessRuleUtils.initializeContext(BusinessRuleUtils.java:2304)
>>>
>>> at
>>> com.fpl.dsm.web.module.action.IncentiveTemplateAction.performLogic(IncentiveTemplateAction.java:292)
>>>
>>> at
>>> com.fpl.dsm.web.base.DSMBaseAction.execute(DSMBaseAction.java:97)
>>>
>>> at
>>> org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
>>>
>>> at
>>> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
>>>
>>> at
>>> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
>>>
>>> at
>>> org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
>>>
>>> at
>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
>>>
>>> at
>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>>>
>>> at
>>> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146)
>>>
>>> at
>>> com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:592)
>>>
>>> at
>>> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)
>>>
>>> at
>>> com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
>>>
>>> at
>>> com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748)
>>>
>>> at
>>> com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)
>>>
>>> at
>>> com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:122)
>>>
>>> at
>>> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
>>>
>>> at
>>> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
>>>
>>> at
>>> com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
>>>
>>> at
>>> com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
>>>
>>> at
>>> com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
>>>
>>> at
>>> com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
>>>
>>> at
>>> com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
>>>
>>> at
>>> com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
>>>
>>> at
>>> com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
>>>
>>> at
>>> com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
>>>
>>> at
>>> com.ib

Re: [rules-users] error while executing business rules

2010-05-17 Thread Puneet duggal
drool 4 , it was provided to us
so we have to use it  any thing new in drool5 that can help much ?
i dont know which rue is giving error because there are  60 rules
and i dnt know how to debug bcz i m having a web application
which  loads rules from database.

do u know any way to know why its giving error??

On 5/17/10, Esteban Aliverti  wrote:
>
> Any reason why you are using Drools 4?
> Try to figure out which rule is failing and post it here.
> I have never used Drools 4. I started from V5.
>
> 2010/5/17 Puneet duggal 
>
>> @ esteban,
>>
>> i am using drools-compiler-4.0.7.jar
>>
>> i dont know which rule is exactlly giving the error
>> but while executing i am getting this error
>> Any idea ?
>>
>>
>> [2010-05-17 09:37:22,419] [FATAL] Error occured while creating rules
>> package for parameter : 568 (BusinessRuleServiceImpl.java:2285)
>>
>> org.drools.RuntimeDroolsException: unable to determine ValueType for Class
>> [class com.fpl.dsm.busrules.parameters.Para_568]
>>
>> at
>> org.drools.base.ValueType.determineValueType(ValueType.java:222)
>>
>> at
>> org.drools.base.ClassObjectType.(ClassObjectType.java:56)
>>
>> at
>> org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:130)
>>
>> at
>> org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:93)
>>
>> at
>> org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:69)
>>
>> at
>> org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:53)
>>
>> at
>> org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:446)
>>
>> at
>> org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:304)
>>
>> at
>> org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:167)
>>
>> at
>> com.fpl.dsm.service.busrules.BusinessRuleServiceImpl.initializeRuleBase(BusinessRuleServiceImpl.java:2261)
>>
>> at
>> com.fpl.dsm.util.BusinessRuleUtils.initializeContext(BusinessRuleUtils.java:2304)
>>
>> at
>> com.fpl.dsm.web.module.action.IncentiveTemplateAction.performLogic(IncentiveTemplateAction.java:292)
>>
>> at
>> com.fpl.dsm.web.base.DSMBaseAction.execute(DSMBaseAction.java:97)
>>
>> at
>> org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
>>
>> at
>> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
>>
>> at
>> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
>>
>> at
>> org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
>>
>> at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
>>
>> at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>>
>> at
>> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146)
>>
>> at
>> com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:592)
>>
>> at
>> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)
>>
>> at
>> com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
>>
>> at
>> com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748)
>>
>> at
>> com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)
>>
>> at
>> com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:122)
>>
>> at
>> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
>>
>> at
>> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
>>
>> at
>> com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
>>
>> at
>> com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
>>
>> at
>> com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
>>
>> at
>> com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
>>
>> at
>> com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
>>
>> at
>> com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
>>
>> at
>> com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
>>
>> at
>> com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
>>
>> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)
>>
>>
>>
>> On 5/17/10, Esteban Aliverti  wrote:
>>>
>>> Try to be a little more specific. Which version of drools are you using?
>>> How your rule looks like? What are you trying to do?
>>>
>>>
>>> Best,
>>>
>>>
>>> 2010/5/17 Puneet duggal 
>>>

Re: [rules-users] error while executing business rules

2010-05-17 Thread Esteban Aliverti
Any reason why you are using Drools 4?
Try to figure out which rule is failing and post it here.
I have never used Drools 4. I started from V5.

2010/5/17 Puneet duggal 

> @ esteban,
>
> i am using drools-compiler-4.0.7.jar
>
> i dont know which rule is exactlly giving the error
> but while executing i am getting this error
> Any idea ?
>
>
> [2010-05-17 09:37:22,419] [FATAL] Error occured while creating rules
> package for parameter : 568 (BusinessRuleServiceImpl.java:2285)
>
> org.drools.RuntimeDroolsException: unable to determine ValueType for Class
> [class com.fpl.dsm.busrules.parameters.Para_568]
>
> at
> org.drools.base.ValueType.determineValueType(ValueType.java:222)
>
> at
> org.drools.base.ClassObjectType.(ClassObjectType.java:56)
>
> at
> org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:130)
>
> at
> org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:93)
>
> at
> org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:69)
>
> at
> org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:53)
>
> at
> org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:446)
>
> at
> org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:304)
>
> at
> org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:167)
>
> at
> com.fpl.dsm.service.busrules.BusinessRuleServiceImpl.initializeRuleBase(BusinessRuleServiceImpl.java:2261)
>
> at
> com.fpl.dsm.util.BusinessRuleUtils.initializeContext(BusinessRuleUtils.java:2304)
>
> at
> com.fpl.dsm.web.module.action.IncentiveTemplateAction.performLogic(IncentiveTemplateAction.java:292)
>
> at
> com.fpl.dsm.web.base.DSMBaseAction.execute(DSMBaseAction.java:97)
>
> at
> org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
>
> at
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
>
> at
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
>
> at
> org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>
> at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146)
>
> at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:592)
>
> at
> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)
>
> at
> com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
>
> at
> com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748)
>
> at
> com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)
>
> at
> com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:122)
>
> at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
>
> at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
>
> at
> com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
>
> at
> com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
>
> at
> com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
>
> at
> com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
>
> at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
>
> at
> com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
>
> at
> com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
>
> at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
>
> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)
>
>
>
> On 5/17/10, Esteban Aliverti  wrote:
>>
>> Try to be a little more specific. Which version of drools are you using?
>> How your rule looks like? What are you trying to do?
>>
>>
>> Best,
>>
>>
>> 2010/5/17 Puneet duggal 
>>
>>>  hi friends ,
>>>
>>> I am getting the error while executing the business rule
>>>
>>>
>>>
>>> [2010-05-17 09:37:22,419] [FATAL] Error occured while creating rules
>>> package for parameter : 568 (BusinessRuleServiceImpl.java:2285)
>>>
>>> org.drools.RuntimeDroolsException: unable to determine ValueType for
>>> Class [class com.fpl.dsm.busrules.parameters.Para_568]
>>>
>>>
>>>
>>>
>>>
>>> what this mean?
>>>
>>> ___
>>> rules-users mailing list
>>> rules-use

Re: [rules-users] error while executing business rules

2010-05-17 Thread Puneet duggal
@ esteban,

i am using drools-compiler-4.0.7.jar

i dont know which rule is exactlly giving the error
but while executing i am getting this error
Any idea ?


[2010-05-17 09:37:22,419] [FATAL] Error occured while creating rules package
for parameter : 568 (BusinessRuleServiceImpl.java:2285)

org.drools.RuntimeDroolsException: unable to determine ValueType for Class
[class com.fpl.dsm.busrules.parameters.Para_568]

at
org.drools.base.ValueType.determineValueType(ValueType.java:222)

at
org.drools.base.ClassObjectType.(ClassObjectType.java:56)

at
org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:130)

at
org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:93)

at
org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:69)

at
org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:53)

at
org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:446)

at
org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:304)

at
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:167)

at
com.fpl.dsm.service.busrules.BusinessRuleServiceImpl.initializeRuleBase(BusinessRuleServiceImpl.java:2261)

at
com.fpl.dsm.util.BusinessRuleUtils.initializeContext(BusinessRuleUtils.java:2304)

at
com.fpl.dsm.web.module.action.IncentiveTemplateAction.performLogic(IncentiveTemplateAction.java:292)

at
com.fpl.dsm.web.base.DSMBaseAction.execute(DSMBaseAction.java:97)

at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)

at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)

at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)

at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146)

at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:592)

at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)

at
com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)

at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748)

at
com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)

at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:122)

at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)

at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)

at
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)

at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)

at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)

at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)

at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)

at
com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)

at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)

at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)

at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)



On 5/17/10, Esteban Aliverti  wrote:
>
> Try to be a little more specific. Which version of drools are you using?
> How your rule looks like? What are you trying to do?
>
>
> Best,
>
>
> 2010/5/17 Puneet duggal 
>
>>  hi friends ,
>>
>> I am getting the error while executing the business rule
>>
>>
>>
>> [2010-05-17 09:37:22,419] [FATAL] Error occured while creating rules
>> package for parameter : 568 (BusinessRuleServiceImpl.java:2285)
>>
>> org.drools.RuntimeDroolsException: unable to determine ValueType for Class
>> [class com.fpl.dsm.busrules.parameters.Para_568]
>>
>>
>>
>>
>>
>> what this mean?
>>
>> ___
>> 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-us

Re: [rules-users] error while executing business rules

2010-05-17 Thread Esteban Aliverti
Try to be a little more specific. Which version of drools are you using? How
your rule looks like? What are you trying to do?

Best,


2010/5/17 Puneet duggal 

> hi friends ,
>
> I am getting the error while executing the business rule
>
>
>
> [2010-05-17 09:37:22,419] [FATAL] Error occured while creating rules
> package for parameter : 568 (BusinessRuleServiceImpl.java:2285)
>
> org.drools.RuntimeDroolsException: unable to determine ValueType for Class
> [class com.fpl.dsm.busrules.parameters.Para_568]
>
>
>
>
>
> what this mean?
>
> ___
> 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] error while executing business rules

2010-05-17 Thread Puneet duggal
hi friends ,

I am getting the error while executing the business rule



[2010-05-17 09:37:22,419] [FATAL] Error occured while creating rules package
for parameter : 568 (BusinessRuleServiceImpl.java:2285)

org.drools.RuntimeDroolsException: unable to determine ValueType for Class
[class com.fpl.dsm.busrules.parameters.Para_568]





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


Re: [rules-users] Time Taken To Load Rule Resource

2010-05-17 Thread Esteban Aliverti
Yes, you can compile your rules once and save them as binary files. Here is
a code snippet to do that:

   * KnowledgePackage pkg = (KnowledgePackage) kbuilder** **
.getKnowledgePackages().iterator().next();*
*FileOutputStream out = new
FileOutputStream("/some/file.pkg");*
* **try {*
* **DroolsStreamUtils.streamOut(out, pkg);*
* **} finally {*
* **out.close();*
* **}*

The code above only uses kbuilder's first package.
The way you load a binary package is the same as you do for DRL files:

*
kbuilder.add(ResourceFactory.newFileResource("/some/file.pkg",
ResourceType.PKG);
*

Hope you find this useful!

Best,

2010/5/17 Adeyinka Timi 

>  Thanks for your reply!
>
> No particular reason. Is there a better of going about this – avoid
> compilation of rules everytime?
>
>
>  --
>
> *From:* rules-users-boun...@lists.jboss.org [mailto:
> rules-users-boun...@lists.jboss.org] *On Behalf Of *Esteban Aliverti
> *Sent:* 17 May 2010 14:09
> *To:* Rules Users List
> *Subject:* Re: [rules-users] Time Taken To Load Rule Resource
>
>
>
> Is there any reason why you need to compile the rules every time your app
> starts?
>
> 2010/5/17 Adeyinka Timi 
>
> Hi guys,
>
>
>
> I have a drools application running that takes about 7 seconds to run. 5
> seconds of this time is used in parsing 2 DRL files that 200kb (6200 lines
> of code) and 34kb (1400 lines of code). Do you guys have any tips or any
> techniques that I can use to improve performance?
>
>
>
>
>
> - Ade
>
>
> ___
> 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
>
>


-- 


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


Re: [rules-users] Time Taken To Load Rule Resource

2010-05-17 Thread Adeyinka Timi
Thanks for your reply!

No particular reason. Is there a better of going about this - avoid
compilation of rules everytime?

 

  _  

From: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Esteban Aliverti
Sent: 17 May 2010 14:09
To: Rules Users List
Subject: Re: [rules-users] Time Taken To Load Rule Resource

 

Is there any reason why you need to compile the rules every time your app
starts? 

2010/5/17 Adeyinka Timi 

Hi guys,

 

I have a drools application running that takes about 7 seconds to run. 5
seconds of this time is used in parsing 2 DRL files that 200kb (6200 lines
of code) and 34kb (1400 lines of code). Do you guys have any tips or any
techniques that I can use to improve performance?

 

 

- Ade


___
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] Time Taken To Load Rule Resource

2010-05-17 Thread Esteban Aliverti
Is there any reason why you need to compile the rules every time your app
starts?

2010/5/17 Adeyinka Timi 

>  Hi guys,
>
>
>
> I have a drools application running that takes about 7 seconds to run. 5
> seconds of this time is used in parsing 2 DRL files that 200kb (6200 lines
> of code) and 34kb (1400 lines of code). Do you guys have any tips or any
> techniques that I can use to improve performance?
>
>
>
>
>
> - Ade
>
> ___
> 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] Time Taken To Load Rule Resource

2010-05-17 Thread Adeyinka Timi
Hi guys,

 

I have a drools application running that takes about 7 seconds to run. 5
seconds of this time is used in parsing 2 DRL files that 200kb (6200 lines
of code) and 34kb (1400 lines of code). Do you guys have any tips or any
techniques that I can use to improve performance?

 

 

- Ade

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


Re: [rules-users] issue with drools-container and related (in it's classpath) projects

2010-05-17 Thread Esteban Aliverti
These files were removed recently from repository. You need to execute *mvn
eclipse:eclipse *to generate them again.

Best,

On Mon, May 17, 2010 at 8:01 AM, kicho  wrote:

>
> Hi all!
>
> I have a question regardless drools-container eclipse projects from svn
> trunk (drools-spring project to be precise). I've noticed that that
> particular project is now missing .classpath and .project files.
>
> I have been reading posts about drools and spring integration and found
> them
> interesting, but now i don't know what projects from the svn i need to
> checkout, since the mentioned files are missing.
>
> Is there any particular reason for that?
>
> Thanks in advance,
> kicho
>
>
> --
> View this message in context:
> http://drools-java-rules-engine.46999.n3.nabble.com/issue-with-drools-container-and-related-in-it-s-classpath-projects-tp823312p823312.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
>



-- 


Esteban Aliverti
___
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-17 Thread Antonio Anderson Souza
Dear Thomas,

My first try was to use the matches and the performance was slower about 3
minutes to process only one CDR, after this benchmark and some research I've
tried to use the per digit comparison.

The order of this table that I sent is inverted, the most general entries
must be analyzed first.

I'm still analyzing how to change JBilling to use per digit comparison to
benchmark the performance of this solution.

Thank you very much for your tips.

Best regards,

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


2010/5/17 Swindells, Thomas 

>  My advice is to try just having a single column:
>
> strValue matches “$param.*”
>
> you could also compare the performance of that to
>
> eval(strValue.startsWith(“$param”))
>
>
>
> Also presumably you are only wanting the first matching rule in your table
> to fire, looking at the table below drools will fire all of the matching
> rules, this will mean than any phone number with prefix 5511 will be charged
> at 0.4 as that will be the last rule to fire.
>
>
>
> Thomas
>
>
>
> *From:* rules-users-boun...@lists.jboss.org [mailto:
> rules-users-boun...@lists.jboss.org] *On Behalf Of *Greg Barton
> *Sent:* 14 May 2010 20:59
> *To:* Rules Users List
>
> *Subject:* Re: [rules-users] Jbilling Drools performance
>
>
>
> 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 <
> anto...@voicetechnology.com.br>* 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 
> http://mc/compose?to=greg_bar...@yahoo.com>
> >
>
> 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 
> http://mc/compose?to=antonio...@gmail.com>
> >* wrote:
>
>
> From: Antonio Anderson Souza 
> http://mc/compose?to=antonio...@gmail.com>
> >
> Subject: [rules-users] Jbilling Drools performance
> To: "Drools Users Mailing list" 
> http://mc/compose?to=rules-us...@lists.jboss.org>
> >
> 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) == '$

Re: [rules-users] [Drools Fusion] Can't detect 2 occurrences with sliding window

2010-05-17 Thread Xavier Coulon
Hello Wolfgang,

Thanks for you answer. I changed my JUnit test method to the following :

@Test
public void testActivity() throws IOException, ParseException,
InterruptedException {
// parse the log file
Resource logFile = new ClassPathResource(
"activity/activite18h20-18h30-tpcnop01s-extract.log");
// converter and inject tracks in the session,
List logLines = FileUtils.readLines(logFile.getFile(),
"UTF-8");

// fire all rules
session.fireAllRules();
LOGGER.info("loading events");
// load events from stream
for (String logLine : logLines) {
Operation operation = LineConverterUtil.getOperation(logLine);
LOGGER.debug("Moving clock from "
+ (new Date(clock.getCurrentTime())).toString() + " to "
+ operation.getDate());
*clock.advanceTime(operation.getDate().getTime()**
- clock.getCurrentTime(), TimeUnit.MILLISECONDS);
session.fireAllRules();
***// clock.advanceTime(10, TimeUnit.SECONDS);
LOGGER.debug("Inserting " + operation);
FactHandle operationHandle = entryPoint.insert(operation);
LOGGER.debug("Insertion done: " +
operationHandle.toExternalForm());

}
LOGGER.info("done with events");
// check...
Assert.assertTrue("Rule not fired...", listener
.isRuleFired("overActivity"));
}

But it still does not work : the first "operation" is retracted from the
session when the clock is moved (see my logs below), yet the window of 60s
is not expired (18:26:47 to 18:27:11)

Console> 2010-05-17 14:08:22|DEBUG||DroolsRulesTestCase.testActivity|Moving
clock from Thu Jan 01 01:00:00 CET 1970 to Fri Apr 30 18:26:47 CEST 2010
Console> 2010-05-17
14:08:22|DEBUG||DroolsRulesTestCase.testActivity|Inserting Operation
[date=Fri Apr 30 18:26:47 CEST 2010, executionTime=1, hostname=server1,
ipAddress=1.2.3.4, operation=null, requestSize=0, responseSize=0]
*Console> 2010-05-17 14:08:22|WARN
||TrackingWorkingMemoryEventListener.objectInserted|Object inserted: [event
fid:1:1:Operation [date=Fri Apr 30 18:26:47 CEST 2010, executionTime=1,
hostname=server1, ipAddress=1.2.3.4, operation=null, r*equestSize=0,
responseSize=0]]
Console> 2010-05-17
14:08:22|DEBUG||DroolsRulesTestCase.testActivity|Insertion done: [event
fid:1:1:Operation [date=Fri Apr 30 18:26:47 CEST 2010, executionTime=1,
hostname=server1, ipAddress=1.2.3.4, operation=null, requestSize=0,
responseSize=0]]
*Console> 2010-05-17 14:08:22|DEBUG||DroolsRulesTestCase.testActivity|Moving
clock from Fri Apr 30 18:26:47 CEST 2010 to Fri Apr 30 18:27:11 CEST 2010
**Console> 2010-05-17 14:08:22|WARN
||TrackingWorkingMemoryEventListener.objectRetracted|Object retracted:
[event fid:1:1:Operation [date=Fri Apr 30 18:26:47 CEST 2010,
executionTime=1, *hostname=server1, ipAddress=1.2.3.4, operation=null,
requestSize=0, responseSize=0]]
Console> 2010-05-17
14:08:22|DEBUG||DroolsRulesTestCase.testActivity|Inserting Operation
[date=Fri Apr 30 18:27:11 CEST 2010, executionTime=164, hostname=server1,
ipAddress=1.2.3.4, operation=CONSULTATION, requestSize=1299,
responseSize=895]


My code is based on an example from the "Drools JBoss Rules 5.0 developer
guide" (chapt 7)

Any idea ?

Thank you in advance
Regards,
Xavier

2010/5/17 Wolfgang Laun 

> You are inserting Operation facts, interleaved with advancing the clock,
> both of which correctly updates the agenda and eliminates the facts that
> are pseudo-too-old to matter.
>
> But you are never goiving the Engine a chance to fire - until it is
> pseudo-too-late.
>
> Either you call session.fireUntilHalt() in a separate thread or, for unit
> test, call
> fireAllRules() after each clock manipulation.
>
> HTH
> -W
>
>
>
> On Mon, May 17, 2010 at 11:18 AM, Xavier Coulon  wrote:
>
>>
>> Hello,
>>
>> I'm new to Drools (5.0.1) and i've tryied the following (basic) fusion
>> rule
>> for a few days now without success.
>> The rule is to determine if a user performs 2 operations in the sliding
>> window of 60s. In such a condition, a log message should be triggered.
>>
>> Here is my DRL code :
>>
>> # declare events
>> declare Operation
>>@role(event)
>>@timestamp(date)
>> end
>>
>> rule "overActivity"
>> dialect "mvel"
>>when
>>#condition : 2 operation in less than 1 minute
>>$operation1 : Operation()
>>over window:time(60s) from entry-point
>> "OperationStream"
>>$operation2 : Operation(this != $operation1, ipAddress ==
>> $operation1.ipAddress)
>>over window:time(60s) from entry-point
>> "OperationStream"
>>then
>>#actions
>>System.out.println("over-active user " +
>> $operation1.ipAddress );
>> end
>>
>>
>> And my JUnit test, using a PSEUDO Clock :
>>
>> public class DroolsRulesTestCase 

Re: [rules-users] Is it possible to access created Object inside RHS???

2010-05-17 Thread Swindells, Thomas
Yes,

How you do it depends on what you are wanting to do.
If you just want to use the newly created object from other rules then you 
should insert it into the knowledge base.
If you just want to pass back your newly created object into your application 
then the easiest way is to insert a global object into the knowledge base, you 
can then call methods on this object to communicate from the rules into your 
application.

If you want to do both then the best way is to insert it into the knowledge 
base and then use queries from your application to extract the facts you are 
interested in.

Reading 
http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html_single/index.html
 and looking at the samples and test cases in the drools codebase should help 
you get further.

Thomas

> -Original Message-
> From: rules-users-boun...@lists.jboss.org [mailto:rules-users-
> boun...@lists.jboss.org] On Behalf Of Kuttiraja
> Sent: 17 May 2010 12:35
> To: rules-users@lists.jboss.org
> Subject: [rules-users] Is it possible to access created Object inside RHS???
>
>
> Hi,
>
> I have some application using Drools.
> Sample rule
>
> rule "rule 1"
> when
> //some condition
> then
> Object a = new Object()
> //Do Something with Object
> end
>
> is it possible to use this newly created object from the Application?
>
> Thanks in advance
> Kutti
> --
> View this message in context: http://drools-java-rules-
> engine.46999.n3.nabble.com/Is-it-possible-to-access-created-Object-inside-RHS-
> tp823356p823356.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


**
This message is confidential and intended only for the addressee. If you have 
received this message in error, please immediately notify the 
postmas...@nds.com and delete it from your system as well as any copies. The 
content of e-mails as well as traffic data may be monitored by NDS for 
employment and security purposes. To protect the environment please do not 
print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, 
United Kingdom. A company registered in England and Wales. Registered no. 
3080780. VAT no. GB 603 8808 40-00
**

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


[rules-users] Is it possible to access created Object inside RHS???

2010-05-17 Thread Kuttiraja

Hi,

I have some application using Drools.
Sample rule

rule "rule 1"
when
//some condition
then
Object a = new Object()
//Do Something with Object
end

is it possible to use this newly created object from the Application?

Thanks in advance
Kutti
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Is-it-possible-to-access-created-Object-inside-RHS-tp823356p823356.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] CHR 2010: Call for Participation

2010-05-17 Thread Peter Van Weert
 CALL FOR PARTICIPATION
CHR 2010


 7th International Workshop on Constraint Handling Rules
  associated with ICLP 2010 (part of FLoC 2010)
Edinburgh, Scotland, 20 July 2010
 http://dtai.cs.kuleuven.be/CHR/CHR2010/

   HIGHLIGHTS

* newcomers' welcome to CHR tutorial by Thom Frühwirth
* invited talk on the JBoss Drools business rules platform by Mark Proctor
* invited talk by Matt Lilley of SecuritEase, a leading stock broking system
* introduction to CHRiSM, a CHR-based probabilistic formalism, by Jon Sneyers
* presentation of the six accepted papers + two demos

  INTRODUCTION

The  Constraint Handling Rules  (CHR) language has  become a major  declarative
specification formalism  and implementation  language for  constraint reasoning
algorithms and  applications. Algorithms  are often  specified using  inference
rules, rewrite  rules, sequents,  proof rules,  or logical axioms  that can  be
directly  written  in CHR.  Its  clean semantics  facilitates  program  design,
analysis, and transformation. See the CHR website for more information:

   http://dtai.cs.kuleuven.be/CHR/

PROGRAM

The CHR 2010 workshop offers a very attractive and varied program.  Next to our
accepted technical papers, we have two invited speakers:  Mark Proctor from the
JBoss Drools  project, a  major open-source  business rule  platform, and  Matt
Lilley from SecuritEase, a leading stock broking dealing and settlement system,
and one of the most prominent industry users of Prolog and CHR.

Other  highlights  are the  first  practical confluence  checker  for CHR,  and
several  application-oriented  presentations, including  two demos  by students
from the  University of Ulm on using CHR with a  multi-touch interface: one for
automated music generation,  and one aimed at  providing long-term routing  for
fully autonomous sailing boats (in cooperation with the Roboat  project).

Because  many FLoC attendants  will be new to CHR,  we included  two additional
introductionary presentations: Thom Frühwirth will give a broad tutorial on CHR
in general, and  Jon Sneyers will introduce the  recent CHR-based probabilistic
formalism CHRiSM (also presented at the main ICLP conference).

The full workshop's program is available at:

   http://dtai.cs.kuleuven.be/CHR/CHR2010/programme.shtml

  REGISTRATION

Registration for the workshop can be done online at:

   http://www.floc-conference.org/registration.html

Early registration ends 17 May.

  ORGANIZATION

Program Committee:

* Sebastian Brand, NICTA and University of Melbourne, Australia
* Henning Christiansen, Roskilde University, Denmark
* Verónica Dahl, Simon Fraser University, Canada
* Leslie De Koninck, NICTA and University of Melbourne, Australia (co-chair)
* Thom Frühwirth, Ulm University, Germany
* Marco Gavanelli, University of Ferrara, Italy
* Rémy Haemmerlé, Universidad Politécnica de Madrid, Spain
* Maria-Chiara Meo, "Gabriele d'Annunzio" University, Italy
* Paolo Pilozzi, K.U.Leuven, Belgium
* Frank Raiser, Ulm University, Germany
* Peter Van Weert, K.U.Leuven, Belgium (co-chair)
* Jairson Vitorino, Federal University of Pernambuco, Brazil
* Armin Wolf, Fraunhofer FIRST, Germany

Workshop Coordinators:

Contact: chr2...@easychair.org

Peter Van Weert
Department of Computer Science, K.U.Leuven
Leuven, Belgium
http://people.cs.kuleuven.be/~peter.vanweert/

Leslie De Koninck
National ICT Australia, Victoria Research Laboratory
Dept of Computer Science and Software Engineering, University of Melbourne
Melbourne, Australia

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


[rules-users] issue with drools-container and related (in it's classpath) projects

2010-05-17 Thread kicho

Hi all!

I have a question regardless drools-container eclipse projects from svn
trunk (drools-spring project to be precise). I've noticed that that
particular project is now missing .classpath and .project files. 

I have been reading posts about drools and spring integration and found them
interesting, but now i don't know what projects from the svn i need to
checkout, since the mentioned files are missing. 

Is there any particular reason for that?

Thanks in advance,
kicho


-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/issue-with-drools-container-and-related-in-it-s-classpath-projects-tp823312p823312.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] [Drools Fusion] Can't detect 2 occurrences with sliding window

2010-05-17 Thread Wolfgang Laun
You are inserting Operation facts, interleaved with advancing the clock,
both of which correctly updates the agenda and eliminates the facts that
are pseudo-too-old to matter.

But you are never goiving the Engine a chance to fire - until it is
pseudo-too-late.

Either you call session.fireUntilHalt() in a separate thread or, for unit
test, call
fireAllRules() after each clock manipulation.

HTH
-W


On Mon, May 17, 2010 at 11:18 AM, Xavier Coulon  wrote:

>
> Hello,
>
> I'm new to Drools (5.0.1) and i've tryied the following (basic) fusion rule
> for a few days now without success.
> The rule is to determine if a user performs 2 operations in the sliding
> window of 60s. In such a condition, a log message should be triggered.
>
> Here is my DRL code :
>
> # declare events
> declare Operation
>@role(event)
>@timestamp(date)
> end
>
> rule "overActivity"
> dialect "mvel"
>when
>#condition : 2 operation in less than 1 minute
>$operation1 : Operation()
>over window:time(60s) from entry-point
> "OperationStream"
>$operation2 : Operation(this != $operation1, ipAddress ==
> $operation1.ipAddress)
>over window:time(60s) from entry-point
> "OperationStream"
>then
>#actions
>System.out.println("over-active user " +
> $operation1.ipAddress );
> end
>
>
> And my JUnit test, using a PSEUDO Clock :
>
> public class DroolsRulesTestCase {
>
>static KnowledgeBase knowledgeBase;
>StatefulKnowledgeSession session;
>// FactHandle handle;
>SessionPseudoClock clock;
>WorkingMemoryEntryPoint entryPoint;
>private TrackingAgendaEventListener listener;
>
>private static final Logger LOGGER = Logger
>.getLogger(DroolsRulesTestCase.class);
>
>@BeforeClass
>public static void globalSetup() throws IOException {
>KnowledgeBuilder builder = KnowledgeBuilderFactory
>.newKnowledgeBuilder();
>ClassPathResource classPathResource = new ClassPathResource(
>"rules/activity-fusion.drl");
>Assert.assertTrue("Rules resource not found",
> classPathResource
>.exists());
>
>  builder.add(ResourceFactory.newInputStreamResource(classPathResource
>.getInputStream()), ResourceType.DRL);
>Assert.assertFalse("Errors in builder:"
>+ builder.getErrors().toString(),
> builder.hasErrors());
>KnowledgeBaseConfiguration configuration =
> KnowledgeBaseFactory
>.newKnowledgeBaseConfiguration();
>configuration.setOption(EventProcessingOption.STREAM);
>knowledgeBase =
> KnowledgeBaseFactory.newKnowledgeBase(configuration);
>
>  knowledgeBase.addKnowledgePackages(builder.getKnowledgePackages());
>}
>
>@Before
>public void setup() {
>KnowledgeSessionConfiguration configuration =
> KnowledgeBaseFactory
>.newKnowledgeSessionConfiguration();
>configuration.setOption(ClockTypeOption.get("pseudo"));
>
>session = knowledgeBase
>.newStatefulKnowledgeSession(configuration,
> null);
>clock = (SessionPseudoClock) session.getSessionClock();
>listener = new TrackingAgendaEventListener();
>session.addEventListener(listener);
>session.addEventListener(new
> TrackingWorkingMemoryEventListener());
>entryPoint =
> session.getWorkingMemoryEntryPoint("OperationStream");
>}
>
>@SuppressWarnings("unchecked")
>@Test
>public void testActivity() throws IOException, ParseException,
>InterruptedException {
>// parse the log file
>Resource logFile = new ClassPathResource(
>"activity/extract.log");
>// converter and inject tracks in the session,
>List logLines =
> FileUtils.readLines(logFile.getFile(), "UTF-8");
>
>// fire all rules
>session.fireAllRules();
>LOGGER.info("loading events");
>// load events from stream
>for (String logLine : logLines) {
>Operation operation =
> LineConverterUtil.getOperation(logLine);
>LOGGER.debug("Inserting " + operation);
>LOGGER.debug("Moving clock from "
>+ (new
> Date(clock.getCurrentTime())).toString() + " to "
>+ operation.getDate());
>clock.advanceTime(operation.getDate().getTime()
>   

[rules-users] [Drools Fusion] Can't detect 2 occurrences with sliding window

2010-05-17 Thread Xavier Coulon

Hello,

I'm new to Drools (5.0.1) and i've tryied the following (basic) fusion rule
for a few days now without success.
The rule is to determine if a user performs 2 operations in the sliding
window of 60s. In such a condition, a log message should be triggered.

Here is my DRL code : 

# declare events
declare Operation
@role(event)
@timestamp(date)
end

rule "overActivity"
dialect "mvel"  
when
#condition : 2 operation in less than 1 minute
$operation1 : Operation() 
over window:time(60s) from entry-point "OperationStream"
$operation2 : Operation(this != $operation1, ipAddress ==
$operation1.ipAddress)  
over window:time(60s) from entry-point "OperationStream"
then 
#actions
System.out.println("over-active user " + $operation1.ipAddress 
);
end


And my JUnit test, using a PSEUDO Clock :

public class DroolsRulesTestCase {

static KnowledgeBase knowledgeBase;
StatefulKnowledgeSession session;
// FactHandle handle;
SessionPseudoClock clock;
WorkingMemoryEntryPoint entryPoint;
private TrackingAgendaEventListener listener;

private static final Logger LOGGER = Logger
.getLogger(DroolsRulesTestCase.class);

@BeforeClass
public static void globalSetup() throws IOException {
KnowledgeBuilder builder = KnowledgeBuilderFactory
.newKnowledgeBuilder();
ClassPathResource classPathResource = new ClassPathResource(
"rules/activity-fusion.drl");
Assert.assertTrue("Rules resource not found", classPathResource
.exists());

builder.add(ResourceFactory.newInputStreamResource(classPathResource
.getInputStream()), ResourceType.DRL);
Assert.assertFalse("Errors in builder:"
+ builder.getErrors().toString(), 
builder.hasErrors());
KnowledgeBaseConfiguration configuration = KnowledgeBaseFactory
.newKnowledgeBaseConfiguration();
configuration.setOption(EventProcessingOption.STREAM);
knowledgeBase = 
KnowledgeBaseFactory.newKnowledgeBase(configuration);

knowledgeBase.addKnowledgePackages(builder.getKnowledgePackages());
}

@Before
public void setup() {
KnowledgeSessionConfiguration configuration = 
KnowledgeBaseFactory
.newKnowledgeSessionConfiguration();
configuration.setOption(ClockTypeOption.get("pseudo"));

session = knowledgeBase
.newStatefulKnowledgeSession(configuration, 
null);
clock = (SessionPseudoClock) session.getSessionClock();
listener = new TrackingAgendaEventListener();
session.addEventListener(listener);
session.addEventListener(new 
TrackingWorkingMemoryEventListener());
entryPoint = 
session.getWorkingMemoryEntryPoint("OperationStream");
}

@SuppressWarnings("unchecked")
@Test
public void testActivity() throws IOException, ParseException,
InterruptedException {
// parse the log file
Resource logFile = new ClassPathResource(
"activity/extract.log");
// converter and inject tracks in the session,
List logLines = FileUtils.readLines(logFile.getFile(), 
"UTF-8");

// fire all rules
session.fireAllRules();
LOGGER.info("loading events");
// load events from stream
for (String logLine : logLines) {
Operation operation = 
LineConverterUtil.getOperation(logLine);
LOGGER.debug("Inserting " + operation);
LOGGER.debug("Moving clock from "
+ (new 
Date(clock.getCurrentTime())).toString() + " to "
+ operation.getDate());
clock.advanceTime(operation.getDate().getTime()
- clock.getCurrentTime(), 
TimeUnit.MILLISECONDS);
// clock.advanceTime(10, TimeUnit.SECONDS);
FactHandle operationHandle = 
entryPoint.insert(operation);

LOGGER.debug("Insertion done: " + 
operationHandle.toExternalForm());

}
LOGGER.info("done with events");
// check...
Assert.assertTrue("Rule not fired...", listener
.isRuleFired("overActivity"));
}
}

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

2010-05-17 Thread pvm


Hi there,
Many thanks for your reply. i've done as you suggest, but the problem i have is 
perhaps a simpler one... i don't know how to access the variable in the rules 
in my sub-flow. My variable is called "isManager" and i can now pass it in ok, 
but not use it. E.g. if i write a rule as follows:

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? (this is probably a 
dumb quesitons, but i just cant find out how to do it!).

Thanks,
Paul.


Date: Fri, 14 May 2010 12:18:22 -0700
From: ml-node+818122-550015209-265...@n3.nabble.com
To: pvmel...@hotmail.com
Subject: Re: Access to variables form sub-flows



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 message @ 
http://drools-java-rules-engine.46999.n3.nabble.com/Access-to-variables-form-sub-flows-tp817279p818122.html


To unsubscribe from Access to variables form sub-flows, click here.


  
_
http://clk.atdmt.com/UKM/go/19780/direct/01/
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Access-to-variables-form-sub-flows-tp817279p823092.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-17 Thread Swindells, Thomas
My advice is to try just having a single column:
strValue matches "$param.*"
you could also compare the performance of that to
eval(strValue.startsWith("$param"))

Also presumably you are only wanting the first matching rule in your table to 
fire, looking at the table below drools will fire all of the matching rules, 
this will mean than any phone number with prefix 5511 will be charged at 0.4 as 
that will be the last rule to fire.

Thomas

From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Greg Barton
Sent: 14 May 2010 20:59
To: Rules Users List
Subject: Re: [rules-users] Jbilling Drools performance

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

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 Fol

Re: [rules-users] Drools and JBoss 6.0 Support

2010-05-17 Thread Jervisliu
ramram wrote:
> Hi All,
>
>   I have a question about the Drools support for the JBOSS 6.0 because I
> have problems deploying the Guvnor on the JBOSS 6.0 where it was functioning
> perfectly under JBOSS 4.2.3. Any suggestions or documents that I can refer
> to.
>
>
> Regards,
> Ram
>   
Hi Ram, what problems did you see on JBOSS AS 6.0? I tried JBOSS AS 6.0 
recently with Guvnor 5.1, looks like this is a SEAM problem. Seam 2.1 
may not work with JBOSS AS 6. I need a further look into this.

Exception received:

15:07:55,305 ERROR [StandardContext] Context [/jboss-brms] startup 
failed due to
 previous errors: java.lang.RuntimeException: mapped-name is required 
for org.jb
oss.seam.async.TimerServiceDispatcher/timerService of deployment 
jboss-brms.war
at 
org.jboss.web.tomcat.service.injection.WebResourceHandler.loadXmlReso
urceEnvRefs(WebResourceHandler.java:287)
at 
org.jboss.web.tomcat.service.injection.WebResourceHandler.loadXml(Web
ResourceHandler.java:325)
at 
org.jboss.web.tomcat.service.TomcatInjectionContainer.processMetadata
(TomcatInjectionContainer.java:574)
at 
org.jboss.web.tomcat.service.WebCtxLoader.start(WebCtxLoader.java:158
)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4
342)
at 
org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy
Internal(TomcatDeployment.java:315)

At the same time, you can try JBOASS AS 5.0. Here is the instruction on 
how to deploy Guvnor in JBOSS 5.0:

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

Cheers,
Jervis

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