[rules-users] Programatically filled Enum not getting loaded

Sandjaja, Dominik dominik.sandjaja at it-motive.de
Thu Jun 14 06:20:36 EDT 2012


Alright ...

 

After some more investigation and a lot of trial-and-error, I think I found the problem:

 

If the class which contains the method filling the enum (in my case the DroolsEnumHelper class) is also contained in the POJO model, the dropDown seems to stop working. Further investigation needs to be carried out to confirm this, but for the moment I am happy J

 

Greetings

Dominik

 

Von: rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] Im Auftrag von Sandjaja, Dominik
Gesendet: Donnerstag, 14. Juni 2012 11:33
An: Rules Users List
Betreff: AW: [rules-users] Programatically filled Enum not getting loaded

 

Hi,

 

I just tried to recreate the problem but when I create everything "from scratch" in a new package, it seems to work?! So I can't reliably reproduce the situation which on the other hand means, that there seems to be a problem in the state of the package.

 

Bad, but seems like I have to start from the bottom again to get that working ...

 

________________________________

Von: rules-users-bounces at lists.jboss.org im Auftrag von Michael Anstis
Gesendet: Mi 13.06.2012 18:37
An: Rules Users List
Betreff: Re: [rules-users] Programatically filled Enum not getting loaded

Sounds like a bug to me.

Please raise a JIRA at https://issues.jboss.org/browse/GUVNOR, including a self-contained repository export and your description below.

With kind regards,

Mike

On 13 June 2012 16:47, Sandjaja, Dominik <dominik.sandjaja at it-motive.de> wrote:

I use Guvnor 5.4.0 with the following Assets:

Enum:

  'Enums.Modules' : (new de.itm.util.DroolsEnumHelper()).loadModules()

DSL:

  [when]Testmodule {module:ENUM:Enums.Modules} is just for testing={module} : Cylinder()

DroolsEnumHelper-Class:

   public List<String> loadModules() {

        List<String> values = new ArrayList<String>();

        for (Module module : Module.values()) {

           values.add(module.getModuleName() + "=" + module.getDisplayName());

        }

        return values;

    }

When running the "Source->Validate" in the Enum-Editor, I see the method getting called (being connected to the JBoss for Debugging). But if I use the DSL rule in the guided editor, I can select the rule but the dropdown field stays grayed out. The loadModules() method isn't even called, no getting stuck in my breakpoint!

Anyone an idea why and how this happens? Am I doing something totally wrong?

Thanks

Dominik

........................................................................... 

mit freundlichen Grüßen / kind regards

Dominik Sandjaja

Fon:      +49 (0) 203 60878 183

Mobil    +49 (0) 162 2624490
Fax:      +49 (0) 203 60878 22

e-mail: dominik.sandjaja at it-motive.de <mailto:dominik.sandjaja at it-motive.de> 

 

it-motive AG

Zum Walkmüller 10-12              
47269 Duisburg                        

info at it-motive.de <mailto:info at it-motive.de> 

http://www.it-motive.de <http://www.it-motive.de/> 

.............................................................................. 

Vorsitzender des Aufsichtsrats: Dipl.-Ing. Klaus Straub 

Vorstand: Horst-Dieter Deelmann (Vors.),  Matthias Heming, Christoph Tim Klose

HRB 9207, Amtsgericht Duisburg


_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120614/fc565cf1/attachment-0001.html 


More information about the rules-users mailing list