Rule fest rate
                                
                                
                                
                                    
                                        by Joe White
                                    
                                
                                
                                        How does one go about getting the $69 rate at the best western for the
rule fest conference? I see $89 and $99 for the 15-24th. 
 
Also, does the drools team meeting run from the 15th through to the
22nd? I'm very interested in attending both, just need to get all the
info for approval.
 
Thank you for your time,
Joe
                                
                         
                        
                                
                                17 years, 2 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                        
                                
                                
                                        
                                                
                                        
                                        
                                        Inner inner classes drl
                                
                                
                                
                                    
                                        by Joe White
                                    
                                
                                
                                        Is the fix for referencing multiple levels of inner classes available on
the 5.0.x branch? I've seen that it is on 4.0.x and trunk.
 
Thanks,
Joe
                                
                         
                        
                                
                                17 years, 2 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                        
                                
                                
                                        
                                                
                                        
                                        
                                        Final take on performance .
                                
                                
                                
                                    
                                        by Harsh Jetly
                                    
                                
                                
                                        
Hi ,
I have been given an assignment to show case the situation where the
performance of a rule engine will be better than java code .
My first question is ; Is this possible ?
What I had done earlier was I sent an arraylist and I used the 'from'
clause , like Mark pointed out for the 'from' statement pure iteration
happens and the index is not created .
So what I have done now  is create a scenario where I insert about 20,000
objects and have 20 rules (each rule has 2 alpha nodes ) . I do the same
with java code (if-elses) and the java code wins this competition hands
down .
Is there a breakthrough point where the rule engine performs as well as the
java code or even better ?
Appreciate it
Harsh
______________________________________________________________________
                                
                         
                        
                                
                                17 years, 2 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        drools-api
                                
                                
                                
                                    
                                        by Mark Proctor
                                    
                                
                                
                                        As discussed previously:
http://www.mail-archive.com/rules-dev@lists.jboss.org/msg00757.html
I have added an incomplete drools-api module, which we are now using to 
flesh out our design.
http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-api/
The idea is not to be rules or process centric but knowledge centric. It 
also gives us an opportunity to clearly lable what is a public api and 
what isn't - anything no in drools-api is not public :)
It uses Factories with static methods to create and return instances. 
The factory delegates this creation to a provider, the provider can be 
set or loaded - obviously the provider impl does not exist in drools-api.
Remember RuleBases are now KnowledgeBases, so lets take 
KnowledgeBaseFactory - this now looks like this:
http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-api/src/main/j...
Notice it's all static methods, for easy use. The Factory can have the 
provider set via the api, this hopefully makes it spring/guice/mc 
friendly, or it will attempt to discover the class name to load, and 
finally it tries the hard coded provider that we know will exist in 
drools-core/drools-compiler.
The provider interface is very simple, and is just responsible for 
implementing the delegated method:
http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-api/src/main/j...
This level of flexability is to hopefully encourage other 
implementations for the workflow or rules - in theory it would wrap 
OSWorkflow and/or Jess - will be an interesting exercise to see how far 
this possible.
We still have a lot more to flesh out and then we need to make the 
providers to adapt to existing 
drools-core/drools-compiler/drools-decisiontable classes. We are going 
to try to avoid refactoring those classes, where ever possible, to 
retain as much backwards comptability with 4.0 as possible for what will 
become a deprecated api.
Can I ask any developer helping fleshout out the api and providers to 
think carefully about what we expose publicly, we want to minimise this 
to give as clean as exposure as possible. For instance do we need to 
expose ProcessInstance.setState, is a user ever likely to change the 
state? The other thing to think about is "developer" apis, where end 
users won't change setState but a developer creating a WorkItem plugin 
may do - so separation of concerns with read/write splits may make sense....
I'll email the list once it's fleshed out further and actually working :)
Mark
                                
                         
                        
                                
                                17 years, 2 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        BRMS/Guvnor Custom User Interface
                                
                                
                                
                                    
                                        by Asif Akram
                                    
                                
                                
                                        Hi,
    I am working on large peer-to-peer project in UK. The project is 
similar with typical peer-to-peer resource sharing but sharing mainly 
multimedia contents. Each resource will has policy attached to it, which 
will decide how other peers can use that resource. Though the project is 
peer-to-peer but I want a central repository for policies. BRMS/Guvnor 
meets our requirements but we need non-web based interaction with 
BRMS/Guvnor.
    I was wondering is it possible to have custom Swing GUI interacting 
with BRMS/Guvnor? Technically it should not be difficult but I am not 
sure where to start i.e.
implementing custom Servlet for communication between BRMS/Guvnor and GUI
using the RestAPI Servlet (I have no experience of Restful Web Services)
(or) implementing conventional Web Services (my preferred choice)
The custom Swing will only use BRMS/Guvnor as rules repository i.e. 
querying the repository, uploading new rules/packages or downloading the 
policies. Policies will be created elsewhere. Any suggestion and pointer 
will be helpful.
Cheers
Asif
                                
                         
                        
                                
                                17 years, 2 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        Runtime fact-set and rule-set separation
                                
                                
                                
                                    
                                        by Tomasz Krzywicki
                                    
                                
                                
                                        I am looking for some lightweight solution of fact sets separation
withing single working memory. ... I am possibly messing up with
terminology therefore please let me present an example.
I have set of facts
"Set 1" contains:
 - Fact ( name==A, property==1)
 - Fact ( name==B, property==2)
"Set 2" contains:
 - Fact ( name==A, property==1)
 - Fact ( name==C, property==2)
- I would like to execute my dedicated package of rules for
 instance of "Set 1" within single working memory.
- When "Set 1" is inserted ( instantiated ) twice or more into the
 working memory I would like to separate the scope of rules to
 this particular instance
- I would like to insert "Set 2" at the same time multiple times
 and execute separate set of rules dedicated for "Set 2" separately
 on each of inserted instance of "Set 2"
- In some cases I would like to have access to facts from other
 instances of different sets within same working memory. eg.:
 - rule associated to "Set 1" checks all the occurrences of
   Fact( name == A ) - means it could read state of Fact
   from other instances of "Set 1" and "Set 2"
 - rule associated to "Set 1" checks state of fact associated
   to Fact ( name == A ) from "Set 2"
I could do it currently by
 - adding extra fact indicating instance to working memory
 - adding property to my Fact indicating origin ( instance in this case )
 - altering each rule.
Example: reaching facts in particular instance
 ...
 when:
    Instance ( instanceId: id, name == "Set 1")
    Fact ( ... , origin == instanceId )
    ...
 then
 ( ... )
Example: reaching fact in multiple instances
 ...
 when:
   Fact (...)
 ...
 then
Idea behind is very prosaic. Majority of the rules are written
in my case with single instance context in mind. Only sometimes
there is a need to look out of the "hedge".
So my example requires more typing and better specification
for *modeler* ( name of the role in my org - means person who
writes the rules ) who is using simpler single *model*
( set of rules + set of facts ).
I am trying to implement this using multiple, chained working
memories but maintenance of graph of working memories does
not look very practical for longer term and its not working
perfectly.
How could it be implemented - high level of course
Or better ... How I would like to use it :)
RuleBase ruleBase = RuleBaseFactory.newRuleBase();
ruleBase.addPackage ( "Set1" , MyPackageForSet1 );
// 1st argument is context name, 2nd compiled rule package
WorkingMemory wm = ruleBase.newStatefulSession();
wm.insertInContext ( "Set1", new Fact (A,1) ) // this could be also
solved by implementing interface on the fact
// inserting instance and context pointer after fact creation
// and then inserting it to wm regular way.
than if there would be a need to reach fact from other
contexts I would specify it using something-like-this syntax
...
when
  Fact ( ... )     // facts within same context and instance
  *.Fact ( ... )   // facts from all facts sets (contexts)
  <ContextName>.Fact ( ... )   // facts from all
                               // instances of specific context.
  <ContextName>(*).Fact ( ...) // same as above
  <ContextName>(1).Fact ( ...) // facts from specific
                               // instance of specific context.
Ok. What I am looking here.
- is something like this possible now out of the box and
  I skipped this nice chapter in documentation?
- does it make sense from your point of view to implement this
  kind of functionality. In my case it has lets say business
  justification and will allow to implement really complex solutions in
  nice way.
- Does this problem have some buzzwordish/scientifically blessed
  name so I can express it better next time or maybe find something
  interesting in mailing list archive.
  (Changing subject to something more sufficient is more the welcomed )
- is it at all possible ;)
- what I am missing in this problem description?
And big thanks for reading it till the end.
tk.
                                
                         
                        
                                
                                17 years, 2 months
                        
                        
                 
         
 
        
            
        
        
        
            
        
        
        
                
                        
                                
                                 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        Creation of RuleFlows using API (Runtime)
                                
                                
                                
                                    
                                        by Vikram Shitole
                                    
                                
                                
                                        Hi,
I have a requirement in which the rules /ruleflows needs to be created at runtime.
We have our own data structure which holds the data for creation of rules/rulesflows.
I have created the rules using the brms RuleModel.
Is there a similar API for RuleFlows ?
It will be helpful somebody give me the necessary pointers to start this.
Thanks in Advance
Thanks & Regards
Vikram Shitole
MASTEK LTD.
Making a valuable difference
Mastek in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                
                         
                        
                                
                                17 years, 2 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        Problem using RuleFlows .
                                
                                
                                
                                    
                                        by Harsh Jetly
                                    
                                
                                
                                        
Hi ,
The version of Drools that I have used is 4.0.4
I have used ruleflow groups to create my rule file.
It has a split node (XOR) in which I specify a constraint on which a
ruleflow-group is to be selected .
Insert arraylists as facts in the working memory one by one.
The problem I face is that when I insert these arraylists in the same
session , it doesn't evaluate every constraint in the split node .
The work around I am using , it that I create a new session for every
arraylist , this works just fine . But creating a new session always is an
overhead .
Can you please assist me with this situation .
Thank You
Harsh Jetly
Larsen & Toubro Infotech Ltd.
www.Lntinfotech.com
This Document is classified as:
|------|
| [X]  |
|------|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.
______________________________________________________________________
                                
                         
                        
                                
                                17 years, 2 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        Re: [rules-dev] Drools Stateful Session Thread Safe
                                
                                
                                
                                    
                                        by Harsh Jetly
                                    
                                
                                
                                        
ricky.nfs wrote:
> 
> Hi there, I am a newbie on Drools. I tried to create a multi threading
> programs using drools. But in large amount of threads, the result in
> stateful session is not safe anymore. Can anyone help me?
> 
> private final static Map<Integer,Double> score = new HashMap<Integer,
> Double>();
> 	
> 	static
> 	{
> 		score.put( 0 , 0.0 );
> 		score.put( 1 , 0.84 );
> 		score.put( 2 , 1.26 );
> 		score.put( 3 , 1.68 );
> 		score.put( 4 , 1.05 ); //Else
> 	}
> 
> 	public static void main(String[] args) throws Exception{
> 		
> 		Reader source = new InputStreamReader(
> TestStatefulSimpe.class.getResourceAsStream( "/simple/SimpleCATRule.dslr"
> ) );
> 		Reader dsl = new InputStreamReader(
> TestStatefulSimpe.class.getResourceAsStream( "/simple/SimpleCATRule.dsl" )
> );
> 		PackageBuilder builder = new PackageBuilder();
> 		builder.addPackageFromDrl( source, dsl );
> 		
> 		//get the compiled package (which is serializable)
> 		Package pkg = builder.getPackage();
> 		
> 		//add the package to a rulebase (deploy the rule package).
> 		org.drools.RuleBase ruleBase = RuleBaseFactory.newRuleBase();
> 		ruleBase.addPackage( pkg );
> 		
> 		final StatefulSession statefulSession = ruleBase.newStatefulSession();
> 
> 		for( int i = 0 ; i < 200000 ; i++ )
> 		{
> 			final int idx = i;
> 			Thread t = new Thread( new Runnable(){
> 
> 				@Override
> 				public void run() {
> 					int amount = (int) Math.round( ( Math.random()*4 ) );
> 					TestSimpleVO vo = new TestSimpleVO();
> 					vo.setDecisionMakersAmount( amount );
> 					FactHandle fact = statefulSession.insert( vo );
> 					statefulSession.fireAllRules();
> 					statefulSession.retract(fact);
> 					if(  score.get(amount).doubleValue() != vo.getScoreFactor() )
> 						System.out.println( idx + " - " +  amount + " : " +
> score.get(amount).doubleValue() + " - " + vo.getScoreFactor() );
> 					statefulSession.dispose();
> 				}});
> 			t.start();
> 		}
> 	} 
> 
> And the dslr and dlr attachment : 
>  http://www.nabble.com/file/p18564976/SimpleCATRule.dsl SimpleCATRule.dsl 
>  http://www.nabble.com/file/p18564976/SimpleCATRule.dslr
> SimpleCATRule.dslr 
> 
> I really appreciate for any help or answer.
> 
> Thanks in advance,
> Ricky
> 
-- 
View this message in context: http://www.nabble.com/Drools-Stateful-Session-Thread-Safe-tp18564976p1884...
Sent from the drools - dev mailing list archive at Nabble.com.
                                
                         
                        
                                
                                17 years, 3 months