[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 12:18:47 EDT 2012


    [ https://issues.jboss.org/browse/JBRULES-3281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12681358#comment-12681358 ] 

Geoffrey De Smet commented on JBRULES-3281:
-------------------------------------------

https://github.com/droolsjbpm/drools/commit/666de16dd69a4a3e16e367ff35605e86dfaa643a
                
> 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