How and is it worth to integrate Java Webapp + drools + Guvnor?

前端 未结 2 415
感动是毒
感动是毒 2021-02-04 06:14

I am planning on introducing Java rules and currently in the process of evaluating Drools to externalize (physically and logically) the business rules from the application.

2条回答
  •  日久生厌
    2021-02-04 06:58

    The above answer is well explained. But on how to integrate Java & Drools-Guvnor is as follows...

    private static KnowledgeBase readKnowledgeBase() throws Exception {
    KnowledgeAgent kagent = KnowledgeAgentFactory
            .newKnowledgeAgent( "MortgageAgent" );
    kagent.applyChangeSet( ResourceFactory
            .newClassPathResource( "changeset.xml" ) );
    KnowledgeBase kbase = kagent.getKnowledgeBase();
    kagent.dispose();
    return kbase;
    }
    
    
    
      
        
    
      
    
    

    Hope it is helpful as well.

提交回复
热议问题