Using Groovy transformers instead of Java

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Using Groovy transformers instead of Java

This post has NOT been accepted by the mailing list yet.
This post was updated on .

I want to use Groovy classes as custom transformers instead of Java but Mule configuration files doesn't seem to have visibility to the Groovy classes.

I created a test flow with a custom transformer as follows

<flow name="Groovy-Testing-Flow">
                <http:inbound-endpoint exchange-pattern="request-response" host="localhost"
                        port="8081" path="groovy-test" doc:name="HTTP" />
        <transformer ref="MyTransformer" />       
        <logger level="INFO" />
<custom-transformer class="test.groovy.transformer.MyTransformer" name="MyTransformer" />

with test.groovy.transformer.MyTransformer being a groovy class implementing AbstractTransformer under src/main/groovy source folder

but when running as Mule Application i get
 java.lang.IllegalStateException: No class for element custom-transformer{id=MyTransformer, name=MyTransformer}

Is there anyway that you can instruct Mule compile to see the groovy classes?