Re: [rules-users] Guvnor test case with fact with Object fields

2012-06-01 Thread Toni Rikkola
The latest Guvnor 5.4.0 should have better support for nested objects. 
If are already using it please open a Jira so we can improve the scenario 
editor.

Toni

On May 31, 2012, at 6:21 PM, mpgong wrote:

 Hello,
 
 I have a fact that has is also my entity model and it has a field that is a
 class called state which holds previous and current state values (enum).
 
 So i have a condition that gets the state and gets the two values to check.  
 
 The issue i'm running into is with creating a test case in guvnor, is it
 possible to create a test case with a field that is an object like this? 
 Guvnor recognizes that i have a field called state but it doesn't realize
 that it is a class so it doesn't look like i would be able to test any rules
 the uses state as a condition check.
 
 Thanks
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Guvnor-test-case-with-fact-with-Object-fields-tp4017705.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users


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


Re: [rules-users] Drools 5.4.0.FINAL and OSGI. Unable to instantiate service for Class 'org.drools.concurrent.ExecutorProvider'

2012-06-01 Thread Per Sterner
Hello,

perhaps it is an equinox /eclipse.osgi problem?

The drools-api and the drools-core bundle have the same packages 
'org.drools.concurrent'.

I wrote a little test bundle which only does a dynamic-import like the 
'drools-api' bundle.

The class org.drools.concurrent.ExecutorProviderFactory can be found 
with 'Class.forName()'.

But the class org.drools.concurrent.ExecutorProviderImpl can't be found.

(If I manually require drools-core 'Class.forName()' works for 
org.drools.concurrent.ExecutorProviderImpl)

I have tried eclipse.osgi 3.6.1 , 3.7.2 and the current 3.8.0

Regards,

   Per Sterner


On 01.06.2012 03:29, Mark Proctor wrote:
 Looks like you have some classpath issues and using the incorrect jar
 versions.

 On 29/05/2012 14:30, Per Sterner wrote:
 [ERROR] [System] - Caused by: java.lang.ClassNotFoundException:
 org.drools.concurrent.ExecutorProviderImpl
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users


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


Re: [rules-users] Drools 5.4.0.FINAL and OSGI. Unable to instantiate service for Class 'org.drools.concurrent.ExecutorProvider'

2012-06-01 Thread Per Sterner
I just found an old eclipse forum entry:

http://www.eclipse.org/forums/index.php/mv/msg/90154/278597/#msg_278597


On 01.06.2012 03:29, Mark Proctor wrote:
 Looks like you have some classpath issues and using the incorrect jar
 versions.

 On 29/05/2012 14:30, Per Sterner wrote:
 [ERROR] [System] - Caused by: java.lang.ClassNotFoundException:
 org.drools.concurrent.ExecutorProviderImpl
 ___
 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] Papers about Drools Verifier

2012-06-01 Thread Mark Proctor

On 01/06/2012 04:52, Jackson Cunha wrote:

Thanks Mark!

When my paper and my prototype is running I will show all results here 
to get feedback.

ok, cool.

I'd personally like to see more work on the verifier, ours is still too 
basic, and there is a huge amounts that can be done. Mario recently 
started adding rule meta data for the consequences, so the verified can 
see what was inserted/retracted/modified; this can be used to verify 
chaining. I think he still needs to do a bit more work on insert, as 
it's not easy to determine what fields where set.


Mark


On 31 May 2012 23:04, Mark Proctor mproc...@codehaus.org 
mailto:mproc...@codehaus.org wrote:


On 28/05/2012 22:21, Jackson Cunha wrote:

Anyone knows about academic papers involving drools verifier? I'm
working in a project where will be produced a paper and I need to
cite some caracteristics of it.

A good starting point is on the ez-expert page, which covers
various papers on the topic.
http://www.ez-xpert.com/whitepapers/verification.html

Mark



Thanks.



Jackson Cunha Cassimiro (CereB)
Bacharel em Ciencia da Computação - UFPI
MSN: jackson.ce...@gmail.com mailto:jackson.ce...@gmail.com
Telefone Móvel +55 86 9928 1251 tel:%2B55%2086%209928%201251
Analista de Sistemas - Infoway - http://www.infoway-pi.com.br
Missão Infoway - Influenciar a Gestão de Sistemas de Saúde
através de e-health

(A vida é um combate que os fracos abate, aos bravos, aos fortes
só pode exaltar - Canção do Tamoio, Gonçalves Dias)




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



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




--

Jackson Cunha Cassimiro (CereB)
Bacharel em Ciencia da Computação - UFPI
MSN: jackson.ce...@gmail.com mailto:jackson.ce...@gmail.com
Telefone Móvel +55 86 9928 1251
Analista de Sistemas - Infoway - http://www.infoway-pi.com.br
Missão Infoway - Influenciar a Gestão de Sistemas de Saúde através de 
e-health


(A vida é um combate que os fracos abate, aos bravos, aos fortes só 
pode exaltar - Canção do Tamoio, Gonçalves Dias)




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


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


Re: [rules-users] drools.packagebuilder.conf

2012-06-01 Thread Matteo Cusmai
Hi all,
nobody knows where drools looks for the file?

Thanks,
Matteo.

On Thu, May 31, 2012 at 11:44 PM, Matteo Cusmai cusmaimat...@gmail.comwrote:

 Hi Chris,
 thanks a lot, but i am not using maven.
 I use ant to compile my project and i need that file at runtime.

 Bye,
 Matteo.

 On Thu, May 31, 2012 at 10:38 PM, Christopher Dolan 
 christopher.do...@avid.com wrote:

  In my Maven project, I put it in src/main/resources/META-INF of the
 module from which I start Drools.

 Chris

 ** **

 *From:* rules-users-boun...@lists.jboss.org [mailto:
 rules-users-boun...@lists.jboss.org] *On Behalf Of *Matteo Cusmai
 *Sent:* Thursday, May 31, 2012 11:51 AM
 *To:* Rules Users List
 *Subject:* [rules-users] drools.packagebuilder.conf

 ** **

 Hi all,
 i have developed some custom evaluators, and all worked fine with drools
 5.3.
 I put the file in object under my home folder.
 I would like to pass to 5.4 final, but it doesn't read that file.

 Where does it find the file?

 Thanks a lot,
 Matteo.

 ___
 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] Looking for Drools audit tool

2012-06-01 Thread paco
Thank you

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


[rules-users] how to fetch fresh guvnor resources from drools-camel-server?

2012-06-01 Thread bhochhi
I am using drools-camel-server to fetch the remote guvnor resource as follows
in knowledge-service.xml:

drools:resource type=PKG

source=http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/mypackage/Test;
basic-authentication=enabled username=test 
password=test /
/drools:resources


My problem is when I change/add rules at guvnor, this is not reflected on
drools-camel-server unless it is restarted. It seems like it is using the
local cache and doesn't fetch resource from guvnor after it fetch once
during server startup.

Does anyone have an idea how to make drools-camel-server fetch guvnor
resource remotely every time the service is called? any settings or
configuration that I am missing? I am using Jboss AS7.  


--
View this message in context: 
http://drools.46999.n3.nabble.com/how-to-fetch-fresh-guvnor-resources-from-drools-camel-server-tp4017721.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] Unable to upload POJO model jar to Guvnor 5.3.1 on Glassfish 3.1.2

2012-06-01 Thread claz12
Hi All.  I have deployed Guvnor 5.3.1.Final (the Tomcat 6 war modified to add
a glassfish-web.xml to set class-loader delegate=false) to Glassfish
3.1.2.  I am able to create a new package and a new POJO model in the
package, but when I try to upload the model jar file, I get the error
Unable to to upload the file message box displayed.  I checked the log
file (and even turned on debug log4j output in the guvnor war), but there
are no errors in the log file from the upload attempt.

I have attached the server.log file from glassfish.  Has anyone had similar
issues, or has suggestions on what else to try to debug the issue?

Thanks.

http://drools.46999.n3.nabble.com/file/n4017722/glassfishserver.log
glassfishserver.log 

--
View this message in context: 
http://drools.46999.n3.nabble.com/Unable-to-upload-POJO-model-jar-to-Guvnor-5-3-1-on-Glassfish-3-1-2-tp4017722.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] drools.packagebuilder.conf

2012-06-01 Thread Mario Fusco
Hi Matteo,

Drools loads conf files from several places and merge them including home
directory, meta-inf directory, etc. This is the class that does this job and
as you can see it isn't changed in the last year:

https://github.com/mariofusco/droolsjbpm-knowledge/blob/master/knowledge-api/src/main/java/org/drools/util/ChainedProperties.java
 

In particular, as you can see at line 71, it should try to load the conf
file also from your home folder. I don't know why it is not working in your
case. Probably are you launching it with the wrong user? Alternatively you
could also try to put that conf file in a folder named META_INF in your
classpath.

I hope this helps,
Mario

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


Re: [rules-users] drools.packagebuilder.conf

2012-06-01 Thread Matteo Cusmai
Hi Mario,
i have tried to put it every where.

The strange thing is that if i use 5.3 it is with file under
/home/myhomefolder and if i use 5.4 i get this error:

ERROR [2012-06-01 17:37:27,588] [VSensorLoader-Thread0]
(ExpertSystemManager.java:63) - Unable to Analyse Expression
$vehicle_type == type  geoIsWithinDistance0.evaluate( $location,
source.getGeometry() ):
 [java] [Error: unable to resolve method using strict-mode:
org.dfms.model.mapfeature.Route.geoIsWithinDistance0()]
 [java] [Near : {... cle_type == type  geoIsWithinDistance0.evaluate(
}]
 [java]  ^ : [Rule
name='VehicleAtRouteStart-event']
 [java] Unable to Analyse Expression $vehicle_type == type 
geoIsWithinDistance0.evaluate( $location, source.getGeometry() ):
 [java] [Error: unable to resolve method using strict-mode:
org.dfms.model.mapfeature.Route.geoIsWithinDistance0()]
 [java] [Near : {... cle_type == type  geoIsWithinDistance0.evaluate(
}]
 [java]  ^ : [Rule
name='VehicleAtRouteStart-update']

where geo are custom evaluator.

What do you think?


On Fri, Jun 1, 2012 at 5:29 PM, Mario Fusco mario.fu...@gmail.com wrote:

 Hi Matteo,

 Drools loads conf files from several places and merge them including home
 directory, meta-inf directory, etc. This is the class that does this job
 and
 as you can see it isn't changed in the last year:


 https://github.com/mariofusco/droolsjbpm-knowledge/blob/master/knowledge-api/src/main/java/org/drools/util/ChainedProperties.java

 In particular, as you can see at line 71, it should try to load the conf
 file also from your home folder. I don't know why it is not working in your
 case. Probably are you launching it with the wrong user? Alternatively you
 could also try to put that conf file in a folder named META_INF in your
 classpath.

 I hope this helps,
 Mario

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

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


Re: [rules-users] drools.packagebuilder.conf

2012-06-01 Thread Edson Tirelli
 Ok, it seems the problem is not the configuration file then, but the
operator itself. There were some changes on how MVEL analyzes and executes
expressions and this seems to be related to that...

 Can you provide an isolated test case with your operator so that we
can reproduce the problem?

 Thanks.

On Fri, Jun 1, 2012 at 11:51 AM, Matteo Cusmai cusmaimat...@gmail.comwrote:

 Hi Mario,
 i have tried to put it every where.

 The strange thing is that if i use 5.3 it is with file under
 /home/myhomefolder and if i use 5.4 i get this error:

 ERROR [2012-06-01 17:37:27,588] [VSensorLoader-Thread0]
 (ExpertSystemManager.java:63) - Unable to Analyse Expression
 $vehicle_type == type  geoIsWithinDistance0.evaluate( $location,
 source.getGeometry() ):
  [java] [Error: unable to resolve method using strict-mode:
 org.dfms.model.mapfeature.Route.geoIsWithinDistance0()]
  [java] [Near : {... cle_type == type 
 geoIsWithinDistance0.evaluate( }]
  [java]  ^ : [Rule
 name='VehicleAtRouteStart-event']
  [java] Unable to Analyse Expression $vehicle_type == type 
 geoIsWithinDistance0.evaluate( $location, source.getGeometry() ):T
  [java] [Error: unable to resolve method using strict-mode:
 org.dfms.model.mapfeature.Route.geoIsWithinDistance0()]
  [java] [Near : {... cle_type == type 
 geoIsWithinDistance0.evaluate( }]
  [java]  ^ : [Rule
 name='VehicleAtRouteStart-update']

 where geo are custom evaluator.

 What do you think?



 On Fri, Jun 1, 2012 at 5:29 PM, Mario Fusco mario.fu...@gmail.com wrote:

 Hi Matteo,

 Drools loads conf files from several places and merge them including home
 directory, meta-inf directory, etc. This is the class that does this job
 and
 as you can see it isn't changed in the last year:


 https://github.com/mariofusco/droolsjbpm-knowledge/blob/master/knowledge-api/src/main/java/org/drools/util/ChainedProperties.java

 In particular, as you can see at line 71, it should try to load the conf
 file also from your home folder. I don't know why it is not working in
 your
 case. Probably are you launching it with the wrong user? Alternatively you
 could also try to put that conf file in a folder named META_INF in your
 classpath.

 I hope this helps,
 Mario

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/rules-users-drools-packagebuilder-conf-tp4017706p4017723.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




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


Re: [rules-users] drools.packagebuilder.conf

2012-06-01 Thread Mario Fusco
Matteo,

I don't think the problem is in the resolution of the conf file. More likely
the file is loaded and parsed correctly, but then, for some reason, the DRL
compiler isn't able to find your custom evaluators. 

I'd need to reproduce your problem to better figure out what's going wrong.
Can you send me the source code of one of your evaluators, the conf file
defining it and a DRL with a rule using it? It will be even better if you
could open a Jira ticket, assign it to me and attach the failing example I
am asking there.

Thanks a lot,
Mario

--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-drools-packagebuilder-conf-tp4017706p4017726.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] Re-loading of guvnor resource at drools-camel-server

2012-06-01 Thread bhochhi
I am using drools-camel-server 5.4 final to execute the rules fetched from
guvnor at follows:

drools:resource type=PKG
source=http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/mypackage/Test;
basic-authentication=enabled
username=test password=test /
/drools:resources
drools:ksession id=ksession1 type=stateless
kbase=kbase node=node1 /

how can I reload or rebuild the knowledgebase so that any changes in the
rules instantly get reflected on execution server?



--
View this message in context: 
http://drools.46999.n3.nabble.com/Re-loading-of-guvnor-resource-at-drools-camel-server-tp4017727.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] drools.packagebuilder.conf

2012-06-01 Thread Matteo Cusmai
Hi Mario,
i am trying to extract an example from my project, creating a simple drools
project under eclipse.
But when i try to create project with version 5.4 of drools, eclipse is not
able to use 5.4. I get a compilation error on sample classes.

i have added drools 5.4 as runtime into eclipse, select it for new project,
but i get a compilation error.
Do you have an idea?

On Fri, Jun 1, 2012 at 6:13 PM, Mario Fusco mario.fu...@gmail.com wrote:

 Matteo,

 I don't think the problem is in the resolution of the conf file. More
 likely
 the file is loaded and parsed correctly, but then, for some reason, the DRL
 compiler isn't able to find your custom evaluators.

 I'd need to reproduce your problem to better figure out what's going wrong.
 Can you send me the source code of one of your evaluators, the conf file
 defining it and a DRL with a rule using it? It will be even better if you
 could open a Jira ticket, assign it to me and attach the failing example I
 am asking there.

 Thanks a lot,
 Mario

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

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


Re: [rules-users] drools.packagebuilder.conf

2012-06-01 Thread Matteo Cusmai
Hi all,
it seems that i have solved.

the problem was, as said by Edson, in mvel analyze.

In following rule:

rule VehicleAtRouteStart-event
dialect mvel
no-loop
when
$obs: VehicleMatchedObservation( $vehicle_id : vehicle_id,
$location : location, $road_line : road_line, $vehicle_type : vehicle_type
) over window:time(15m) from entry-point lowLevelSensorStream
$route: Route( $vehicle_type == type , $location
geoIsWithinDistance[10m] source.getGeometry() , $routeid : id )
not VehicleAtRouteStart( this before[ 0, 10m ] $obs, vehicleId ==
$vehicle_id )
then
insert ( SituationManager.createVehicleAtRouteStart(Vehicle at the
beginning of route  + $vehicle_type, Event.THREAT_NO, $location,
$obs.getSensorId(), $routeid, $vehicle_id) );
end

the problem was in red.
I have solved by inverting object of operator:

$route: Route( $vehicle_type == type , source.getGeometry()
geoIsWithinDistance[10m] $location , $routeid : id )

Is this the update to mvel?



On Fri, Jun 1, 2012 at 7:00 PM, Matteo Cusmai cusmaimat...@gmail.comwrote:

 Hi Mario,
 i am trying to extract an example from my project, creating a simple
 drools project under eclipse.
 But when i try to create project with version 5.4 of drools, eclipse is
 not able to use 5.4. I get a compilation error on sample classes.

 i have added drools 5.4 as runtime into eclipse, select it for new
 project, but i get a compilation error.
 Do you have an idea?


 On Fri, Jun 1, 2012 at 6:13 PM, Mario Fusco mario.fu...@gmail.com wrote:

 Matteo,

 I don't think the problem is in the resolution of the conf file. More
 likely
 the file is loaded and parsed correctly, but then, for some reason, the
 DRL
 compiler isn't able to find your custom evaluators.

 I'd need to reproduce your problem to better figure out what's going
 wrong.
 Can you send me the source code of one of your evaluators, the conf file
 defining it and a DRL with a rule using it? It will be even better if you
 could open a Jira ticket, assign it to me and attach the failing example I
 am asking there.

 Thanks a lot,
 Mario

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



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


Re: [rules-users] drools.packagebuilder.conf

2012-06-01 Thread Edson Tirelli
   It still looks like a bug... if you can submit the test case, we can fix
it.

   Edson

On Fri, Jun 1, 2012 at 2:07 PM, Matteo Cusmai cusmaimat...@gmail.comwrote:

 Hi all,
 it seems that i have solved.

 the problem was, as said by Edson, in mvel analyze.

 In following rule:

 rule VehicleAtRouteStart-event
 dialect mvel
 no-loop
 when
 $obs: VehicleMatchedObservation( $vehicle_id : vehicle_id,
 $location : location, $road_line : road_line, $vehicle_type : vehicle_type
 ) over window:time(15m) from entry-point lowLevelSensorStream
 $route: Route( $vehicle_type == type , $location
 geoIsWithinDistance[10m] source.getGeometry() , $routeid : id )
 not VehicleAtRouteStart( this before[ 0, 10m ] $obs, vehicleId ==
 $vehicle_id )
 then
 insert ( SituationManager.createVehicleAtRouteStart(Vehicle at
 the beginning of route  + $vehicle_type, Event.THREAT_NO, $location,
 $obs.getSensorId(), $routeid, $vehicle_id) );
 end

 the problem was in red.
 I have solved by inverting object of operator:

 $route: Route( $vehicle_type == type , source.getGeometry()
 geoIsWithinDistance[10m] $location , $routeid : id )

 Is this the update to mvel?




 On Fri, Jun 1, 2012 at 7:00 PM, Matteo Cusmai cusmaimat...@gmail.comwrote:

 Hi Mario,
 i am trying to extract an example from my project, creating a simple
 drools project under eclipse.
 But when i try to create project with version 5.4 of drools, eclipse is
 not able to use 5.4. I get a compilation error on sample classes.

 i have added drools 5.4 as runtime into eclipse, select it for new
 project, but i get a compilation error.
 Do you have an idea?


 On Fri, Jun 1, 2012 at 6:13 PM, Mario Fusco mario.fu...@gmail.comwrote:

 Matteo,

 I don't think the problem is in the resolution of the conf file. More
 likely
 the file is loaded and parsed correctly, but then, for some reason, the
 DRL
 compiler isn't able to find your custom evaluators.

 I'd need to reproduce your problem to better figure out what's going
 wrong.
 Can you send me the source code of one of your evaluators, the conf file
 defining it and a DRL with a rule using it? It will be even better if you
 could open a Jira ticket, assign it to me and attach the failing example
 I
 am asking there.

 Thanks a lot,
 Mario

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/rules-users-drools-packagebuilder-conf-tp4017706p4017726.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




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


Re: [rules-users] drools.packagebuilder.conf

2012-06-01 Thread Matteo Cusmai
Can i send you an zipped eclipse project?

On Fri, Jun 1, 2012 at 8:13 PM, Edson Tirelli ed.tire...@gmail.com wrote:


It still looks like a bug... if you can submit the test case, we can
 fix it.

Edson


 On Fri, Jun 1, 2012 at 2:07 PM, Matteo Cusmai cusmaimat...@gmail.comwrote:

 Hi all,
 it seems that i have solved.

 the problem was, as said by Edson, in mvel analyze.

 In following rule:

 rule VehicleAtRouteStart-event
 dialect mvel
 no-loop
 when
 $obs: VehicleMatchedObservation( $vehicle_id :
 vehicle_id, $location : location, $road_line : road_line, $vehicle_type :
 vehicle_type ) over window:time(15m) from entry-point lowLevelSensorStream
 $route: Route( $vehicle_type == type , $location
 geoIsWithinDistance[10m] source.getGeometry() , $routeid : id )
 not VehicleAtRouteStart( this before[ 0, 10m ] $obs, vehicleId ==
 $vehicle_id )
 then
 insert ( SituationManager.createVehicleAtRouteStart(Vehicle at
 the beginning of route  + $vehicle_type, Event.THREAT_NO, $location,
 $obs.getSensorId(), $routeid, $vehicle_id) );
 end

 the problem was in red.
 I have solved by inverting object of operator:

 $route: Route( $vehicle_type == type , source.getGeometry()
 geoIsWithinDistance[10m] $location , $routeid : id )

 Is this the update to mvel?




 On Fri, Jun 1, 2012 at 7:00 PM, Matteo Cusmai cusmaimat...@gmail.comwrote:

 Hi Mario,
 i am trying to extract an example from my project, creating a simple
 drools project under eclipse.
 But when i try to create project with version 5.4 of drools, eclipse is
 not able to use 5.4. I get a compilation error on sample classes.

 i have added drools 5.4 as runtime into eclipse, select it for new
 project, but i get a compilation error.
 Do you have an idea?


 On Fri, Jun 1, 2012 at 6:13 PM, Mario Fusco mario.fu...@gmail.comwrote:

 Matteo,

 I don't think the problem is in the resolution of the conf file. More
 likely
 the file is loaded and parsed correctly, but then, for some reason, the
 DRL
 compiler isn't able to find your custom evaluators.

 I'd need to reproduce your problem to better figure out what's going
 wrong.
 Can you send me the source code of one of your evaluators, the conf file
 defining it and a DRL with a rule using it? It will be even better if
 you
 could open a Jira ticket, assign it to me and attach the failing
 example I
 am asking there.

 Thanks a lot,
 Mario

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/rules-users-drools-packagebuilder-conf-tp4017706p4017726.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




 --
   Edson Tirelli
   JBoss Drools Core Development
   JBoss by Red Hat @ www.jboss.com

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


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


Re: [rules-users] need help or any links customizing guvnor

2012-06-01 Thread Abdullah Shaikh
I want to add a new editor to Guvnor. Some more details to help figure
out what I am trying to do.

If you go to Browse  Assets  By Category  Home Mortgage 
Eligibility rule  Underage and then click on open, you get this
screen using which you can create/edit the rule graphically.

Thanks,
Abdullah

On Tue, May 29, 2012 at 12:29 AM, Michael Anstis
michael.ans...@gmail.com wrote:
 Do you want to add a new editor to Guvnor, or use a Guvnor editor in your
 own application?

 On 28 May 2012 19:51, Abdullah Shaikh abdullah.shaik...@gmail.com wrote:

 Hi,

 I am new to drools  guvnor. I was able to create simple drl file and
 run from classpath and from guvnor too using url.

 I saw that we can create rules in guvnor but I want to know if we can
 provide UI for creating rules ? I am not sure but I think what I want
 is guided editor ?


 Thanks,
 Abdullah
 ___
 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] Drools Decision Table, multiple actions accumulation

2012-06-01 Thread chsekhar
I am doing a similar example as described in this example in the link from
jboss website and go the section 6.1.3. How Decision Tables Work. (I have
attached the image as well)
http://drools.46999.n3.nabble.com/file/n4017733/example_decision_table.png 

http://docs.jboss.org/drools/release/5.2.0.Final/drools-expert-docs/html/ch06.html
Drools documentation 

In the example they are populating a list in the ACTION. So if a fact
matches couple of rows in the decision table, the list would contain those
two items.

My requirement is I need to have key value pair(Map) as my rule
consequence(ACTION). I was able to do one action which has key,value in a
single column and I was able to work with that. I am trying to find out if i
can have these values in two columns separately in the excel. (My key
actually contains 3 values and combining this with value looks messy. ex:
k1,k2,k3,value. So if can put the value in a separate column it would be
great)

I tried to create a global variable and called setter methods on separate
columns, but the problem is the setters in both the columns(ACTION) run
independently whereas I had to put both of them in a map which would mean I
should be able to pass the value present in both the columns in one method
call.


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


Re: [rules-users] Drools Decision Table, multiple actions accumulation

2012-06-01 Thread Vincent LEGENDRE
 ... which would mean I should be able to pass the value present in both the 
 columns in one method call.

Or create a Pojo for your keys (you should have already one as java maps only 
have one key ...),
instanciate it in the first column in a local (to RHS) variable, 
use setters to set internal keys,
then use this KeyPojo to add your value in the last column.

In DRL  this could be :
...
then
   KeyPojo keys = new KeyPojo();
   keys.setKey1(...);
   ...
   keys.setKeyk(...);
   ...
   keys.setKeyN(...);
   $myMap.put(keys, value);
end

basically, the fist action column will contains the 2 first DRL statements. 
The last action column will contains the 2 last DRL statement.
Intermediate columns only use the setters.

Of course, this works only if you are sure that your first and last action 
columns are always set ...
Otherwise, hope this help !
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] need help or any links customizing guvnor

2012-06-01 Thread Michael Anstis
There was a few emails on this mailing list a couple of weeks ago about
adding an additional file type for jBPM process files.

Have a search for these. Adding a new editor relies upon much of what they
covered.

Out if interest what did you want to add? If of use to the community at
large and you are both willing and able to contribute we'd be happy to hear
:)

sent on the move

On 1 Jun 2012 19:38, Abdullah Shaikh abdullah.shaik...@gmail.com wrote:

 I want to add a new editor to Guvnor. Some more details to help figure
 out what I am trying to do.

 If you go to Browse  Assets  By Category  Home Mortgage 
 Eligibility rule  Underage and then click on open, you get this
 screen using which you can create/edit the rule graphically.

 Thanks,
 Abdullah

 On Tue, May 29, 2012 at 12:29 AM, Michael Anstis
 michael.ans...@gmail.com wrote:
  Do you want to add a new editor to Guvnor, or use a Guvnor editor in your
  own application?
 
  On 28 May 2012 19:51, Abdullah Shaikh abdullah.shaik...@gmail.com
 wrote:
 
  Hi,
 
  I am new to drools  guvnor. I was able to create simple drl file and
  run from classpath and from guvnor too using url.
 
  I saw that we can create rules in guvnor but I want to know if we can
  provide UI for creating rules ? I am not sure but I think what I want
  is guided editor ?
 
 
  Thanks,
  Abdullah
  ___
  rules-users mailing list
  rules-users@lists.jboss.org
  https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 
  ___
  rules-users mailing list
  rules-users@lists.jboss.org
  https://lists.jboss.org/mailman/listinfo/rules-users
 
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

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


Re: [rules-users] Drools Decision Table, multiple actions accumulation

2012-06-01 Thread chsekhar
In the example you had given, how would I be able to pass keys from one
ACTION to another in decision table? It cant be a global variable because
this(keys) has to be a new instance per row. Is there some mechanism in
decision table which would let me refer the values from column into another? 

KeyPojo keys = new KeyPojo();
  keys.setKey1(...);
  ...
  keys.setKeyk(...);
  ...
  keys.setKeyN(...);
  $myMap.put(keys, value);

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


Re: [rules-users] Drools Decision Table, multiple actions accumulation

2012-06-01 Thread Michael Anstis
You cannot merge multiple ACTION columns into a single DRL statement.

If your individual key components can be bound as individual  CONDITION
Colum constraints the ACTION need only contain the value.

sent on the move

On 1 Jun 2012 21:18, chsekhar chandrasekha...@gmail.com wrote:

 In the example you had given, how would I be able to pass keys from one
 ACTION to another in decision table? It cant be a global variable because
 this(keys) has to be a new instance per row. Is there some mechanism in
 decision table which would let me refer the values from column into
 another?

 KeyPojo keys = new KeyPojo();
  keys.setKey1(...);
  ...
  keys.setKeyk(...);
  ...
  keys.setKeyN(...);
  $myMap.put(keys, value);

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

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


Re: [rules-users] drools.packagebuilder.conf

2012-06-01 Thread Mark Proctor

On 01/06/2012 19:16, Matteo Cusmai wrote:

Can i send you an zipped eclipse project?
Please don't do that. follow the instructions in getting involved on 
how to submit unit tests:

http://docs.jboss.org/drools/release/5.4.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html

Mark


On Fri, Jun 1, 2012 at 8:13 PM, Edson Tirelli ed.tire...@gmail.com 
mailto:ed.tire...@gmail.com wrote:



   It still looks like a bug... if you can submit the test case,
we can fix it.

   Edson


On Fri, Jun 1, 2012 at 2:07 PM, Matteo Cusmai
cusmaimat...@gmail.com mailto:cusmaimat...@gmail.com wrote:

Hi all,
it seems that i have solved.

the problem was, as said by Edson, in mvel analyze.

In following rule:

rule VehicleAtRouteStart-event
dialect mvel
no-loop
when
$obs: VehicleMatchedObservation( $vehicle_id :
vehicle_id, $location : location, $road_line : road_line,
$vehicle_type : vehicle_type ) over window:time(15m) from
entry-point lowLevelSensorStream
$route: Route( $vehicle_type == type , $location
geoIsWithinDistance[10m] source.getGeometry() , $routeid : id )
not VehicleAtRouteStart( this before[ 0, 10m ] $obs,
vehicleId == $vehicle_id )
then
insert (
SituationManager.createVehicleAtRouteStart(Vehicle at the
beginning of route  + $vehicle_type, Event.THREAT_NO,
$location, $obs.getSensorId(), $routeid, $vehicle_id) );
end

the problem was in red.
I have solved by inverting object of operator:

$route: Route( $vehicle_type == type ,
source.getGeometry() geoIsWithinDistance[10m] $location ,
$routeid : id )

Is this the update to mvel?




On Fri, Jun 1, 2012 at 7:00 PM, Matteo Cusmai
cusmaimat...@gmail.com mailto:cusmaimat...@gmail.com wrote:

Hi Mario,
i am trying to extract an example from my project,
creating a simple drools project under eclipse.
But when i try to create project with version 5.4 of
drools, eclipse is not able to use 5.4. I get a
compilation error on sample classes.

i have added drools 5.4 as runtime into eclipse, select it
for new project, but i get a compilation error.
Do you have an idea?


On Fri, Jun 1, 2012 at 6:13 PM, Mario Fusco
mario.fu...@gmail.com mailto:mario.fu...@gmail.com wrote:

Matteo,

I don't think the problem is in the resolution of the
conf file. More likely
the file is loaded and parsed correctly, but then, for
some reason, the DRL
compiler isn't able to find your custom evaluators.

I'd need to reproduce your problem to better figure
out what's going wrong.
Can you send me the source code of one of your
evaluators, the conf file
defining it and a DRL with a rule using it? It will be
even better if you
could open a Jira ticket, assign it to me and attach
the failing example I
am asking there.

Thanks a lot,
Mario

--
View this message in context:

http://drools.46999.n3.nabble.com/rules-users-drools-packagebuilder-conf-tp4017706p4017726.html
Sent from the Drools: User forum mailing list archive
at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
mailto:rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




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




-- 
  Edson Tirelli

  JBoss Drools Core Development
  JBoss by Red Hat @ www.jboss.com http://www.jboss.com

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




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


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


Re: [rules-users] Drools Decision Table, multiple actions accumulation

2012-06-01 Thread chsekhar
I was able to merge data from multiple ACTION columns in decision table. 

First ACTION column: 
(kept all keys as comma separated in single column. we can have it in
individual columns)
KeyPojo keys = new KeyPojo($1,$2,$3);

Second ACTION column:
 $myMap.put(keys, $param);

This worked great. Thanks Vincent for your answer.

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


Re: [rules-users] Drools Decision Table, multiple actions accumulation

2012-06-01 Thread Michael Anstis
But each column became a separate DRL fragment ;) but glad to read you got
it working :)

One for me to remember. Thanks Vincent

sent on the move

On 2 Jun 2012 01:47, chsekhar chandrasekha...@gmail.com wrote:

 I was able to merge data from multiple ACTION columns in decision table.

 First ACTION column:
 (kept all keys as comma separated in single column. we can have it in
 individual columns)
 KeyPojo keys = new KeyPojo($1,$2,$3);

 Second ACTION column:
  $myMap.put(keys, $param);

 This worked great. Thanks Vincent for your answer.

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Drools-Decision-Table-multiple-actions-accumulation-tp4017733p4017740.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