This content has been marked as final.
Show 2 replies
-
1. Re: Can I pass parameters/properties to groovy scripts?
mike_ap Sep 3, 2008 5:12 PM (in response to mike_ap)I took a look at the ESB source code for the Groovy Action and noticed that the configTree is bound to the "config" variable in groovy.
So, the solution is:import org.jboss.soa.esb.message.*; import org.jboss.soa.esb.helpers.ConfigTree; MYPARAM_NAME = "parameter1"; myparam1 = config.getAttribute(MYPARAM_NAME); println "the value of the parameter is " + myparam1;
-
2. Re: Can I pass parameters/properties to groovy scripts?
jjarkko Sep 3, 2008 6:55 PM (in response to mike_ap)I've always wondered if it is possible to modify the config tree of next action in action pipeline.
Something like this:
action1: do some logic which resolves that decides that param1=1
action2: is configured using configTree parameters (like most stock actions, wise, soapclient, System.out.println action)
Now I'd like prepare/calculate the config param needed by action2 in action1.
A simple case would be prepare the message<action name="prepare" class="acme.PrepareMessage"> </action> <action name="println" class="org.jboss.soa.esb.actions.SystemPrintln"> <property name="message" value="${from.previous.action}"/> </action>