Class not found error on registerWorkItemHandler
by drdaveg
Hi! I've created a custom WorkItemHandler that seems to work until it is used
in another Java function with other WorkItemManager's and Handler's (the
default ones, email and log.) No exception is caught by a try-catch block
with this function call, but single stepping through the code that runs the
process in a debugger reaches:
ksession.getWorkItemManager().registerWorkItemHandler( "PartnerSystem",
sWIH);
with a "class not found" error where
sWIH = new SystemWorkItemHandler(ksession);
drools.rulebase.conf has one line:
drools.workDefinitions = WorkDefinitions.conf myWorkDefinitions.conf
and the work item's icon is visible in Eclipse. Note that I don't have a
WorkDefinisions.conf but this seems needed to use the default Email and Log
work items. The myWorkDefinitions.conf has one entry, which does not take
any parameters (for simplicity):
import org.drools.process.core.datatype.impl.type.StringDataType;
[
// the PartnerSystem work item
[
"name" : "PartnerSystem",
"displayName" : "PartnerSystem",
"icon" : "icons/system.gif"
]
]
What is wrong with the configuration causing the class not found error? I
use the class in the program a few lines above the call to
registerWorkItemHandler to make sure it is on the classpath. Thanks!
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Class-not-found-error...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 9 months
uploading rule files dynamically
by Fnu Mahalakshmi
Hi,
Is there anyway that I can dynamically add rule files??
I am loading it like this as of now :
private static final String[] RULES_FILES = new String[]{ "Rule1.drl"};
new RuleRunner().runStatelessRules(RULE_FILES,null,list_of_data,null);
If I create new rule files, I will have to keep adding it to RULES_FILES.
Is there someway I can check dynamically if there are more rule files and get it added to my rulebase??
Thanks
M
</pre>
<P><hr size=1></P>
<P><STRONG><font color=green>Please consider the environment before printing this email.</font></STRONG></P>
<P><STRONG>Visit our website at <a href="http://www.nyse.com">http://www.nyse.com</a> <br>
*****************************************************************************
<br>
Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.
</STRONG></P><pre>
15 years, 9 months
Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold of WorkItem object
by Vijay K Pandey
Hi,
There is a change done in Drools 5.1.0.M2 - org.drools.workflow.instance.node.WorkItemNodeInstance class in the method
public void triggerCompleted(WorkItem workItem) at line 196 which is setting the workItemId as -1
this.workItemId = -1;
Due to the above change the listeners which are attached to the "complete" event of the work item - such as the method below
public void beforeNodeLeft(ProcessNodeLeftEvent event) are not able to get hold of the associated workitem object as it returns null.
Is there any specific reason that workItemId is set to -1 even before the associated listeners get triggered or is this a bug?
If it was an intended change then how do I get hold of the "WorkItem" object in the attached listeners.
Thanks
Vijay
p.s This change was not there in the snapshot of 18th April 2010 which I was earlier working on. Above is the only change in this class from the snapshot of 18th April and 5.1.0.M2
15 years, 9 months
Workflow Validation
by Vahl, Thomas E
Hello,
I'm a new Drools user (5.0.1), and have several times gotten NPE's due
to a syntax error in a Split constraint. Example, using "=" instead of
"==" in the condition. Is there an external validator for the xml that
would catch this type of thing before runtime?
Thanks,
Thomas Vahl
E-mail: thomas.e.vahl(a)baml.com
----------------------------------------------------------------------
This message w/attachments (message) is intended solely for the use of the intended recipient(s) and may contain information that is privileged, confidential or proprietary. If you are not an intended recipient, please notify the sender, and then please delete and destroy all copies and attachments, and be advised that any review or dissemination of, or the taking of any action in reliance on, the information contained in or attached to this message is prohibited.
Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Sender. Subject to applicable law, Sender may intercept, monitor, review and retain e-communications (EC) traveling through its networks/systems and may produce any such EC to regulators, law enforcement, in litigation and as required by law.
The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or free of errors or viruses.
References to "Sender" are references to any subsidiary of Bank of America Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a Condition to Any Banking Service or Activity * Are Not Insured by Any Federal Government Agency. Attachments that are part of this EC may have additional important disclosures and disclaimers, which you should read. This message is subject to terms available at the following link:
http://www.bankofamerica.com/emaildisclaimer. By messaging with Sender you consent to the foregoing.
15 years, 9 months
Drools Fusion into Drools Flow
by Thorsten
Hello out there,
have someone of you tried to combine Drools Fusion into Flow in order to
control the different steps of the propagating event stream. I know that
I can define some ruleflow groups (and the corresponding rules) and
order them visually but I am not sure if one group has to be finished
first before the next ruleflow sets in. The other problem is the
insertion of the data. Is there a way to let the data “flow” into and
thru my process?
In my last experiment I created some data manually using a action-node
but when I tried to insert them into a WorkingMemoryEntry point I
received a “funny” mismatch error:
>> >>Type mismatch: cannot convert from WorkingMemoryEntryPoint to
WorkingMemoryEntryPoint<<
I am using Drools 5.1. M2, with Eclipse (20100218-1602)
Thanks and kind regards
Thorsten
15 years, 9 months
error importing .brl files
by Fnu Mahalakshmi
Hi guys,
Thanks for the help on Alerts.
I have trouble importing .brl files from my drools-guvnor editor.
When I import it I get the following error I get the error that the file cant be opened.
When I create it separately in my eclipse I do not get the drop down to choose from my facts. It shows empty drop down.
I imported the jar files to the classpath of my project - added the classes to the same directory - created a .package file where I added all the import statements.
But still not working. Any Idea what is the problem????
Thank you
M
</pre>
<P><hr size=1></P>
<P><STRONG><font color=green>Please consider the environment before printing this email.</font></STRONG></P>
<P><STRONG>Visit our website at <a href="http://www.nyse.com">http://www.nyse.com</a> <br>
*****************************************************************************
<br>
Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.
</STRONG></P><pre>
15 years, 9 months
Drools Rule Engine - Tiered Rates
by ramram
Hi All,
I have the following question regarding Drools. The possibility to
implement tiered rates and that is I have the following example.
If the total units sold is between 0 - 1000 item a revenue return is 10%
while if the total units sold is between 1001- 2000 items the return is 20%.
I want to use 1 dynamic rule to implement the above example rather than
having 2 static rules defined? is this possible through drools?
Regards
Ram
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Rule-Engine-Ti...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 9 months
alerts in drools
by Fnu Mahalakshmi
Hi,
Is there anyway I can create "alerts" in drools??
If there is any documentation for it could someone point me towards it??
Thank you
-m
</pre>
<P><hr size=1></P>
<P><STRONG><font color=green>Please consider the environment before printing this email.</font></STRONG></P>
<P><STRONG>Visit our website at <a href="http://www.nyse.com">http://www.nyse.com</a> <br>
*****************************************************************************
<br>
Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.
</STRONG></P><pre>
15 years, 9 months
Regarding a fact model
by shekharputtur puttur
Hi ALL,
I have created a dynamic fact model in guvnor for creating rules.I want to
use the same fact model in my java application too.
How do i create a jar for the created model in guvnor and download the same?
Another way is to create a fact model in java(eclipse editor), and we can
upload the same for writing rules.
But for my application , i need to use the first approach.
i use guvnor 5.1.0M1.
Could you please tell me solution to do this?
Thanks & Regards
Shekhar
15 years, 9 months
data manipulation
by Betto Bardi
Hi all,
We recently implemented Drools in a mortgage application process. The primary task of the business rule engine was to determine the fraud risk of an application. The application is delivered in XML format. We noticed that we were implementing a lot of data manipulation actions in the drl file itself. For example, the calculation of total income by calculating the sum of a number of elements or calculating the distance between two geo-locations based on zip codes. The actual evaluation rules acted on this 'derived' information.
When looking back the drl file contained a lot of code and looked pretty complicated compared to the actual evaluation rules. My question is, what is your opinion on data manipulation or transformation within the drl file? If the drl file is not the best place for this, what would you suggest for data manipulation?
Thanks,
Betto
15 years, 9 months