Re: [rules-users] How Can I share data in different Scope and Contexts ?

2007-12-07 Thread Mark Proctor

Saul wrote:
Hi. I am new with drools,  I have being thinking if drools can do the 
following requirement, I have a application with different context:


1. aplicationContext: keep all information an fact relationship with the 
system ( calendar, configuration data, etc)
2. sessionContext: keep information an fact of my session ( user information, 
module data ( loan module), etc)
3. serviceContext: keep information an fact of the services ( open loan, 
payment loan , etc)


My question is: Can I have different context or scope (with data) linking to 
the working memory (WM). My target is keeping the information shareable 
between different context and fire rule in ServiceContext using the data from 
my previous contexts (application and session).


Or I have to create one WM to every Service Context and insert all my fact of 
the others context (application and session), I don´t like this one.
  
All data that you wish the engine to reason over must be asserted into 
the engine.


Best Regard

Paul Cuesta


___
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] How Can I share data in different Scope and Contexts?

2007-12-07 Thread Saul Cuesta
 

Hi. I am new with drools,  I have being thinking if drools can do the
following requirement, I have a application with different context:

 

1. aplicationContext: keep all information an fact relationship with the
system ( calendar, configuration data, etc)

2. sessionContext: keep information an fact of my session ( user
information, module data ( loan module), etc)

3. serviceContext: keep information an fact of the services ( open loan,
payment loan , etc)

 

My question is: Can I have different context or scope (with data) linking to
the working memory (WM). My target is keeping the information shareable
between different context and fire rule in ServiceContext using the data
from my previous contexts (application and session).

 

Or I have to create one WM to every Service Context and insert all my fact
of the others context (application and session), I don´t like this one.

 

 

Best Regard

 

Paul Cuesta

 

 

 

 

 

 

 

 

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


[rules-users] How Can I share data in different Scope and Contexts ?

2007-12-07 Thread Saul
Hi. I am new with drools,  I have being thinking if drools can do the 
following requirement, I have a application with different context:

1. aplicationContext: keep all information an fact relationship with the 
system ( calendar, configuration data, etc)
2. sessionContext: keep information an fact of my session ( user information, 
module data ( loan module), etc)
3. serviceContext: keep information an fact of the services ( open loan, 
payment loan , etc)

My question is: Can I have different context or scope (with data) linking to 
the working memory (WM). My target is keeping the information shareable 
between different context and fire rule in ServiceContext using the data from 
my previous contexts (application and session).

Or I have to create one WM to every Service Context and insert all my fact of 
the others context (application and session), I don´t like this one.


Best Regard

Paul Cuesta


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


[rules-users] Error Importing DRL into BRMS

2007-12-07 Thread Jason Lee
Hi.  I'm pretty new to drools (this is my second week  :).  When I try 
to create a new package in the BRMS by importing from a DRL file, I get 
this error message, which I'm hoping someone more experienced can make 
sense of:


Unable to import into the package. [Unable to process import: 
javax.jcr.RepositoryException: failed to resolve path relative to 
/drools:repository/drools:package_area/gov.faa.wmt.scheduling.rules/assets: 
Empty path element: : Empty path element: ]


There's no stack trace in the logs that I can see (the BRMS is hosted by 
GlassFish, fwiw).  The DRL is 188 lines long.  Not too long, I guess, 
but I'll not clutter things unless someone really needs to see my (ugly) 
rules file. :P  Thanks!


--
Jason Lee, SCJP
Software Architect -- Objectstream, Inc.
Project Mojarra Dev Team
http://blogs.steeplesoft.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] memberOf in a eval statement (dialect mvel)

2007-12-07 Thread Edson Tirelli
   Not sure why do you want to do that. Better would be to simply:

rule "Your 5 Rule"
dialect "mvel"
when
 $l:ArrayList( this contains "test" )
then
#actions
System.out.println("OK");
end

   If you want to do that inside an eval, MVEL does not have "memberOf"
operator, but it has "contains", so just write:

eval( $l contains "test" )

   []s
   Edson


2007/12/7, vdelbart <[EMAIL PROTECTED]>:
>
>
> Hi,
>
> I want to use the keyword memberOf in an eval statement (with dialect =
> mvel).
>
> rule "Your 5 Rule"
> dialect "mvel"
> when
>  $l:ArrayList()
>  eval("test" memberOf $l)
> then
> #actions
> System.out.println("OK");
> end
>
> but it doesn't work, and I don't understand the error :
> Caused by: java.lang.ClassCastException: java.lang.String
> at
> org.drools.base.mvel.MVELEvalExpression.evaluate(MVELEvalExpression.java
> :36)
> at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:72)
> ... 12 more
>
> Thanks for your help,
>
> V.
> --
> View this message in context:
> http://www.nabble.com/memberOf-in-a-eval-statement-%28dialect-mvel%29-tf4962683.html#a14214524
> 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
>



-- 
  Edson Tirelli
  JBoss Drools Core Development
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @ www.jboss.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] memberOf in a eval statement (dialect mvel)

2007-12-07 Thread vdelbart

Hi,

I want to use the keyword memberOf in an eval statement (with dialect =
mvel).

rule "Your 5 Rule"
dialect "mvel" 
when
 $l:ArrayList()  
 eval("test" memberOf $l)
then 
#actions
System.out.println("OK");
end

but it doesn't work, and I don't understand the error :
Caused by: java.lang.ClassCastException: java.lang.String
at
org.drools.base.mvel.MVELEvalExpression.evaluate(MVELEvalExpression.java:36)
at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:72)
... 12 more

Thanks for your help,

V.
-- 
View this message in context: 
http://www.nabble.com/memberOf-in-a-eval-statement-%28dialect-mvel%29-tf4962683.html#a14214524
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] Using JBoss Rules in cases where users need to add / remove rules

2007-12-07 Thread RameshKesavanarayanan

Hi,

 Is there a smaple code snippet which I could re-use. I have the same
situation in my application where in the user will be entering the rules via
the UI and I need to create the entries in the drl file and fire them at the
end.

Do send the sample to my email ID [EMAIL PROTECTED]

Regards

Ramesh.K 
-- 
View this message in context: 
http://www.nabble.com/Using-JBoss-Rules-in-cases-where-users-need-to-add---remove-rules-tf4217208.html#a14214515
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] [RePost] Deploying insurance example into JBoss...

2007-12-07 Thread mmquelo massi
Sorry For Multiple posting but I had problems with the last post

I deleted all the active links and I hope that It works.

The post has been rendered as follows: "weft didn't produce an output."

massi



Hi guys,

I got troubled trying to deploy the "Insurance example" in JBoss.

I tell you, step by step, what I did.

1. I downloaded "drools-4.0.3-examples.zip" from JBoss site.
2. I extracted the "insurance-example" into directory "insurance".
3. I downloaded and installed maven 1.8.
4. I opened a "cmd" shell and I executed the command: mvn clean package.
5. I got back the following error message:

C:\Users\mmquelo\Documents\Eclipse Workspaces\insurance33\insurance>mvn -e
clean  package
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]

[INFO] Building DroolsInsurance
[INFO]task-segment: [clean, package]
[INFO]

Downloading:
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.1/maven-clean-plugin-2.1.pom
Downloading:
http://repository.jboss.com/maven2/org/apache/maven/plugins/maven-clean-plugin/2.1/maven-
clean-plugin-2.1.pom
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.1/maven-
clean-plugin-2.1.pom
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Error building POM (may not be this project's POM).
Project ID: org.apache.maven.plugins:maven-clean-plugin
Reason: POM 'org.apache.maven.plugins:maven-clean-plugin' not found in
repositor y: Unable to download the artifact from any repository
  org.apache.maven.plugins:maven-clean-plugin:pom:2.1
from the specified remote repositories:
  jbossRepository (
http://repository.jboss.com/maven2),
  central (
http://repo1.maven.org/maven2)
 for project org.apache.maven.plugins:maven-clean-plugin
[INFO]

[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Unable to build
project
for plugin 'org.apache.maven.plugins:maven-clean-plugin': POM '
org.apache.maven.
plugins:maven-clean-plugin' not found in repository: Unable to download the
arti
fact from any repository
  org.apache.maven.plugins:maven-clean-plugin:pom:2.1
from the specified remote repositories:
  jbossRepository (
http://repository.jboss.com/maven2),
  central (
http://repo1.maven.org/maven2)
 for project org.apache.maven.plugins:maven-clean-plugin
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(
DefaultLifecycleExecutor.java:1274)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor
(DefaultLifecycleExecutor.java:1522)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindLifecycleForPackaging
(DefaultLifecycleExecutor.java:1016)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMappings
(DefaultLifecycleExecutor.java:980)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
DefaultLifecycleExecutor.java:458)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
(DefaultLifecycleExecutor.java:311)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:278)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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.plugin.InvalidPluginException: Unable to build
proje
ct for plugin 'org.apache.maven.plugins:maven-clean-plugin': POM '
org.apache.mav
en.plugins:maven-clean-plugin' not found in repository: Unable to download
the a
rtifact from any repository
  org.apache.maven.plugins:maven-clean-plugin:pom:2.1
from the specified remote repositories:
  jbossRepository (
http://repository.jboss.com/maven2),
  central (
http://repo1.maven.org/maven2)
 for project org.apache.maven.plugins:maven-clean-plugin
at
org.apache.maven.plugi

[rules-users] Deploying insurance example into JBoss...

2007-12-07 Thread mmquelo massi
Hi guys,

I got troubled trying to deploy the "Insurance example" in JBoss.

I tell you, step by step, what I did.

1. I downloaded "drools-4.0.3-examples.zip" from JBoss site.
2. I extracted the "insurance-example" into directory "insurance".
3. I downloaded and installed maven 1.8.
4. I opened a "cmd" shell and I executed the command: *mvn clean package*.
5. I got back the following error message:


*C:\Users\mmquelo\Documents\Eclipse Workspaces\insurance33\insurance>mvn -e
clean  package
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]

[INFO] Building DroolsInsurance
[INFO]task-segment: [clean, package]
[INFO]

Downloading: **
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean*
*-*
* plugin/2.1/maven-clean-plugin-2.1.pom
Downloading: **
http://repository.jboss.com/maven2/org/apache/maven/plugins/maven-c*
*lean-plugin/2.1/maven-clean-plugin-2.1.pom*
* Downloading: **
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean*
*-*
* plugin/2.1/maven-clean-plugin-2.1.pom
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Error building POM (may not be this project's POM).*
 *Project ID: org.apache.maven.plugins:maven-clean-plugin*
*Reason: POM 'org.apache.maven.plugins:maven-clean-plugin' not found in
repositor y: Unable to download the artifact from any repository*
*  org.apache.maven.plugins:maven-clean-plugin:pom:2.1*
*from the specified remote repositories:   jbossRepository (**
http://repository.jboss.com/maven2* *),*
*   central (**http://repo1.maven.org/maven2*
*)*
*  for project org.apache.maven.plugins:maven-clean-plugin*
 *[INFO]
*
* [INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Unable to build
project
for plugin 'org.apache.maven.plugins:maven-clean-plugin': POM '
org.apache.maven.
plugins:maven-clean-plugin' not found in repository: Unable to download the
arti
fact from any repository*
*  org.apache.maven.plugins:maven-clean-plugin:pom:2.1*
*from the specified remote repositories:   jbossRepository (**
http://repository.jboss.com/maven2* *),*
*   central (**http://repo1.maven.org/maven2*
*)*
*  for project org.apache.maven.plugins:maven-clean-plugin
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin
(Defa
ultLifecycleExecutor.java:1274)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor
(DefaultLifecycleExecutor.java:1522)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindLifecycleForP
ackaging(DefaultLifecycleExecutor.java:1016)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycl
eMappings(DefaultLifecycleExecutor.java:980)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
(Defau
ltLifecycleExecutor.java:458)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:311)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:278)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
(DefaultLi
fecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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.plugin.InvalidPluginException: Unable to build proje
ct for plugin 'org.apache.maven.plugins:maven-clean-plugin': POM '
org.apache.mav
en.plugins:maven-clean-plugin' not found in repository: Unable to download
the a
rtifact from any repository*
*  org.apache.maven.plugins:maven-clean-plugin:pom:2.1*
*from the specifi