[jboss-jira] [JBoss JIRA] Commented: (JBRULES-2141) In a rule flow, when the action is in MVEL, it is not possible to import classes

Nicolas Heron (JIRA) jira-events at lists.jboss.org
Fri Jun 26 09:00:57 EDT 2009


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

Nicolas Heron commented on JBRULES-2141:
----------------------------------------

the error is the same on a drl file in the then part
in mvel syntax, import are not considered

I have to explicitely put all the class name including package

instead of 
--------------
import fr.sopra.impo.ImpotPersonne

//some code

when 
then
    ImpotPersonne a = new ImpotPersonne()
end
-----------
i have to put
---------------
import fr.sopra.impo.ImpotPersonne

//some code

when 
then
    fr.sopra.impo.ImpotPersonne a = new fr.sopra.impo.ImpotPersonne()
end
-------------

> In a rule flow, when the action is in MVEL, it is not possible to import classes
> --------------------------------------------------------------------------------
>
>                 Key: JBRULES-2141
>                 URL: https://jira.jboss.org/jira/browse/JBRULES-2141
>             Project: JBoss Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-eclipse (flow)
>    Affects Versions: FUTURE
>            Reporter: Nicolas Heron
>            Assignee: Mark Proctor
>
> example : 
> -----------
> Long montant = (Long)context.getVariable("surimposition");
> System.out.println ("Surimposition : '" + montant + "'");
>  filter = new org.drools.runtime.ClassObjectFilter (fr.sopra.impot.Impot.class);
> java.util.Collection impots = context.getKnowledgeRuntime().getObjects(filter);
> if (impots.size()==1) {
> 	Impot impot = (Impot)impots.toArray()[0]; 
> 	impot.setMontantRedressement(montant);
> }
> ---------------
> it says  at design time : 
> Process 'ImpotProcess' [fr.sopra.impot.ImpotProcess]: Action node 'Traitement des resultats' [13] has invalid action: was expecting type: java.lang.Object; but found type: null.

-- 
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