Show Table of Contents
13.5.5. ScriptingAction
| Class | org.jboss.soa.esb.actions.scripting.ScriptingAction |
Executes a script using the Bean Scripting Framework, receiving the message, payloadProxy, action configuration and logger as variable input.
- The Bean Scripting Framework does not provide an API to precompile, cache and reuse scripts. Because of this, each execution of the ScriptingAction will go through the compile step again. Please keep this in mind while evaluating your performance requirements.
- When including BeanShell scripts in your application, Red Hat advises you should use a .beanshell extension instead of .bsh, otherwise the JBoss BSHDeployer might pick it up.
Table 13.14. ScriptingAction Properties
| Property | Description | Required |
|---|---|---|
| script |
Path (on classpath) to script.
| |
| supportMessageBasedScripting |
Allow scripts within the message.
| |
| language |
Optional script language (overrides extension deduction).
| No |
Table 13.15. ScriptingAction Processor Script Binding Variables
| Variable | Description |
|---|---|
| message |
The Message
|
| payloadProxy |
Utility for message payload (MessagePayloadProxy)
|
| config |
The action configuration (ConfigTree)
|
| logger |
The ScriptingAction's static Log4J logger (Logger)
|
<action name="process" class="org.jboss.soa.esb.scripting.ScriptingAction">
<property name="script" value="/scripts/myscript.beanshell"/>
</action>
Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.