 |
|
 |
The License is LGPL not CPOL !
|
|
|
|
 |
|
 |
Hi Jeff,
I wrote like
<Variable id="ICU">0</Variable>
<Variable id="TypeofAdmision"></Variable>
<match>(Status = Approved) and (TypeofAdmision != ICU)</match> but this condition not evaluated.
how to write a match condition for type not equal to ICU please help me.
shyam.p
modified on Monday, December 6, 2010 2:21 AM
|
|
|
|
 |
|
 |
Hi Mr. Bramlett,
I was searching on the net for a Rules Engine and came across your JaxLabRulesEngine. I must thank you in advance for such greate job. The engine works greate and it is very easy to use.
I have a question, I hope you will be able to help me with.
I want to be able to evalute an expression like
<Match>(a = 100 OR b > 0) AND (c <> 2)</Match>
<Assign>0.5</Assign>
Is this something that can be done with JaxLabRulesEngine? I have tried every thing I can think of without any success. Any help will be greatly appreciated. Thanks.
|
|
|
|
 |
|
 |
Chazim,
It has been a while since I have delved into the engine but the I think you can use | for "or" and & for "and" so the expression would be: (a = 100 | b> 0) & (c<> 2)
I am "gearing up" to rewrite the engine since generics and vars were not in the framework when I wrote it last time. Any suggestions/comments to put into the new code?
I would also be interested to see how people are using the code (just curious ).
Jeff
Jeff Bramlett
|
|
|
|
 |
|
 |
I'd like to be able to compare the values of string variables.
eg. <Match>Editor != Creator</Match>
At present, my Variable called "Editor" (holding the value "Jim") and my Variable called "Creator" (holding the value "Bob") would be compared (inside the RulesEngine) as "Jim" != "Creator" (which isn't the desired behaviour)
If the values in the XML are surrounded by quotes then treat the value literally
eg. <Match>Editor != "Creator"</Match> --- compare Editor ("Jim") to the string "Creator"
If there are no quotes treat the value as it's variable
eg. <Match>Editor != Creator</Match> --- compare Editor ("Jim") to Creator ("Bob")
PS. I am using your rule engine in a Silverlight app. The Rule Engine needed a bit of work to make it Silverlight compatible.
|
|
|
|
 |
|
 |
I am also experimenting with a generic DataBus pattern and the Managed Extensibility Framework to "roll into" the newer version. Could prove interesting!
Jeff Bramlett
|
|
|
|
 |
|
 |
Hi Jeff Sir
Thanks for too good Rule Engine
I want to use for, while loop in rule base, so pleas tell me the correct systex for looping in rule base
Thanks in advance
|
|
|
|
 |
|
 |
Hi Jeff,
I new to this rule engine , do u have any documentation- to create rules and step by step process.
Thanks & Regards
Rajalakshmi
|
|
|
|
 |
|
 |
The links to the www.jaxlab.com web site are broken
|
|
|
|
 |
|
 |
How can I make new rules and edit the existing ones?
Plese help me.
|
|
|
|
 |
|
 |
Very good information.
check our rule engine solution as well at http://www.flexrule.com
A FREE Procedure Execution and RETE-Based Inference Engine. It supports multiple way for communication, high-level languages such as Xml and S-Expression and API mode.
Regards
|
|
|
|
 |
|
 |
How come I can never get to Jeff's web site as he posted it? Jaxlab gets you a parking site as well.
Jeff, if you are still around, post your actual web site or let me know what may be going on. I would really like to see if you are still working on this rules engine.
Thanks!
|
|
|
|
 |
|
 |
HI Vextant,
Jeff's web site was there some time ago, but is no longer availabe,
he has updated his home page link in his profile, but haven't finished
(links but not info).
the new Website: http://www.devbyjeffbramlett.com
hopefully he will bring it online soon
Best Regards
Arturo Ruvalcaba
|
|
|
|
 |
|
 |
Have you done any comparisons against Nxbre?
|
|
|
|
 |
|
 |
I looked at it a year or two ago, but not since then. At that time I preferred the expression syntax and multiple actions per expression than the implementation that NxBre had at that time.
Jeff Bramlett
|
|
|
|
 |
|
 |
Just writing a thank you for this; I have saved your work to read over and study.
|
|
|
|
 |
|
 |
Hi,
interesting rules engine!
Please, which is the easiest way to create xml rules (to be use by the Jaxlab RE)?
Is it possible to use the JaxlabReaderWriter for this? Any example of how to do it?
Thank you
|
|
|
|
 |
|
 |
The Xml schema was used as a convention to provide simple serialization of a Rules set. You can add rules and variables to the Rules Engine instance programatically and then use the ReaderWriter to write them to a file.
Jeff Bramlett
|
|
|
|
 |
|
 |
Here is an example:
RulesEngine m_oRulesEngine = new RulesEngine();
// Code to load Rules into the engine
JaxlabWriter jaxWriter = new JaxlabWriter(@"c:\savedEngine.xml", m_oRulesEngine);
That's it.
Jeff Bramlett
|
|
|
|
 |
|
 |
Hi Jeff, Me again, is it possible to return the string value of two variables and return it in a 3rd variable? I have the following: <Rules> <Variables> <Variable id="FirstName">Robert</Variable> <Variable id="FullName"></Variable> <Variable id="LastName">Jurado</Variable> </Variables> <Rule id="PutNameTogether" useInferencing="False"> <Expression> </Expression> <Actions> <Action actionId="FullName" type="var"> <Match> </Match> <Assign>FirstName + ' ' + LastName</Assign> </Action> </Actions> </Rule> </Rules> and I want run Rule "PutNameTogether" and have the variable "FullName" to be "Robert Jurado" as an answer. I am sure that I am not putting the Assign syntax correctly. Thanks! Robert Jurado
|
|
|
|
 |
|
 |
Jeff,
I am trying to find a trigger by name and by debugging the TriggerCollection class, the function "Find", it is using:
int high = List.Count, low = -1, probe;
and I am trying to figure out the logic because it is not finding the Trigger. What's supposed to be doing?
thanks.
|
|
|
|
 |
|
 |
The find function works for locating a Variable by id to get the RuleID to run for the Variable. The find function is a binary search algorithm. The int's high and low being used in the find to "chop" the halfs for each find loop.
The sorting for the trigger collection is based on the VariableID (See the IComparable implementation region) for quick access if you had a lot of triggers.
I did not have any Find Trigger by name functions since triggers are "kicked off" when variable is changed. It would be an easy matter to put together a method to find a trigger by name.
Jeff Bramlett
|
|
|
|
 |
|
 |
Jeff,
Congrats on your posting. I really like what you have done on this topic. I hope that people see the benefit of this programming methodology and implement it on their work.
Robert Jurado
Rob_Jurado@yahoo.com
|
|
|
|
 |
|
 |
This is very exciting - thanks!
Question - is caching including - so if you have a complicated rule that is loaded once - if this is included again are the same objects used if they are present. Or is this completly up to what objects you "give over" to the rules engine?
|
|
|
|
 |
|
 |
Since the Rules Engine is an instantiated object the rule objects it contains are instantiated.
If you try to add a rule that already exists then a DuplicateRuleException is thrown.
You can change rules using the Rule Engine Indexer for the Rule objects
(i.e. _rulesEngine[1] = or _rulesEngine[""] = ).
The ReaderWriter lock in the Rules Engine will prevent "collision" or locking problems in a multithreaded situation.
Does this answer your question?
Jeff Bramlett
|
|
|
|
 |