Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-3364

Outdated Drools 5.3.0.Final documentation

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 5.4.0.CR1
    • 5.3.0.Final
    • drools-docs
    • None

    Description

      Originally reported to BZ. Geoffrey, I wasn't sure who to assign this to, I hope you don't mind I gave it to you to reassign as appropriate.

      Copied from BZ:

      Description of problem:
      Documentation for Drools 5.3.0.Final is outdated because in part Drools Expert,
      section 8.6.4. The Audit View, is used outdated example about creating audit
      log where deprecated RuleBase is used instead of KnowledgeBase.

      Link to this documentation:
      http://docs.jboss.org/drools/release/5.3.0.Final/drools-expert-docs/html/ch08.html#d0e8131

      Version-Release number of selected component (if applicable):
      Drools 5.3.0.Final Documentation

      Actual results:
      WorkingMemory workingMemory = ruleBase.newWorkingMemory();

      // Create a new Working Memory Logger, that logs to file.
      WorkingMemoryFileLogger logger = new WorkingMemoryFileLogger(workingMemory);

      // An event.log file is created in the subdirectory log (which must exist)
      // of the working directory.
      logger.setFileName( "log/event" );

      workingMemory.assertObject(...);
      workingMemory.fireAllRules();

      // stop logging
      logger.writeToDisk();

      Expected results:
      ...something like this...
      KnowledgeBase kbase = readKnowledgeBase();
      StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
      KnowledgeRuntimeLogger logger =
      KnowledgeRuntimeLoggerFactory.newFileLogger(ksession, "test");

      ksession.insert(...);
      ksession.fireAllRules();
      logger.close();

      Attachments

        Activity

          People

            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            lcarlon L Carlon (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty