Re: [rules-users] Annotation @PropertyReactive not works

2014-08-11 Thread David Moros Claramunt
Thanks for all,

But.. abusing your kindness I have another proble with guvnor, when I
execute a scenario test I receive the follow exception, that not occurs in
unitary test with DRL file.

Delimiting the problem I can observe, that exception not is produced by the
rule Calculos basados en servicio RIF por tipoServicio RIF but by the
next rule chained (Numero de meses de duracion del servicio - RIF) that
use the variable changed in consecuences the rule named Calculos basados
en servicio RIF por tipoServicio RIF

The attribute changed in consecuences of rule  Calculos basados en
servicio RIF por tipoServicio RIF is a primitive boolean

Can you help me? All my problems are related with guvnor,but I need it as
assets repository

The rules are:

rule Calculos basados en servicio RIF por tipoServicio RIF
salience 0
activation-group servicioRif
when
 $OT: FactOT (tipoServicio == RIF)
$response: FactResponse()
then
modify ($response) {
 setServicioRif (true);
}
end

rule Numero de meses de duracion del servicio - RIF
salience -1000+2
activation-group Numero de meses de duracion del servicio
when
$response : FactResponse ( servicioRif == true)
then
modify ($response) {
setNumeroMesesServicio ( 12 );
}
end

The text of exception is the following:

ERROR 11-08 13:28:38,294 (LoggingHelper.java:error:74)  There was an error
executing the consequence of rule [Calculos basados en servicio RIF por
tipoServicio RIF]: Exception executing consequence for rule Calculos
basados en servicio RIF por tipoServicio RIF in horaspersonas.BRA:
java.lang.NullPointerException
CAUSED BY null
Exception executing consequence for rule Calculos basados en servicio RIF
por tipoServicio RIF in horaspersonas.BRA: java.lang.NullPointerException
at
org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
 at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1292)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1216)
 at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1451)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:756)
 at
org.drools.ide.common.server.testscenarios.TestScenarioWorkingMemoryWrapper.fireAllRules(TestScenarioWorkingMemoryWrapper.java:85)
at
org.drools.ide.common.server.testscenarios.TestScenarioWorkingMemoryWrapper.executeSubScenario(TestScenarioWorkingMemoryWrapper.java:109)
 at
org.drools.ide.common.server.testscenarios.ScenarioRunner.applyFixtures(ScenarioRunner.java:154)
at
org.drools.ide.common.server.testscenarios.ScenarioRunner.run(ScenarioRunner.java:106)
 at
org.drools.guvnor.server.TestScenarioServiceImplementation.runScenario(TestScenarioServiceImplementation.java:182)
at
org.drools.guvnor.server.TestScenarioServiceImplementation.runScenario(TestScenarioServiceImplementation.java:116)
 at
org.drools.guvnor.server.TestScenarioServiceImplementation.runScenario(TestScenarioServiceImplementation.java:106)
at
org.drools.guvnor.server.TestScenarioServiceServlet.runScenario(TestScenarioServiceServlet.java:39)
 at sun.reflect.GeneratedMethodAccessor265.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
 at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
 at
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:879)
 at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:617)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1774)
 at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at
org.drools.common.PropagationContextImpl.adaptModificationMaskForObjectType(PropagationContextImpl.java:410)
 at 

Re: [rules-users] Annotation @PropertyReactive not works

2014-08-11 Thread David Moros Claramunt
thanks, it works

I have put the sufix .drl at package URL and works

But now, i have the same problem executing the scenarios test from Guvnor,
do you know if issue is in 5.6.0.Final version and patched in later
versions?

Thnaks,


2014-08-08 15:26 GMT+02:00 Davide Sottara dso...@gmail.com:

 If I remember correctly this is a known issue. Unfortunately drools 5.6 is
 final and can't be patched. Downloading the source drl rather than the
 compiled pkg could be a workaround.
 Please let me know if it works

 Sent via the ASUS PadFone X, an ATT 4G LTE smartphone


  Original Message 
 From:davidmoros davidmo...@gmail.com
 Sent:Fri, 08 Aug 2014 05:03:29 -0500
 To:rules-users@lists.jboss.org
 Subject:[rules-users] Annotation @PropertyReactive not works

 I'm developing a system rules with drools, how any novice I found the
 problem
 of infinite loops, in unitary test I resolved with annotation
 @PropertyReactive and all works fine, until I uploaded my model and rules
 to
 Guvnor.
 Now I have developed a webservice that download the PKG from Guvnor, with
 change-set and seems that the annotation @PropertyReactive not works
 because
 of the same rule is reevaluated constantly although the consecuences the
 rule not change the value of attributes of LHS of rule, and infinite loops
 appears
 The error only occurs when I download the PKG from Guvnor, if I refer the
 file DRL directly all woks fine

 Can anybody help me?

 I use 5.6.0.Final Version for Drools and Guvnor, Guvnor and my webservice
 are deployed in Tomcat

 Thanks in advance



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

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

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

Re: [rules-users] Annotation @PropertyReactive not works

2014-08-11 Thread Michael Anstis
The problem does not appear to be within Guvnor as such; that just uses the
underlying Drools engine.

Can you provide a standalone unit test demonstrating the issue?


On 11 August 2014 13:53, David Moros Claramunt davidmo...@gmail.com wrote:

 thanks, it works

 I have put the sufix .drl at package URL and works

 But now, i have the same problem executing the scenarios test from Guvnor,
 do you know if issue is in 5.6.0.Final version and patched in later
 versions?

 Thnaks,


 2014-08-08 15:26 GMT+02:00 Davide Sottara dso...@gmail.com:

 If I remember correctly this is a known issue. Unfortunately drools 5.6
 is final and can't be patched. Downloading the source drl rather than the
 compiled pkg could be a workaround.

 Please let me know if it works

 Sent via the ASUS PadFone X, an ATT 4G LTE smartphone


  Original Message 
 From:davidmoros davidmo...@gmail.com
 Sent:Fri, 08 Aug 2014 05:03:29 -0500
 To:rules-users@lists.jboss.org
 Subject:[rules-users] Annotation @PropertyReactive not works

 I'm developing a system rules with drools, how any novice I found the
 problem
 of infinite loops, in unitary test I resolved with annotation
 @PropertyReactive and all works fine, until I uploaded my model and rules
 to
 Guvnor.
 Now I have developed a webservice that download the PKG from Guvnor, with
 change-set and seems that the annotation @PropertyReactive not works
 because
 of the same rule is reevaluated constantly although the consecuences the
 rule not change the value of attributes of LHS of rule, and infinite loops
 appears
 The error only occurs when I download the PKG from Guvnor, if I refer the
 file DRL directly all woks fine

 Can anybody help me?

 I use 5.6.0.Final Version for Drools and Guvnor, Guvnor and my webservice
 are deployed in Tomcat

 Thanks in advance



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

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



 ___
 rules-users 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] Annotation @PropertyReactive not works

2014-08-11 Thread David Moros Claramunt
you need exactly?
model? rules? scenario? log?

I use 5.6.0.Final version


2014-08-11 14:56 GMT+02:00 Michael Anstis michael.ans...@gmail.com:

 The problem does not appear to be within Guvnor as such; that just uses
 the underlying Drools engine.

 Can you provide a standalone unit test demonstrating the issue?


 On 11 August 2014 13:53, David Moros Claramunt davidmo...@gmail.com
 wrote:

 thanks, it works

 I have put the sufix .drl at package URL and works

 But now, i have the same problem executing the scenarios test from
 Guvnor, do you know if issue is in 5.6.0.Final version and patched in later
 versions?

 Thnaks,


 2014-08-08 15:26 GMT+02:00 Davide Sottara dso...@gmail.com:

 If I remember correctly this is a known issue. Unfortunately drools 5.6
 is final and can't be patched. Downloading the source drl rather than the
 compiled pkg could be a workaround.

 Please let me know if it works

 Sent via the ASUS PadFone X, an ATT 4G LTE smartphone


  Original Message 
 From:davidmoros davidmo...@gmail.com
 Sent:Fri, 08 Aug 2014 05:03:29 -0500
 To:rules-users@lists.jboss.org
 Subject:[rules-users] Annotation @PropertyReactive not works

 I'm developing a system rules with drools, how any novice I found the
 problem
 of infinite loops, in unitary test I resolved with annotation
 @PropertyReactive and all works fine, until I uploaded my model and
 rules to
 Guvnor.
 Now I have developed a webservice that download the PKG from Guvnor, with
 change-set and seems that the annotation @PropertyReactive not works
 because
 of the same rule is reevaluated constantly although the consecuences the
 rule not change the value of attributes of LHS of rule, and infinite
 loops
 appears
 The error only occurs when I download the PKG from Guvnor, if I refer the
 file DRL directly all woks fine

 Can anybody help me?

 I use 5.6.0.Final Version for Drools and Guvnor, Guvnor and my webservice
 are deployed in Tomcat

 Thanks in advance



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

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



 ___
 rules-users 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] Annotation @PropertyReactive not works

2014-08-11 Thread Mark Proctor
You’ll need to submit a self contained minimal unit test, as a pull request.
http://docs.jboss.org/drools/release/5.6.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html

https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/PropertyReactivityTest.java


On 11 Aug 2014, at 14:02, David Moros Claramunt davidmo...@gmail.com wrote:

 you need exactly?
 model? rules? scenario? log?
 
 I use 5.6.0.Final version
 
 
 2014-08-11 14:56 GMT+02:00 Michael Anstis michael.ans...@gmail.com:
 The problem does not appear to be within Guvnor as such; that just uses the 
 underlying Drools engine.
 
 Can you provide a standalone unit test demonstrating the issue?
 
 
 On 11 August 2014 13:53, David Moros Claramunt davidmo...@gmail.com wrote:
 thanks, it works
 
 I have put the sufix .drl at package URL and works
 
 But now, i have the same problem executing the scenarios test from Guvnor, do 
 you know if issue is in 5.6.0.Final version and patched in later versions?
 
 Thnaks,
 
 
 2014-08-08 15:26 GMT+02:00 Davide Sottara dso...@gmail.com:
 If I remember correctly this is a known issue. Unfortunately drools 5.6 is 
 final and can't be patched. Downloading the source drl rather than the 
 compiled pkg could be a workaround.
 
 Please let me know if it works
 
 Sent via the ASUS PadFone X, an ATT 4G LTE smartphone
 
 
  Original Message 
 From:davidmoros davidmo...@gmail.com
 Sent:Fri, 08 Aug 2014 05:03:29 -0500
 To:rules-users@lists.jboss.org
 Subject:[rules-users] Annotation @PropertyReactive not works
 
 I'm developing a system rules with drools, how any novice I found the problem
 of infinite loops, in unitary test I resolved with annotation
 @PropertyReactive and all works fine, until I uploaded my model and rules to
 Guvnor.
 Now I have developed a webservice that download the PKG from Guvnor, with
 change-set and seems that the annotation @PropertyReactive not works because
 of the same rule is reevaluated constantly although the consecuences the
 rule not change the value of attributes of LHS of rule, and infinite loops
 appears
 The error only occurs when I download the PKG from Guvnor, if I refer the
 file DRL directly all woks fine
 
 Can anybody help me? 
 
 I use 5.6.0.Final Version for Drools and Guvnor, Guvnor and my webservice
 are deployed in Tomcat 
 
 Thanks in advance
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Annotation-PropertyReactive-not-works-tp4030602.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 ___
 rules-users 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

[rules-users] Sequential and Decision Tables

2014-08-11 Thread sjrcgtek
Apologies if this is already answered but I could not find it.

Drools Version 6.1.0.Final

I have three Excel DTs which I would like to fire in order.  The Sequential
option appears to just order the rules within an excel DT.  I confirmed that
by printing the resulting rules and see that the generated rules from
different sheets have the same priority.

I can manually set the PRIORITY in the actual sheets, but that makes
inserting sheets or even lines in a sheet cumbersome.

Is there a way to tell drools to fire all rules across all DT's
sequentially?

Thanks.



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


Re: [rules-users] Sequential and Decision Tables

2014-08-11 Thread Michael Anstis
The sequential flag controls the rule's salience per XLS worksheet.

Rule's RHS are executed according to their salience values and hence the
sequential flag will control the rules RHS execution order.

See
http://docs.jboss.org/drools/release/6.1.0.Final/drools-docs/html/ch06.html#d0e3942
and
http://docs.jboss.org/drools/release/6.1.0.Final/drools-docs/html/DroolsLanguageReferenceChapter.html#d0e6859
for more information.

If you want to control the execution across multiple Decision Tables you'll
need to define the rows salience manually, with the highest priority
Decision Table having values higher than the lower priority tables.


On 11 August 2014 15:17, sjrcgtek steve.cg...@gmail.com wrote:

 Apologies if this is already answered but I could not find it.

 Drools Version 6.1.0.Final

 I have three Excel DTs which I would like to fire in order.  The Sequential
 option appears to just order the rules within an excel DT.  I confirmed
 that
 by printing the resulting rules and see that the generated rules from
 different sheets have the same priority.

 I can manually set the PRIORITY in the actual sheets, but that makes
 inserting sheets or even lines in a sheet cumbersome.

 Is there a way to tell drools to fire all rules across all DT's
 sequentially?

 Thanks.



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

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

Re: [rules-users] Sequential and Decision Tables

2014-08-11 Thread Mark Proctor
in 6.x you do not necessarily have to set the salience any more. As LoadOrder 
is applied, and rules will be evaluated by the order of position within the 
file.

Mark
On 11 Aug 2014, at 15:30, Michael Anstis michael.ans...@gmail.com wrote:

 The sequential flag controls the rule's salience per XLS worksheet.
 
 Rule's RHS are executed according to their salience values and hence the 
 sequential flag will control the rules RHS execution order. 
 
 See 
 http://docs.jboss.org/drools/release/6.1.0.Final/drools-docs/html/ch06.html#d0e3942
  and 
 http://docs.jboss.org/drools/release/6.1.0.Final/drools-docs/html/DroolsLanguageReferenceChapter.html#d0e6859
  for more information.
 
 If you want to control the execution across multiple Decision Tables you'll 
 need to define the rows salience manually, with the highest priority 
 Decision Table having values higher than the lower priority tables.
 
 
 On 11 August 2014 15:17, sjrcgtek steve.cg...@gmail.com wrote:
 Apologies if this is already answered but I could not find it.
 
 Drools Version 6.1.0.Final
 
 I have three Excel DTs which I would like to fire in order.  The Sequential
 option appears to just order the rules within an excel DT.  I confirmed that
 by printing the resulting rules and see that the generated rules from
 different sheets have the same priority.
 
 I can manually set the PRIORITY in the actual sheets, but that makes
 inserting sheets or even lines in a sheet cumbersome.
 
 Is there a way to tell drools to fire all rules across all DT's
 sequentially?
 
 Thanks.
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Sequential-and-Decision-Tables-tp4030631.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

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

[rules-users] Creating simple Ruleflow via API and Spring

2014-08-11 Thread mattmadhavan
Hello,
My application is mostly rule driven and we do not have any states. We we
are processing about 30 million facts in  a stateless session using bunch of
rules (DRL).

I have a simple ruleflow requirement. I am looking for an example where I
can create the rule flow via an API even better using spring. I have three
condition checks and three Ruleflow groups. 

http://drools.46999.n3.nabble.com/file/n4030634/ruleflow.png 

Any help will be appreciated.

Thanks in advance!

Matt



--
View this message in context: 
http://drools.46999.n3.nabble.com/Creating-simple-Ruleflow-via-API-and-Spring-tp4030634.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users