3 Replies Latest reply on Jun 5, 2009 11:59 PM by tsurdilovic

    Debugging of Drools rules

    mrebenst

      Hello seam users,


      I use seam and JBoss Drools. The Drools rules are an important part of my business logic. They are called from EJBs in the JBoss application server. Normally I debug my rules in Eclipse with Debug As --> Drools Application. But how can I debug my rules under JBoss?


      Best regards
      Martin

        • 1. Re: Debugging of Drools rules
          thejavafreak

          Do you want to test the .drl file? If not you can create a SeamTest class that injects your rules and the invoke the method that calls drools from there. Have you gotten my point yet? :-)

          • 2. Re: Debugging of Drools rules
            mrebenst

            I understand your point, but the major difficulty is, that I must test my rules in the correct environment (working memory). Many facts are at run-time produced and inserted into the working memory.
            I must debug my drools with my facts!


            Best regards Martin

            • 3. Re: Debugging of Drools rules
              tsurdilovic

              About many facts being runtime-produced -- how can you write rules against unknown fact types? Are your rules time-sensitive which makes it hard to create test scenarios?


              Testing rules is like testing java classes, you need to define your scenarios and test edge cases. Since you have the API for your fact types, creating tests should not be a big deal imo, prob just take time.