Formula in Decision Table?
by nzhu972
Can someone confirm if I am using Formula the correct way in a web based
decision table?
I like to populate the Condition Columns automatically when certain other
columns in the Condition Columns are populated.
For example, If col1 and col2 are populated, can I use formula to auto
populate col4 with value X and if col1, col2 and col3 are populated, then
auto populate col4 with Y?
If Formula isn't the right approach, is auto populating possible for web
based decision table in Drools 5?
Thanks
--
View this message in context: http://drools.46999.n3.nabble.com/Formula-in-Decision-Table-tp4026669.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years
bound variable scope
by webfrank
Hi,
I have a rule with a "from accumulate" where I bind "e" variable to Event
object. I would like to pass "e" to
send method of channel like: channels["reset"].send(e); but I got a Rule
Compilation error with: "e cannot be resolved". Why I cannot access variable
"e" when defined inside from accumulate?
rule "Reset alarm"
when
a : Alarm()
c : Number( intValue > 5) from accumulate (
e : Event( level < 6) over window:time(10s) from entry-point "queue",
count(e)
)
then
channels["reset"].send("Alarm resolved.");
end
--
View this message in context: http://drools.46999.n3.nabble.com/bound-variable-scope-tp4026652.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years
Insert fact to be used as semaphore
by webfrank
Hi everybody, I'm new to drools and I would like to solve this simple
situation:
I have a rule which will fire when 3 or more events comes from entry-point
with level > 4 in a 10s window:
rule "Got 3 events"
when
not Alarm()
t : Number(intValue > 2) from accumulate (
e : Event( level > 4) over window:time(10s) from entry-point "queue",
count(e)
)
then
insert(new Alarm());
end
This way if more events comes with level > 4 no more alarms are sent.
I have another rule to retract Alarm object when more than 5 events comes
with level < 6 in a 10s window:
rule "Reset alarm"
when
a : Alarm()
c : Number( intValue > 5) from accumulate (
e : Event( level < 6) over window:time(10s) from entry-point "queue",
count(e)
)
then
retract(a);
end
The problem is that I got an infinite loop once I retract the Alarm object
and a new is inserted by the first rule.
How could I solve the problem? Probably a different approach but I'm still
learning.
--
View this message in context: http://drools.46999.n3.nabble.com/Insert-fact-to-be-used-as-semaphore-tp4...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years
Guvnor Data Enumeration
by nkhogen
In the Advanced Data Enumeration in Guvnor, it is possible to define list of
values for a field by fixing value on another field as follows
ZipCode, field1 = "55000", field2 = ['1','2','3']
ZipCode, field1 = "66600", field2 = ['10','20','30']
ZipCode is the fact class, field1 and field2 are its members.
But if I have something like
ZipCode, field1 = "OTHER", field2 value should not be bound. I should be
able to fill anything. But, Guvnor does not allow it once field1 is bound to
something else.
Please let me know if anyone has had this issue before.
--
View this message in context: http://drools.46999.n3.nabble.com/Guvnor-Data-Enumeration-tp4026633.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years
Re: [rules-users] Hi All,
by Davide Sottara
Quite likely though.. given who's involved ;)
T-Mobile. America's First Nationwide 4G Network
Bernard Szlachta <bernard.szlachta(a)nobleprog.co.uk> wrote:
>Thanks Mark.
>
>Regards,
>Bernard Szlachta
>www.nobleprog.co.uk
>+44 7929173122
>skype: nobleprog
>
>
>Check our Special Offers!
>http://www.nobleprog.co.uk/course+discounts
>
>
>On Tue, Nov 5, 2013 at 11:31 AM, Mark Proctor <mproctor(a)codehaus.org> wrote:
>
>> not right now. But there is nothing to stop someone doing an adapter up at
>> github, as a 3rd party project.
>>
>> MArk
>> On 5 Nov 2013, at 11:11, Bernard Szlachta <
>> bernard.szlachta(a)nobleprog.co.uk> wrote:
>>
>> Hi All,
>>
>> Does anyone know whether there is any chance that Drools API may comply
>> with
>> Application Programming Interfaces (API) to Knowledge Bases (KB) RFP) by
>> OMG
>> http://www.omg.org/cgi-bin/doc?ad/2010-6-9?
>>
>>
>>
>> Regards,
>> Bernard Szlachta
>> www.nobleprog.co.uk
>> +44 7929173122
>> skype: nobleprog
>>
>>
>> Check our Special Offers!
>> http://www.nobleprog.co.uk/course+discounts
>> _______________________________________________
>> 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
>>
>
>_______________________________________________
>rules-users mailing list
>rules-users(a)lists.jboss.org
>https://lists.jboss.org/mailman/listinfo/rules-users
11 years
How to reduce transaction time
by arpitmittal
Hi All,
My front end application has transaction timeout of 200 milli Sec and my
code is taking upto 1200 ms to load & compile the DRL & store in cache.
So I tried to create a package of compiled DRL so that it saves compilation
time at run time, but to my surprise the reponse time increated to 3000
milli sec.
Please let me know how to reduce the transaction time?
*I was using below method to use DRL:-*
ruleBase = RuleBaseFactory.newRuleBase(
String droolsPath = folder + "/" + <DRL file name>;
File f = new File(droolsPath);
FileInputStream fInputStream = new FileInputStream(f);
Reader source = new InputStreamReader(fInputStream);
PackageBuilder builder = new PackageBuilder();
builder.addPackageFromDrl(source);
File processFile = new File(folder + "/" + < rules Flow File Name>);
FileInputStream processFileInputStream = new FileInputStream(processFile);
Reader processFileSource = new InputStreamReader(processFileInputStream);
builder.addProcessFromXml(processFileSource);
builder.compileAll();
Package[] pkg = builder.getPackages();
ruleBase.addPackages(pkg);
WorkingMemory workingMemory = ruleBase.newStatefulSession();
workingMemory.insert(customer);
workingMemory.startProcess(this.processName);
workingMemory.fireAllRules();
*I am using below code while using package:-*
Resource resourceRuleFlow = (Resource)
ResourceFactory.newFileResource(<rules Flow File path>);
Resource resourcePackage = (Resource)
ResourceFactory.newFileResource(<package File path>);
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(resourceRuleFlow, ResourceType.DRF);
kbuilder.add(resourcePackage, ResourceType.PKG);
kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
ksession.insert(customer);
ksession.startProcess(this.processName);
ksession.fireAllRules();
My understanding is if we are using package which contains compiled rules
then it should take less time as compared to DRL file.
Please help me how to sort out this issue..
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-reduce-transaction-time-tp402663...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years