[windup-dev] .when( new True() )

Lincoln Baxter lbaxter at redhat.com
Mon Aug 4 15:23:16 EDT 2014


Not sure why it would be executed more than once per-execution of Windup. We should look into this when we build out more of the Groovy support.

Not sure what information you want to get out of the API. You'd probably have to step-debug it.

~Lincoln

----- Original Message -----
From: "Ondrej Zizka" <ozizka at redhat.com>
To: "Windup-dev List" <windup-dev at lists.jboss.org>, "Lincoln Baxter" <lbaxter at redhat.com>, "Jess Sightler" <jsightle at redhat.com>
Sent: Thursday, July 31, 2014 1:59:44 PM
Subject: .when(  new True() )

Hi,

I found this rule being invoked many many times.
Since there's just .when( new True() ) and not some iteration, I wonder 
what are the elements that it executes over so many times.
And how do I get this information from the current API?

Thanks,
Ondra


ruleSet("ExampleGroovyRule").setPhase(RulePhase.MIGRATION_RULES)

     .addRule()
     .when(
         new True()
     )
     .perform(
         new GraphOperation  () {
             public void perform(GraphRewrite event, EvaluationContext 
context) {
                 //System.out.println("Performing rewrite operation")
                 Logging.of(this.getClass()).info("Performing rewrite 
operation in ExampleGroovyRule");
             }
         }


More information about the windup-dev mailing list