Using rule flow in Guvnor
by Dinesh kumar
Hi,
I am having an issue in implementing the rule flow in guvnor.
I created a simple rule flow using eclipse plug in.
http://drools-java-rules-engine.46999.n3.nabble.com/file/n1057004/rules.jpg
I checked the rule flow model in eclipse using the green tick mark and it
showed Drools flow model checked successfully. My .rf and .rfm files were
created.
But when I imported .rf file in my guvnor and build the package I am getting
the following error : Unable to parse xml
When i checked the server log, only this was printed :
(null: 1, 93): cvc-elt.1: Cannot find the declaration of element
'org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper'.
This is the source of the generated .rfm file
1
1
Start
1
ailmentreserves
2
AilmentReserves
1
benefitreserves
3
BenefitReserves
1
4
End
2
3
4
4
resistrationflow
RuleFlowTest
1.0
RuleFlow
HealthCareTest
Am I missing anything. Should the package name in the eclipse same as the
package I use in guvnor ?
I have only the rule flow file in Eclipse and remaining are written directly
in guvnor.
Any hint on this will be of great help.
Regards,
Dinesh
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Using-rule-flow-in-Gu...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 5 months
Upating drl file without restarting the application
by devyani.sapre@wipro.com
Hi
How to achieve dynamic updation of rule file
(rules-added/deleted/modified) without the need for the application to
be restarted so as to load the rule file? Is there any property that can
be set to achieve this or do I need to run a thread to continuously
monitor the rule file for any change?
Thanks
Devyani
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. 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.
www.wipro.com
15 years, 5 months
Script Task BUG????
by Yaniv Itzhaki
Hi,
I am experiencing a strange bug (or feature???). I added a script task
(name="A") in my main process which just running System.out.println("Script
A");
I also added another script task (name="B") in my sub-process which is
running System.out.println("Script B");
But, when I am running the process I get the following output:
Script B
Script B
I continued to test this issue and added another script
task (name="C") with System.out.println("Script C"); in another sub-process
and I get:
Script C
Script C
Script C
If I add the line for every script System.out.println("Script X
"+context.getNodeInstance().getNodeName()) I get the following:
Script C A
Script C B
Script C C
Is it normal? how come I have this behavior???
Yaniv
15 years, 5 months
Informations about the roadmap
by HERICHER Benoit DSIC SGSIC
Hi!
Are there any informations about the roadmap : what could we expect in
the next releases and when should they be available?
Regards
Benoit
15 years, 5 months
Orgnizing Rule sets
by Modha Khammammettu
Hi
I just started on drools. I am looking at rule files that some one wrote.
I see that rule files that I have thousands of lines of drools code. Is it
that all drools need to be dumped into one file. Is there a way that rules
can be organized into multiple drools files (just like classes in a java
package)
Any pointers are appreciated.
Thanks
MK
15 years, 5 months
Guvnor LHS and RHS questions
by Dean Whisnant
Hello,
I've only been working with Drools for a little over a month or so now and I've begun integrating it into my application via Eclipse and creating DRL files. The nature of this application is to take a data record from one file and create a new data record in another file. This is done in a batch of any number of records, depending on the number of records sent to us in the first file. To accomplish this I have two classes, one representing each file, and I create and object for each of them, inserting them into the knowledge session and then fire the rule.
ksession.insert(myObjectIn);
ksession.insert(myObjectOut);
ksession.fireAllRules();
The first object has around 1,000 fields and the second has 250, so my class structure is quite broad.
In a DRL file I have created the following rule:
rule "Primary Diagnosis Code"
when
$ccl : anObjectIn(IncomingDiag1 != null)
$cdl : anObjectOut()
then
$cdl.PrimaryDiag = $ccl.IncomingDiag1;
end
This rule fires great and the PrimaryDiag field in myObjectOut is updated with what iss in myObjectIn.IncomingDiag. I can then write the object back out the the database fine.
A requirement of my project is that I allow users (analysts) to create their own rules that are above and beyond those I might create in a .drl file. To do so we are looking to deploy Guvnor and let them use the Guided editor to create rules. I've already loaded my fact models into Guvnor and have them available in the drop down conditions.
The questions that are hitting me now are:
1) On the LHS when I've chosen the fiels IncomingDiag the only options I have for conditions are "equal to", "not equal to", "matches", and "sounds like". I don't see an option for null or notnull. If I were to choose "not equal to" I then have the options for Literal Values, New Formulas, or Expression Editor (which has none by default). I haven't seen any examples where someone is evaluating a field in Guvnor for being either "" or null. How would one accomplish this? The literal value does not allow you to leave it blank as in "" and if you type "" in it, the source shows """".
2) On the LHS, if I were to want to evaluate IncomingDiag1 == IncomingDiag2 I don't see a method except if I were to choose New Formula and type in the field name Incoming Diag2. Is there another way that they could be prompted for the field choises again?
3) On the RHS, when I go to add a new then, I'm prompted to choose only to either "insert fact anObjectIn" or to "logically insert fact anObjectIn" or to manually enter DRL logic. Both of the inserts appear to create logic that would create a new object with the data in it:
anObjectIn fact0 = new anObjectIn ();
fact0. IncomingDiag1 ( 11 );
insertLogical(fact0 );
But what I really want is something similar to my DRL from above. Am I missing something? Or would this have to be a case where they would manually enter the DRL statement?
Thank you!
Dean Whisnant
Senior Software Developer
basys, inc.
15 years, 5 months
List from collection -> bug?
by Evert Penninckx
The drools user guide contains this example:
when
$assessment : Assessment()
$p : Person()
$addresses : List() from $p.addresses
exists (Address( state == "NC") from $addresses)
then
modify ($assessment) {} #Modify assessment in a modify block
end
I derive from this that $addresses is a list. But when I add a
System.out.println($addresses.getClass().getName()) I get "Address" as
result
Also, when I want to use $addresses as a list in the consequence (eg.
.size() ), I get java.lang.IllegalArgumentException: object is not an
instance of declaring class.
Is this expected behaviour?
Evert
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/List-from-collection-...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 6 months
Looking for a place to start with drools
by Dean Whisnant
I am investigating using Drools for our company's EDI processing. The nature of our software system is that each of our clients (dozens) has a full distribution of our base software and in the past we would make custom changes to that base software at each of their sites based upon their trading partners and business needs. For the most part these changes involved nothing more than if-then statements for rather simple logic, but that would become complicated at certain customers where there were large numbers of trading partners and specific customer needs. In general we saw 2,000 lines of code swell to 4-6,000 lines of code.
We are in the process of rewriting this portion of our code and are entertaining using drools to allow us to 1) create a standard ruleset, 2) create a ruleset specific to a trading partner (many customers share some common trading partners), and 3) create a customer business ruleset that they can maintain through some GUI tool (Guvnor).
So far, I've created a sample java program that has classes representing some of our data files (UniData environment using uniobjects) and have been working with a single .drl file to test out general rules. I appear to be able to write just about any rule I've needed in the past with no issues, including rules that spawn processes within my native software.
These are my questions:
1. How would you package these types of rules? I have three categories as stated above and it seems logical that I would package them in that manner. However within each group there are logical groupings of rules. In the customer rules I may have a couple dozen on how to populate a field that deals with adding comments and another couple dozen having to deal with setting certain fields with specific codes that are based upon incoming data. Two quite different logical areas within our software.
2. How would you deal with the GUI? Is Guvnor truly something I can setup in a way that my end users can manipulate without "damaging" the custom ruelset?
3. Within Guvnor, how would you handle the possibility of there being over 2,000 fields to choose from to form a rule?
4. What is the performance hit if we were to make each customer rule part of once decision table or another? Would you even consider this as an option?
Thank you!
--Dean
15 years, 6 months