[jboss-jira] [JBoss JIRA] Commented: (JBRULES-1702) BRMS: uploading a decision table breaks the package

Jaroslaw Kijanowski (JIRA) jira-events at lists.jboss.org
Tue Aug 5 05:49:56 EDT 2008


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

Jaroslaw Kijanowski commented on JBRULES-1702:
----------------------------------------------

yep, tried with rev 21357 and it looks good.

> BRMS: uploading a decision table breaks the package
> ---------------------------------------------------
>
>                 Key: JBRULES-1702
>                 URL: https://jira.jboss.org/jira/browse/JBRULES-1702
>             Project: JBoss Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-brms
>    Affects Versions: 5.0.0.M1
>            Reporter: Jaroslaw Kijanowski
>            Assignee: Michael Neale
>             Fix For:  5.0.0.M2
>
>         Attachments: facts-src.jar, facts.jar, Sample.xls
>
>
> I create a rule, then upload a decision table (see attached) and:
> - if I compile the package it looks good, however it isn't, I cannot run a test scenario for example, because I will get missing imports of facts from the first rule;
> - if I create another rule, I won't be able to compile the package due to missing imports;
> I guess the reason for this is that the decision table adds its own import and package statements in the middle of the rule file.
> Here's the source of the package with one "regular" rule and one rule coming from the decision table:
> package myNewPAckage
> import com.model.Person
> import com.model.Alarm
> import com.model.Message
> rule "first"
> 	dialect "mvel"
> 	when
> 		Alarm( )
> 	then
> 		Person fact0 = new Person();
> 		fact0.setAge( 18 );
> 		insert( fact0 );
> end
> package XLSRules;
> #generated from Decision Table
> import com.model.Message;
> #From row number: 11
> rule "HelloWorld_11"
> 	
> 	when
> 		m:Message(status == Message.HELLO)
> 	then
> 		System.out.println(m.getMessage());
> 		m.setMessage("Goodbye cruel world");update(m);
> 		m.setStatus(Message.GOODBYE);update(m);
> end
> #From row number: 12
> rule "HelloWorld_12"
> 	
> 	when
> 		m:Message(status == Message.GOODBYE)
> 	then
> 		System.out.println(m.getMessage());
> end

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list