adding constraints in DSL
by Chandana Pingle
Hi,
i need to add multiple constraints on the same field
example
There is a Cheese with
- age is less than 42 or age is more than 60
- age is not in ("20" ," 30", "40")
how can i write this in DRL and DSL?
Thanks
chandana
15 years, 1 month
Drools Fusion aggregate functions
by PF
Hi,
Does Drools Fusion provides any kind of aggregate functions over events
(count, sum, etc.) or these should be created as rules with intermediate
results exchanged through the database (inserted and delated facts)?
Regards,
Paul Fodor.
15 years, 1 month
Re: [rules-users] For each - properties
by Bill Tarr
Betto,
I just went down this road with ForEach in DroolsFlow. The documentation on those properties was a little lacking in my opinion.
CollectionExpression = should be an expression that resolves to a java.util.Collection. So a Person has a List<Loans>, and your flow has a variable person which you set, the expression could be:
person.loans
VariableName = is the name given to the current item you are passing in. Perhaps just loan. That is the variable that will be passed into your subflow (or RuleGroup in your case.)
I did a similar thing with for a demo, but ran into another problem. I called a Subflow from within the ForEach, and passed in my variable (lets say loan.) I could access the variable easily enough in Actions, using code - like
loan.getStatus().equals("Approved")
but have not been able to get a RULE to execute against that variable. Like
$loan : Loan (status == "Approved")
Not sure what the problem was with my code, but will revisit later.
I bring that up in case you run into it because you are just calling a rule within your ForEach. Maybe try a simple code action first, something like
System.out.println(loan.getStatus());
Anyway, let me know how it goes. Kind of nice to see someone going down the same road...
Bill
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
15 years, 1 month
How to avoid hardcoded URL in the ChangeSet resource XML file?
by Blythe, Marshall
Is there any way to avoid using hardcoded URLs in the ChangeSet resource XML file? I'd like to be able to parameterize that bit of data and substitute the actual value at runtime. For example, something like this would be nice:
<change-set xmlns='http://drools.org/drools-5.0/change-set'
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
xs:schemaLocation='http://drools.org/drools-5.0/change-set.xsd'>
<add>
<resource source='${rules.url}' type='DRL' />
</add>
</change-set>
${rules.url} would be read from a resource bundle (i.e. property file) at runtime. Is there some extension point that I can use to implement this behavior?
----------------------------------------- This e-mail and any attachments may contain CONFIDENTIAL information, including PROTECTED HEALTH INFORMATION. If you are not the intended recipient, any use or disclosure of this information is STRICTLY PROHIBITED; you are requested to delete this e-mail and any attachments, notify the sender immediately, and notify the LabCorp Privacy Officer at privacyofficer(a)labcorp.com or call (877) 23-HIPAA.
15 years, 1 month
[DroosFlow] Restore the StatefulKnowledgeSession
by Anderson vasconcelos
Hi
I'm have a flow with two moments. First the *client* created the task.
Second the *user* approve the task. The Second can occurred in another
day, year, month. Has one way to persist the StatefulKnowledgeSession in
database and recuperated them again?
This is necessary:
1) Because my Application Server can crash and i need to recuperated my
session
2) Because i need to update the facts after *user* approve task
Thanks
15 years, 1 month
Conversion from Normal Decision Tables to Web-Based Tables and vice-versa
by Vikrant Yagnick
Hi All,
I am wondering if anyone has had a requirement where they would need to convert their normal decision tables into web-based decision tables(or vice-versa).
If someone has already done this, can they share either some code or pointers to how this can be done? (I guess it will involving parsing the Excel and creating the XML for the decision table).
Will this be a useful feature to have?
Cheers,
Vikrant
MASTEK LTD.
Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 years, 1 month
Mail System Error - Returned Mail
by Mail Delivery Subsystem
The original message was received at Mon, 5 Oct 2009 06:09:22 +0200 from 136.108.8.185
----- The following addresses had permanent fatal errors -----
<rules-users(a)lists.jboss.org>
15 years, 1 month
unable to resolve method using strict-mode
by Vladimir Perlov
Hi everyone,
My drools rules failed to compile from web application deployed on Glassfish(application server) that run on Fedora 11 (Linux distro from RedHat).
When I deploy the application on application server with Windows machine everything is working fine.
Also it works if application made as regular Java SE application.
I got the following error:
Unable to build expression for 'consequence': Failed to compile: 3
compilation error(s): - (1,4) unqualified type in strict mode for: $map
- (1,13) unable to resolve method using strict-mode:
java.lang.Object.get(java.lang.String) - (1,29) unable to resolve
method using strict-mode: java.lang.Object.getSomeMethod() '
System.out.println($map.get("x").getSomeMethod());
' : [Rule name='TEST']
Here is the rule that failed to compile on Linux:
rule "TEST"
dialect "mvel"
Send
when
map : Map()
then
System.out.println($map.get("x").getSomeMethod());
end
My Environment:
Fedora 11
JDK 1.6
Glassfish v3 build 65 (supported JAVA EE6)
I really need to resolve the issue as soon as possible. Any idea would be highly appreciated.
Thanks in advance,
Vladimir
_________________________________________________________________
Lauren found her dream laptop. Find the PC that’s right for you.
http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290
15 years, 1 month
Problem in accessing change-set.xml for decision table entry
by Nikhil S. Kulkarni
Hi,
I am using Drools 5
I am facing following issue :-
While trying to access change-set.xml with decision table entry, I am getting NULLPOINTEREXCEPTION
Following code is change-set.xml :-
e.g.
<?xml version="1.0" encoding="UTF-8"?>
<change-set xmlns='http://drools.org/drools-5.0/change-set'
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
xs:schemaLocation='http://drools.org/drools-5.0/change-set.xsd'>
<add>
<resource source='classpath:data/abc.xls' type="DTABLE">
<decisiontable-conf input-type="XLS" worksheet-name="Tables" />
</resource>
</add>
</change-set>
Please Reply If anybody is able to access decision table in this way.
Waiting for Reply.
Thanks & Regards,
Nikhil S. Kulkarni
MASTEK LTD.
Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 years, 1 month
Latest Drools with Latest Eclipse
by Chris Richmond
Is it possible to run all the latest Drools 5.1.0 with the latest version of
Eclipse and the Elipse plugins, etc? Has anyone successfully done this?
Also, I remember seeing a link to a testing framework within the IDE on the
drools blog at some time, but cannot seem to locate it. Does anyone know
what I am talking about and can provide the link?
Thanks,
Chris
15 years, 1 month