0 Replies Latest reply on Aug 29, 2012 9:10 AM by Avneesh Sisodia

    How to use spring context methodology to execute drools rule

    Avneesh Sisodia Newbie

      Hello all,

      I am working on a project which is sping+hibernate project. I want to use drools and guvnor into it. I deploy guvnor 5.3 war successfuly and create a rule in guvnor. Now I want to use it into my java. But I have not clear idea that how I can use that rule. I also created there a spring context assest and I am able to access that spring context by using code:


      try {
                  URL url = new URL("http://localhost:8080/guvnor/org.drools.guvnor.Guvnor/package/com.ri.bean/LATEST/SpringContext/company_test2");
                  UrlResource urlResource = new UrlResource(url);
                  kbuilder.add(ResourceFactory.newUrlResource(url), ResourceType.CHANGE_SET);
              } catch (MalformedURLException e) {
                  // TODO Auto-generated catch block


      I have a rule there on guvnor repositry, How I can access that rule and how I can use it in java code.