Re: [rules-users] Define a time event
by Christine
> All the above, just to tell you all users that time is not a simple
> concept to support.
With a few limitations, it shouldn't be that difficult. Of course,
re-running a rule base with the same results can't be done if you
incorporate time, but other than that, I don't see the difficulty.
Christine
16 years, 6 months
Property Navigation
by Alessandro Lazarotti
If I've the simple classes:
public class ObjectBar{ public String name; gets/sets}
public class ObjectFoo{ public ObjectBar bar; gets/sets }
... and ObjectFoo this in WorkingMemory.
It's not possible navigate in objectFoo for make constraint in objectBar?
Example:
rule "Teste"
no-loop true
when
$foo: ObjectFoo(objectBar.name != "foobar")
then
System.out.println($foo);
end
... but:
org.drools.RuntimeDroolsException: Exception executing predicate
org.drools.base.mvel.MVELPredicateExpression@18488ef
Caused by: org.mvel.CompileException: unable to resolve property: nome
Caused by: org.mvel.PropertyAccessException: unable to resolve property:
nome
Thanks
Alessandro Lazarotti
16 years, 6 months
Replacement not found for ${wsp.name}.
by Vikas Phonsa
Hi Everybody,
I'm a newbie to Drools. I am trying to run BRMS on Websphere 6.1. The
application started up fine with the default settings.
Now I'm trying to use MS SQL Server instead of Derby. I replaced the
DerbyPersistanceManager settings with the following values in the
repository.xml
<PersistenceManager
class="org.apache.jackrabbit.core.persistence.db.SimpleDbPersistenceMana
ger">
<param name="driver"
value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
<param name="url"
value="jdbc:microsoft:sqlserver://MyMachine:1433;;DatabaseName=Drools;Se
lectMethod=Cursor;"/>
<param name="schema" value="mssql"/>
<param name="user" value="droolsuser"/>
<param name="password" value="droolspwd"/>
<param name="schemaObjectPrefix" value="${wsp.name}_"/>
<param name="externalBLOBs" value="false"/>
</PersistenceManager>
When I start up the server, I get an exception with message "Replacement
not found for ${wsp.name}."
If I replace "${wsp.name}." with "default_", the application starts up
successfully and tables are created in my database.
Does anybody have a clue?
Thanks in advance for your help.
Vikas
This email and/or any files or attachments transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this e-mail and/or any files or attachments transmitted with it is strictly forbidden. If you have received this email in error, please delete the e-mail and/or any files or attachments, and also notify the system manager (PostMaster(a)mercuryinsurance.com) of the error. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email and/or any files or attachments transmitted with it.
16 years, 6 months
Re: [rules-users] Date arithmetic in âwhenâ session
by Christine
Hi,
you shouldn't put part of the "if" or "when" part after the "then". Put
all conditions after the "when" so the rule engine will evaluate them.
I guess you mean to write something like (although I haven't tested this):
rule "ITR Discard"
when
req : LowFareRequest(
$reqTime : requestedDeparture.time)
itr : AirItinerary( discarded == false )
flight : Flight(
departure.time - 2 * 3600000 <
$reqTime,
departure.time + 4 * 3600000 >
$reqTime)
then
System.out.println("discard true");
end
Christine
16 years, 6 months
Exception while deploying drools-jbrms 4.0.4
by Jonathan Guéhenneux
Hi,
I can't deploy the war drools-jbrms 4.0.4 because I got this error. I'm using apache tomcat 5.5.17 and Eclipse 3.3.2.
java.lang.RuntimeException: Could not create Component: org.jboss.seam.security.identity
at org.jboss.seam.init.Initialization.addComponent(Initialization.java:964)
at org.jboss.seam.init.Initialization.installComponents(Initialization.java:891)
at org.jboss.seam.init.Initialization.init(Initialization.java:547)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Caused by: java.lang.NoClassDefFoundError: javax/faces/application/FacesMessage$Severity
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getDeclaredMethods(Class.java:1791)
at org.jboss.seam.Component.initMembers(Component.java:546)
at org.jboss.seam.Component.<init>(Component.java:254)
at org.jboss.seam.Component.<init>(Component.java:217)
at org.jboss.seam.init.Initialization.addComponent(Initialization.java:949)
... 18 more
It seams there are missing classes, what can I do?
_________________________________________________________________
Votre contact a choisi Hotmail, l'e-mail ultra sécurisé. Créez un compte gratuitement !
http://www.windowslive.fr/hotmail/default.asp
16 years, 6 months
Re: [rules-users] Define a time event
by Christine
Talking about date and time, how do I get current date in a when condition?
dagdag
Christine
> Exactly. Also, you need to make sure you "tell the engine" everytime
> your
> Time object change, as well as ensure that fireAllRules will be called at
> the exact time: 22:00, because if it is called 1 minute later or before,
> the
> constraint will evaluate to false.
>
> Edson
>
>
> 2008/5/7 Christine <christine(a)christine.nl>:
>
>> > Hi everyone,
>>
>> > For example:
>> > when Time(hour==22,minute==0) Lamp(status==1)
>> > then
>> > Console.Writeline("It's late,turn off the light and go to bed")
>> > where time is a class that return the current hour;
>>
>> Claudio, this would probably work if you fire the rules every hour or
>> every minute or every time your Time object changes. Just having the
>> rules
>> sitting in your rulebase doesn't mean they get executed.
>>
>> Christine
>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users(a)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(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
16 years, 6 months
generic property access
by vadimar
Hi,
I'm considering to use drools. Unfortunately all my WM objects (facts) are
not Java beans. All properties are accessed in generic way (similar to
Properties in java)
T getProperty(String name)
void setProperty(String name, T value)
Is drools relevant for me? How this can be overcome in rule definition?
Thanks,
Vadim
--
View this message in context: http://www.nabble.com/generic-property-access-tp17104359p17104359.html
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 6 months
generic property access
by Vadim Arshavsky
Hi,
I'm considering to use drools. Unfortunately all my WM objects (facts) are
not Java beans. All properties are accessed in generic way (similar to
Properties in java)
T getProperty(String name)
void setProperty(String name, T value)
Is drools relevant for me? How this can be overcome in rule definition?
Thanks,
Vadim
16 years, 6 months
Drools-BRMS at jboss-5.0.0.Beta4
by ravi thalupula
Hi All,
How to deploy drools-4.0.4-brms successfully in jboss-5.0.0.Beta4 version?
its working at jboss-4.x.
Any specific changes to need to do at library level?
root cause:
19:44:54,971 INFO [Scanner] scanning:
C:\java\jboss-5.0.0.Beta4\server\default\deploy\drools-jbrms.war\WEB-INF\lib\jboss-seam-2.0.0.CR2.jar
19:44:54,971 WARN [Scanner] could not read entries
java.util.zip.ZipException: The system cannot find the path specified
Thanks in advance.
Ravi Thalupula
16 years, 6 months
Urgent Help Required
by Nikhil Sharma
Hi,
I have 3 classes Itinerary,Leg and StopOver.
Itinerary has a collection(ArrayList) of Leg, Leg has a collection (ArrayList) of StopOver. Stopover has a property airlinecode. All classes nave appropriate getter's/setter's for member variables.
I want to set some commission amount if airlinecode for all stopovers from all legs for an Itinerary is from a particular airline.
Being a new drool user I am stuck.Hw could I achieve this.
Thanx
Nik
16 years, 6 months