[jboss-jira] [JBoss JIRA] (JBRULES-3281) Drools Expert User Guide > The Basics, various edits

Geoffrey De Smet (JIRA) jira-events at lists.jboss.org
Tue Apr 3 11:22:47 EDT 2012


     [ https://issues.jboss.org/browse/JBRULES-3281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Geoffrey De Smet resolved JBRULES-3281.
---------------------------------------

         Assignee: Geoffrey De Smet  (was: Mark Proctor)
    Fix Version/s: 5.4.0.CR1
       Resolution: Done

    
> Drools Expert User Guide > The Basics, various edits
> ----------------------------------------------------
>
>                 Key: JBRULES-3281
>                 URL: https://issues.jboss.org/browse/JBRULES-3281
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-docs-expert
>    Affects Versions: 5.3.0.Final
>            Reporter: Dr Alt
>            Assignee: Geoffrey De Smet
>             Fix For: 5.4.0.CR1
>
>
> Starting at http://docs.jboss.org/drools/release/5.3.0.Final/drools-expert-docs/html_single/index.html#d0e251
> *Stateless Knowledge Session*
> Application pseudo code is missing method names:
> (!) The following should read {{application.isValid()}} in both occurrences (assertTrue(..) and assertFalse(..)), instead of {{application()}}
> {quote}
> StatelessKnowledgeSession ksession = kbase.newStatelessKnowledgeSession();
> Applicant applicant = new Applicant( "Mr John Smith", 16 );
> Application application = new Application();
> assertTrue( application.isValid() );
> ksession.execute( Arrays.asList( new Object[] \{ application, applicant } ) );
> assertFalse( application.isValid() );
> {quote}
> *Stateful Knowledge Session*
> (!) Example code shows "public -classs- Sprinkler" should be "public +class+ Sprinkler".
> (!) The sentence after that, "the concepts of inserting and matching against data -was- introduced" should read "+were+"
> (!) The fire alarm sample Java code has errors.  "builder.getErrors()" should be "kbuilder.getErrors()" and kbase should be initialized before kbase.addKnowledgePackages as:
> {{KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();}}
> (!) {{ksession.fireAllRules()}} requires a semi-colon.
> (!) After retracting the two fire facts, the output should be:
> {quote}
> Cancel the alarm
> Turn +off+ the sprinkler for room office
> Turn +off+ the sprinkler for room kitchen
> Everything is ok
> {quote}
> (Eventually, I'll learn how to make these changes myself and request git pulls.)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list