Red Hat Training

A Red Hat training course is available for JBoss Enterprise SOA Platform

10.8. Attributes of an Action

The <action> element possesses the following attributes.

Table 10.3. Action Attributes

Name Description Type Required
name The name of the action. This attribute is required primarily for logging purposes. xsd:string true
class The action class must extend one of: org.jboss.soa.esb.actions.AbstractActionLifecycle, org.jboss.soa.esb.actions.ActionPipelineProcessor. xsd:string true
process The name of the “process” method that will be reflectively called for message processing.(Default is the “process” method.) xsd:int false
In a list of <action> instances within an <actions> set, the actions are called (that is, their “process” method is called) in the order that the <action> instances appear in the <actions> set. The message returned from each <action> is used as the input message to the next <action> in the list.
Like a number of other elements/types in this model, the <action> type can also contain zero or more <property> element instances. The <property> element/type can define a standard name-value-pair, or contain free form content (xsd:any). According to the XSD, this free form content is valid as child content for the <property> element/type, no matter where it is in the configuration (on any of <provider>, <bus>, <listener> and any of their derivatives). However, it is only on <action> defined <property> instances that this free-form child content is used.
Actions are implemented via the org.jboss.soa.esb.actions.ActionProcessor class. All implementations of this interface must contain a public constructor of the following form:
public ActionZ(org.jboss.soa.esb.helpers.ConfigTree configuration);
It is through this constructor-supplied ConfigTree instance that all of the action attributes are made available, including the free-form content from the action <property> instances. The free form content is supplied as child content on the ConfigTree instance.
Here is an example of an <actions> configuration:
    <action name="MyAction-1" class="com.acme.MyAction1"/>
    <action name="MyAction-2" class="com.acme.MyAction2">
        <property name="propA" value="propAVal" />
    <action name="MyAction-3" class="com.acme.MyAction3">
        <property name="propB" value="propBVal" />
        <property name="propC">
            <!-- Free form child content... -->