[rules-users] Adding a programmatically created RuleFlowProcess to	a KnowledgeBuilder
    Jason van Zyl 
    jason at maven.org
       
    Thu Oct 21 11:17:36 EDT 2010
    
    
  
Hi,
I have been following the documentation to create a RuleFlowProcess, and I went the route of creating the flow programmatically, but I can't find an example of adding this process to the knowledge builder. It seems to want an external resource of a given type. In my little code scenario below how would I add this programmatically created RuleFlowProcess?
        DefaultFlowGenerator flowGenerator = new DefaultFlowGenerator();        
        RuleFlowProcess flow = flowGenerator.generateFlow( "flow" ); 
        KnowledgeBuilder knowledgeBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();                        
        knowledgeBuilder.add( flow.getResource() /* this is null */, null /* what do i put here*/ );                    
Do I have to serialize to an external form and deserialize?
Thanks,
Jason
----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
---------------------------------------------------------
Three people can keep a secret provided two of them are dead.
 -- Unknown
Thanks,
Jason
----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
---------------------------------------------------------
A language that doesn’t affect the way you think about programming is not worth knowing. 
 
 -— Alan Perlis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20101021/db4cff15/attachment.html 
    
    
More information about the rules-users
mailing list