Problem in deploying drools-guvnor on oc4j 10 and websphere 6.1
by Nikhil S. Kulkarni
Hi,
I am facing following issue :-
I am using Drools Guvnor 5.
I am trying to deploy guvnor on oc4j 10 but it is giving me subcontext Problem.
Similarly on WebSphere 6.1 it is showing me incompatibility Problem.
How to deploy on any one of those.
Looking forward to Listen from you.
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, 3 months
loading rules dynamically
by techy
Hi,
If the rules,conditions,consequences have to loaded from the database. I
can think of following two approach. what would be right approach( I will
have upto 1200 rules in the db)
1. Programmatically inject the rules into rule engine using drools API.
2. Read the rules from the database and create drl or dsl file for them and
inject into rule engine.
Thanks
--
View this message in context: http://www.nabble.com/loading-rules-dynamically-tp20274919p20274919.html
Sent from the drools - user mailing list archive at Nabble.com.
15 years, 3 months
Re: [rules-users] Using work items in the Eclipse ruleflow editor
by Jeremy Ary
For completeness, just a quick note for others who may find themselves here. I spoke with Mike briefly via IRC and the issue appeared to be in getting the files on the classpath correctly. This was ultimately the same thing that I went up against, so iIf you're not sure how to get that wired up, an example follows. I'm certainly far from novice, so any recommendations/improvements are welcome.
Start a new Drools project (you will see two packages already on the classpath - src/main/java & src/main/rules )
Right-click the project name in Package Explorer and select New > Source Folder
Name the new folder "src/main/resources" in the popup
Right-click the new source folder and select New > Folder and call it "META-INF" in the popup
Place your drools.rulebase.conf and custom definitions .conf file into the META-INF folder
Restart Eclipse and open a .rf file - you should now see your custom work items in place
Jeremy
----- Original Message -----
From: "Jeremy Ary" <jary(a)franklinamerican.com>
To: "Rules Users List" <rules-users(a)lists.jboss.org>
Sent: Monday, September 21, 2009 11:46:30 AM GMT -06:00 US/Canada Central
Subject: Re: [rules-users] Using work items in the Eclipse ruleflow editor
Mike,
I ran into a similar issue when I began working with ruleflows a few weeks ago. Some of this may not be necessary and it's certainly not all causal, but this was what I noted when working my issue out:
1) If you're working in JBoss Dev Studio, it's possible that you have a conflict between the code you added as a runtime and what's already there, so try the process with a fresh install of eclipse
2) Ensure that any projects you currently have open do not have build/lib/classpath issues (I had the drools projects checked out and open and build errors caused unnecessary complications for me)
3) Be sure that your project has a META-INF on the classpath and that it's set up correctly
4) Place your drools.rulebase.conf & custom definitions .conf that it looks for are both in your META-INF under resources (src/main/resources/META-INF)
5) Once you're sure this much is correct, give Eclipse a restart - my project did not pick up my custom WI's until I restarted
If you're still having issues, I'll be on the IRC channel for the next 5 hours or so as jary - feel free to reply here or look me up there.
(well, I'm heading to lunch very soon, so back in around an hour)
Jeremy
----- Original Message -----
From: "Mike Gill" <mgill(a)modusoperandi.com>
To: rules-users(a)lists.jboss.org
Sent: Monday, September 21, 2009 11:27:46 AM GMT -06:00 US/Canada Central
Subject: [rules-users] Using work items in the Eclipse ruleflow editor
I am using Eclipse to build my Drools rulefow file. I am trying to add custom work items, but I cannot seem to get anything (other than Email and Log) to show up in my Work Items palette.
Does anyone know how to get the existing work items (such as FileFinder or Exec) to show up on the palette in eclipse?
Eventually I will need to add custom work items to the flow, so this is make-or-break Drools functionality for my team.
In pursuit of a solution to this I have combed the documentation, this mailing list archive, as well as endless Google results to no avail. Any help would be very valuable!
Thanks,
Mike
_______________________________________________ rules-users mailing list rules-users(a)lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________ rules-users mailing list rules-users(a)lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
15 years, 3 months
Using work items in the Eclipse ruleflow editor
by Mike Gill
I am using Eclipse to build my Drools rulefow file. I am trying to add
custom work items, but I cannot seem to get anything (other than Email and
Log) to show up in my Work Items palette.
Does anyone know how to get the existing work items (such as FileFinder or
Exec) to show up on the palette in eclipse?
Eventually I will need to add custom work items to the flow, so this is
make-or-break Drools functionality for my team.
In pursuit of a solution to this I have combed the documentation, this
mailing list archive, as well as endless Google results to no avail. Any
help would be very valuable!
Thanks,
Mike
15 years, 3 months
Eclipse wont compile DRL on save.
by Scott Burrows
Drools 4.0.7.
I have 20 something drools projects in my eclipse 3.5 workspace.
Normal default behavior is when I save a change to a .drl file it attempts
to compile it and shows me any errors.
Somethings changed recently. Eclipse will not do anything if I make a
change to a drl file now.
I can comment out all the imports and it still does not register any errors.
Only thing that I've done recently is share two of the drools projects via
CVS. All the other drools projects are already in CVS.
The one thing that does work is if I right-click on the project and select
"Build Project". That seems to force the drools compiler to do its thing
and it'll show any/all errors.
The SAVE action in eclipse is that part that has changed. Its affected all
drools projects too.
Anybody have any ideas whats happened?
Scott
15 years, 3 months
Returned mail: see transcript for details
by Mail Delivery Subsystem
The original message was received at Mon, 21 Sep 2009 08:34:32 -0400
from 131.161.38.20
----- The following addresses had permanent fatal errors -----
rules-users(a)lists.jboss.org
----- Transcript of session follows -----
... while talking to server 60.209.69.154:
>>> DATA
<<< 400-aturner; %MAIL-E-OPENOUT, error opening !AS as output
<<< 400-aturner; -SYSTEM-F-EXDISKQUOTA, disk quota exceeded
<<< 400
15 years, 3 months
Improving performance advices
by Costigliola Joel (EXT)
Hello,
I would like to improve the performance of my Drools process, I have two questions on my current implementation, one regarding updating fact and the other retracting them.
Before asking, I need to explain in few words the problem I want to solve with Drools.
My company is a bank where traders are making deals on markets, these deals must be classified in book, this is what we call "booking process".
Booking is done according to booking criteria : which trader has made the deal ? on which product ? etc ...
A booking rule defines a set of criteria and the target book where the deal will classified.
I'm using Drools to :
1. find all booking rules matching deals made by traders
2. apply the right booking rule on the deal among the ones matching the deal
I have defined a flow composed of 3 steps/rules group, each group has one rule, here's the flow and the rules.
Flow :
------
"Find matching booking rules by deal group" -> "Refresh" -> "Apply booking rule group"
Rules :
------
The job of this rule is to store in DealMatchingBookingRules all the booking rule matching a specific deal (each DealMatchingBookingRules instance has a unique Deal).
rule "Find matching booking rules by deal"
salience 10
no-loop
ruleflow-group "Find matching booking rules by deal group"
when
$dealMatchingBookingRules : DealMatchingBookingRules($dealModel : deal)
$dealProductRelatedIndexes : ProductRelatedIndexes(product.internalCode == $dealModel.product.internalCode)
$bookingRule : BTExecutionBookingRuleModel (
// when a criterion is not set, it is considered as satisfied.
(traderCriterion == null || $dealModel.trader == traderCriterion)
&& (portfolioCriterion == null || $dealModel.portfolio == portfolioCriterion)
// when a product type criterion is set to unknown, it is considered as satisfied whatever deal product type is.
&& (productTypeStringCriterion == null || productTypeCriterion == ProductType.Unknown
|| $dealModel.product.productType == productTypeCriterion)
&& (listedIndexCriterion == null || $dealProductRelatedIndexes.relatedIndexes contains listedIndexCriterion)
)
then
$dealMatchingBookingRules.addMatchingBookingRule($bookingRule);
end
This second step is only here to tell Drools that DealMatchingBookingRules have changed, this is needed for the next step.
I can't call "update($dealMatchingBookingRules)" in the previous rule, because if 2 booking rule matches the same deal, an infinite loop occurs.
My explanation is the following one (as far as I understand how Drools works) :
1 - Drools rule is activated for first booking rule => $dealMatchingBookingRules is updated
2 - Drools rule is activated for second booking rule => $dealMatchingBookingRules is updated
3 - since $dealMatchingBookingRules has been updated for Drools it will execute again the rule for first booking rule
4 - since $dealMatchingBookingRules has been updated for Drools it will execute again the rule for second booking rule
It continues to execute step 3, then step 4, then step 3 ... infinite loop !
Question :
Is there a better way of telling Drools that DealMatchingBookingRules have changed and avoid activating the rule again ?
If none, can I update all DealMatchingBookingRules more efficiently ?
rule "Refresh"
salience 5
no-loop
ruleflow-group "Refresh"
when
$dealMatchingBookingRules : DealMatchingBookingRules()
then
update($dealMatchingBookingRules);
end
Last rule job (and last flow step), is to determine which booking rule to apply among the ones matching a specific deal.
When we find the right booking rule, we book the deal and process is finished for the deal.
Questions :
I think that no-loop and the retract isntruction are doing the same job, question is which the one to remove to have the best performance improvement and why ?
(I will launch performance test anyway but It would be cool to have some insight on Drools)
rule "Apply booking rule"
no-loop
ruleflow-group "Apply booking rule group"
when
$dealMatchingBookingRules : DealMatchingBookingRules( hasSingleMatchingLevel1BookingRule == true
|| hasSingleMatchingLevel2BookingRule == true
|| hasSingleMatchingLevel3BookingRule == true
|| hasSingleMatchingLevel4BookingRule == true
)
then
MarketDealModel dealModel = $dealMatchingBookingRules.getDeal();
if ($dealMatchingBookingRules.getHasSingleMatchingLevel1BookingRule()) {
BTExecutionBookingRuleModel effectiveBookingRuleModel = $dealMatchingBookingRules.getSingleMatchingLevel1BookingRule();
effectiveBookingRuleModel.applyRuleOnDeal(dealModel);
} else if ($dealMatchingBookingRules.getHasSingleMatchingLevel2BookingRule()) {
BTExecutionBookingRuleModel effectiveBookingRuleModel = $dealMatchingBookingRules.getSingleMatchingLevel2BookingRule();
effectiveBookingRuleModel.applyRuleOnDeal(dealModel);
} else if ($dealMatchingBookingRules.getHasSingleMatchingLevel3BookingRule()) {
BTExecutionBookingRuleModel effectiveBookingRuleModel = $dealMatchingBookingRules.getSingleMatchingLevel3BookingRule();
effectiveBookingRuleModel.applyRuleOnDeal(dealModel);
} else if ($dealMatchingBookingRules.getHasSingleMatchingLevel4BookingRule()) {
BTExecutionBookingRuleModel effectiveBookingRuleModel = $dealMatchingBookingRules.getSingleMatchingLevel4BookingRule();
effectiveBookingRuleModel.applyRuleOnDeal(dealModel);
}
retract($dealMatchingBookingRules);
end
So to summarize my questions :
1. In my specific case, is there a way to update facts without activating same rules again ?
2. What is the more efficient between no-loop or retract ?
Thanks in advance for your lights,
Regards,
Joël Costigliola
--------------------------------------------------------
Ce courriel et toutes les pièces jointes sont confidentiels et peuvent être couverts par un privilège ou une protection légale. Il est établi à l'attention exclusive de ses destinataires. Toute utilisation de ce courriel non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse préalable. Toutes opinions exprimées dans ce courriel ne sauraient nécessairement refléter celle de Natixis, de ses filiales. Elles sont aussi susceptibles de modification sans notification préalable. Si vous recevez ce courriel par erreur, merci de le détruire et d'en avertir immédiatement l'expéditeur. L'Internet ne permettant pas d'assurer l'intégrité de ce courriel, Natixis décline toute responsabilité s'il a été altéré, déformé ou falsifié et chaque destinataire qui utilise ce mode de communication est supposé en accepter les risques.
This email and any attachment are confidential and may be legally privileged or otherwise protected from disclosure. It is intended only for the stated addressee(s) and access to it by any other person(s) is unauthorised. Any use, dissemination or disclosure not in accordance with its purpose, either in whole or in part, is prohibited without our prior formal approval. Any opinion expressed in this email may not necessarily reflect the opinion of Natixis, its affiliates. It may also be subject to change without prior notice. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this email. If you have received it in error, please inform us immediately and delete all copies. The Internet can not guarantee the integrity of this email therefore Natixis shall not be liable for the email if altered, changed or falsified and anyone who communicates with us by e-mail is taken to accept these risks.
--------------------------------------------------------
15 years, 3 months
Delivery reports about your e-mail
by Automatic Email Delivery Software
Your message was not delivered due to the following reason:
Your message was not delivered because the destination server was
unreachable within the allowed queue period. The amount of time
a message is queued before it is returned depends on local configura-
tion parameters.
Most likely there is a network problem that prevented delivery, but
it is also possible that the computer is turned off, or does not
have a mail system running right now.
Your message could not be delivered within 6 days:
Host 16.196.102.68 is not responding.
The following recipients could not receive this message:
<rules-users(a)lists.jboss.org>
Please reply to postmaster(a)lists.jboss.org
if you feel this message to be in error.
15 years, 3 months
How to get the result back from the human task handler
by Pardeep.Ruhil@lntinfotech.com
Hi,
I am having doubt in regarding the Human Task.
As whenever a Human Task is defined in the workflow,
execute method is called in the handler of HumanTask.
so when this statement executed in the execute method:-
manager.completeWorkItem(workItem.getId,result);
So i just want to know that how to get the parameters of the result Map
that this human task return back.
How can I return the result of Human Task?
Thanks & Regards
Pardeep Ruhil
______________________________________________________________________
15 years, 3 months