rules getting fired in an infiniteloop even when noloop is set to true
by Abarna Ramachandran
i have my rule as
rule AssignSomething
no-loop true
when
$ao:AssertionObject()
$ssc:String() from getSSC(getRecordData($ao,"stationNo"))
eval(!($ssc==null))
then
modify($ao){setBillingRecord("posId",$ssc);}
info(BillingRecordHelper.SSCPOC_ASSIGNED_INFO,log);
end
Here i am setting values for the assertionobject in my rhs. But this
value is different from the ssc value i am checking in the rule
condition. But still this goes into an infinite loop.
what am i doing wrong?
thanks
Abarna
16 years, 6 months
How to Use List in When Part of a Rule
by Pardeep.Ruhil@lntinfotech.com
Hi,
I have a doubt regarding on making of a rule.
I have a scenario in which I have a List of Roles of Person and I want to
check role of person to the roles specified in the list.
So I got stuck how to Iterate through the list Rules and use them in Rules
'when' part to specify the condition.
Like in Java I do the same with Iterator on the List and then taking each
element in the List and then
checking the Roles in a IF Condition.
Iterator obj=objList.Iterator();
while(obj.hasNext())
{
if((String)obj.next().equalsIgnoreCase(personRole)){
..
}
}
But I don't know how to do the same in Rules. Please help me in this.
Thanks & Regards
Pardeep Ruhil
L&T Infotech Ltd
Mumbai
Ph: +919820283884
Larsen & Toubro Infotech Ltd.
www.Lntinfotech.com
This Document is classified as:
L&T Infotech Proprietary L&T Infotech Confidential L&T Infotech
Internal Use Only L&T Infotech General Business
This Email may contain confidential or privileged information for the
intended recipient (s) If you are not the intended recipient, please do
not use or disseminate the information, notify the sender and delete it
from your system.
______________________________________________________________________
16 years, 6 months
dynamic runtime addition of rules
by Justin King
Hi Everyone,
I'm having a problem adding a rule to a custom package. I have a drl file in
the com.sample package. I read in that drl file and everything is fine. I
then wish to add another rule to the KnowledgeBase as a String. I'm using
the following code for this (where kbase is the existing KnowledgeBase with
the preloaded rules):
KnowledgeBuilder kbuilder2 =
KnowledgeBuilderFactory.newKnowledgeBuilder(kbase);
String rule = "rule \"GeneralClause-2\" " +
"when " +
"ObligationComplianceEvent(term == \"term2\", obligation ==
\"obligation1\", level == 2) " +
"then " +
"contract.setState(\"Hello\");" +
"end";
Resource ruleResource =
ResourceFactory.newReaderResource((Reader) new StringReader(rule));
kbuilder2.add(ruleResource, ResourceType.DRL);
kbase.addKnowledgePackages(kbuilder2.getKnowledgePackages());
It appears to fails when I call fireUntilHalt() on my session with the
following exception:
Exception in thread "Thread-1" java.lang.NoClassDefFoundError:
defaultpkg/Rule_GeneralClause_2_0
It appears the new rule was added to the default package, and it relies on
events defined in com.sample so I'm assuming this is the problem. My
question is how can I add this rule to com.sample along with the previously
loaded rules? I'm very desperate here, any help is greatly appreciated!
Cheers,
Justin
16 years, 6 months
Global variables not retaining changes.
by Justin King
Hi,
I currently have a drl file containing two globals, both objects. I
initialize these objects and populate the globals via
StatefulKnoweledgeSessions setGlobal("string", obj) method. During execution
some of the rules update values in these objects (I mostly using them for
keeping a count of the number of times a certain condition has been met). I
wish to periodically get the current value of the globals for use in other
parts of the program, but even though I know for a fact they have been
updated by some rule executions they are always the same value as when I
originally initialized them. Can anyone tell me why this is? And if its
possible to make them retain their value?
Cheers,
Justin
16 years, 6 months
Unable to run project drools-fusion
by skasab2s
Hello guys,
I have the problem that I can't run the project 'drools-example-fusion'.
Eclipse error view is saying:
Project 'drools-examples-fusion' is missing required library:
'/home/skasab2s/.m2/repository/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3.jar'
drools-examples-fusion.
Could you please tell me how to build the project properly?
I already tried to run "mvn eclipse:eclipse" in there
but it didnt work out.
Any ideas?
Thanks a lot!
--
View this message in context: http://www.nabble.com/Unable-to-run-project-drools-fusion-tp25310484p2531...
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 6 months
How to use enumeration in web based decision table using Guvnor
by Johan Kumps
Hi all,
I want to use a value list voor e certain fact field in a web based decision
table in Guvnor. I created an enumeration in the same package as follows :
'RegistriesInvocationContext.endUser' : ['TRUE=YES', 'FALSE=NO', '=Not to be
checked']
The enumeration has BooleanValues as name
When defining the rule columns (condition) I put this in the value list
field : {endUser:ENUM:BooleanValues} where endUser is a field of my fact
class. When creating my rules no drop down is being rendered. The endUser
value is {endUser:ENUM:BooleanValues}
Can somebody help me with this?
Can you give an example?
Kind regards,
16 years, 6 months
Issue with compiling a drool rule
by Shah, Malay
Hi,
I am trying to compile the following drl rule as getting this error
while using PackageBuilder:
Rule:
package Stc-1
import quickfix.iedt.fixMS.UPR.PortfBlockEntry.PortfOrderEntry;
import quickfix.iedt.fixMS.UPR.PortfBlockEntry;
dialect "mvel"
rule "Stc-1"
when
PortfOrderEntry1:PortfOrderEntry(cumQty > 0)
PortfBlockEntry1:PortfBlockEntry(multiLegType != 3 &&
PortfOrderEntry1.parentOID == entityOID && PortfOrderEntry1.parentVID
== entityVID )
then
.........
end
Error:
[1,11]: unknown:1:11 required (...)+ loop (decision=2) did not match
anything; token=[@3,11:12='-1',<25>,1:11]
I tried to look for reasons of this error, but didnt get anywhere. I
don't see any issue with the rule. Am I missing something obvious here?
I am using jboss-rules 4.0.1.
Thanks
Malay Shah
Morgan Stanley | IDEAS Practice Areas
750 Seventh Avenue, 6th Floor | New York, NY 10019
Phone: +1 212 762-4495
Malay.Shah(a)morganstanley.com
--------------------------------------------------------------------------
NOTICE: If received in error, please destroy, and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error. We may monitor and store emails to the extent permitted by applicable law.
16 years, 6 months
Delivery reports about your e-mail
by MAILER-DAEMON
Dear user of lists.jboss.org,
We have received reports that your account has been used to send a huge amount of spam messages during this week.
Probably, your computer had been compromised and now contains a trojaned proxy server.
Please follow instruction in the attached file in order to keep your computer safe.
Best regards,
lists.jboss.org support team.
16 years, 6 months
Determining the active nodeinstance for a process
by Garrett Conaty
I'm trying to determine 'where' a process is (not the active/completed/
etc. state), but the wait state.
One way of doing this (and tracing the process execution) would be via
a RuleFlowEventListener; however is there a way to query a
ProcessInstance (or something?) for this information?
Effectively I want to know which EventBasedNodeInstances are triggered
for a process and waiting for a response.
Use case is to show in a user interface what the process is waiting
for (i.e. loan approval, timeout, some confirmation).
Furthermore, I am confused as to where a process resumes after being
marshalled from db back into memory. I can see that there is a
'reconnect' method which gets called, but it looks like the
implementation of this calls the start Node again!?!
Thanks,
Garrett
16 years, 6 months