<?xml version="1.0"?>
<ruleset xmlns="http://windup.jboss.org/schema/jboss-ruleset" id="soa-p-5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd">

    <metadata>
        <description>
            This ruleset provides analysis of JBoss SOA Platform 5 applications and provides information on
            how to migrate these to Red Hat JBoss Fuse Service Works
        </description>
        <dependencies>
            <addon id="org.jboss.windup.rules,windup-rules-javaee,2.3.0.Final" />
            <addon id="org.jboss.windup.rules,windup-rules-java,2.3.0.Final" />
        </dependencies>
        <sourceTechnology id="soa-p" versionRange="(,5]" />
        <targetTechnology id="fsw" versionRange="[6,)" />
        <tag>jboss-esb</tag>
    </metadata>

    <rules>
        <rule id="soa-p-5-01000">
            <when>
                <xmlfile as="xmlclass" matches="//*[local-name()='action' and not(starts-with(@class, 'org.jboss.soa.esb.actions')) and not(starts-with(@class, 'org.jboss.soa.esb.smooks')) and windup:matches(@class, '{javaclassname}')]/@class"/>
                <javaclass as="javaclasses" references="org.jboss.soa.esb.message.Message" in="{javaclassname}"/>
            </when>
            <perform>
                <iteration over="xmlclass">
                    <hint title="JBoss ESB 5 Action Handler" effort="3">
                        <message>
                            <![CDATA[
                                Custom action classes should be migrated to CDI Beans in Fuse Service Works. These beans can be defined as services or called directly from a Camel route.

                                For more information, see the [Action Class Migration Guide](https://github.com/windup/soa-migration/blob/master/advice/action-class-migration.md).
                            ]]>
                        </message>
                        <tag>jboss-esb</tag>
                    </hint>
                </iteration>
                <iteration over="javaclasses">
                    <classification issue-display-mode="detail-only" title="JBoss ESB 5 Action Handler" effort="3">
                        <description>
                            <![CDATA[
                                Custom action classes should be migrated to CDI Beans in Fuse Service Works. These beans can be defined as services or called directly from a Camel route.
                            ]]>
                        </description>

                        <!-- TODO: Replace with a link to the customer portal once one is available -->
                        <link title="Action Class Migration" href="https://github.com/windup/soa-migration/blob/master/advice/action-class-migration.md"/>
                        <tag>jboss-esb</tag>
                    </classification>
                </iteration>
            </perform>
            <where param="javaclassname">
                <matches pattern=".*"/>
            </where>
        </rule>
        <rule id="soa-p-5-02000">
            <when>
                <xmlfile matches="/jbossesb-deployment"/>
            </when>
            <perform>
                <classification issue-display-mode="all" title="JBoss ESB Deployment Descriptor" effort="13">
                    <!-- This needs documentation... I cannot find documentation on migrating this file -->
                    <tag>jboss-esb</tag>
                </classification>
            </perform>
        </rule>
        <rule id="soa-p-5-03000">
            <when>
                <xmlfile matches="/*[local-name()='jbossesb']"/>
            </when>
            <perform>
                <classification issue-display-mode="all" title="JBoss ESB Pipeline Configuration" effort="7">
                    <!-- TODO: Replace with a link to the customer portal once one is available -->
                    <link title="Action Pipeline Migration" href="https://github.com/windup/soa-migration/blob/master/advice/action-pipeline-migration.md"/>
                    <tag>jboss-esb</tag>
                </classification>
            </perform>
        </rule>
        <rule id="soa-p-5-04000">
            <when>
                <xmlfile matches="/*[local-name()='smooks-resource-list']"/>
            </when>
            <perform>
                <classification issue-display-mode="detail-only" title="Smooks Configuration" effort="0">
                    <link title="Smooks Development Guide" href="https://access.redhat.com/documentation/en-us/Red_Hat_JBoss_Fuse_Service_Works/6.0/html/Development_Guide_Volume_2_Smooks/"/>
                    <tag>smooks</tag>
                </classification>
            </perform>
        </rule>
        <rule id="soa-p-5-05000">
            <when>
                <xmlfile matches="//*[local-name()='jms-listener' and @is-gateway='true']/@name"/>
            </when>
            <perform>
                <iteration>
                    <hint title="JMS Gateway Listener" effort="3">
                        <message>
                            <![CDATA[
                                This listener requires a composite service binding in Fuse Service Works. The configuration for a JCA or JMS binding can be found in the jms-bus definition
                                associated with this listener.

                                For additional information, see the
                                [Gateway Listener Migration Guide](https://github.com/windup/soa-migration/blob/master/advice/gateway-listener-migration.md).
                            ]]>
                        </message>
                        <tag>jboss-esb</tag>
                    </hint>
                </iteration>
            </perform>
        </rule>
        <rule id="soa-p-5-06000">
            <when>
                <xmlfile matches="//*[local-name()='jms-listener' and (not(@is-gateway) or @is-gateway='false')]/@name"/>
            </when>
            <perform>
                <hint title="ESB-Aware Listener (non-gateway)" effort="1">
                    <message>An ESB-aware listener is no longer required in Fuse Service Works.</message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-5-07000">
            <when>
                <xmlfile matches="//*[local-name()='service']/@name"/>
            </when>
            <perform>
                <hint title="JBoss SOA-P Service" effort="3">
                    <message>
                        <![CDATA[
                            Each <service> definition in SOA-P 5 represents a service which can be
                            called from outside the application through an ESB listner.  The
                            equivalent definition in Fuse Service Works is a composite service.

                            For additional information, see the
                            [Service Migration Guide](https://github.com/windup/soa-migration/blob/master/advice/service-migration.md).
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-5-08000">
            <when>
                <xmlfile matches="//*[local-name()='actions']"/>
            </when>
            <perform>
                <hint title="JBoss SOA-P Action Pipeline" effort="5">
                    <message>
                        <![CDATA[
                            The logic and execution flow of a service in SOA-P 5 is defined in an
                            action processing pipeline. This logic is
                            contained within a service component definition and expressed
                            using any of the available implementation types in Fuse Service Works.

                            For additional information see: the [Action Pipeline Migration Guide](https://github.com/windup/soa-migration/blob/master/advice/action-pipeline-migration.md)
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-5-09000">
            <when>
                <xmlfile matches="//*[local-name()='hibernate-bus']/@busid"/>
            </when>
            <perform>
                <hint title="Service Binding: Hibernate Bus" effort="13">
                    <message>
                        <![CDATA[
                            Although Camel has both Hibernate and JPA components that are
                            useful in consuming records, there isn't any support for Hibernate events.

                            To migrate this to SwitchYard you may have to
                            build a custom SwitchYard component using Hibernate
                            listeners, or redesign your requirements to leverage the
                            existing Camel components available (Hibernate/JPA/SQL)
                            in this area.
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-5-10000">
            <when>
                <xmlfile matches="//*[local-name()='jms-bus']/@busid"/>
            </when>
            <perform>
                <hint title="JMS Bus Definition" effort="3">
                    <message>
                        <![CDATA[
                            A jms-bus definition can be converted to a JMS or JCA gateway
                            binding on a composite service in SwitchYard. If the jms-bus
                            configuration is used for a non-gateway listener, it does not
                            need to be migrated to Fuse Service Works.

                            For additional information, see the
                            [JMS Bus Migration Guide](https://github.com/windup/soa-migration/blob/master/advice/jms-bus-migration.md).
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-5-11000">
            <when>
                <xmlfile matches="//*[local-name()='ftp-bus']/@busid"/>
            </when>
            <perform>
                <hint title="FTP Bus Definition" effort="3">
                    <message>
                        <![CDATA[
                            A ftp-bus definition can be converted to a FTP gateway
                            binding on a composite service in SwitchYard.

                            For additional information, see the
                            [FTP Bus Migration Guide](https://github.com/windup/soa-migration/blob/master/advice/ftp-bus-migration.md).
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-5-12000">
            <when>
                <xmlfile matches="//*[local-name()='camel-bus']/@busid"/>
            </when>
            <perform>
                <hint title="Camel Bus Definition" effort="3">
                    <message>
                        <![CDATA[
                            A camel-bus definition can be converted to a Camel gateway
                            binding on a composite service in SwitchYard.

                            For additional information, see the
                            [Camel Bus Migration Guide](https://github.com/windup/soa-migration/blob/master/advice/camel-bus-migration.md)
                        ]]>
                    </message>
                    <tag>camel</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-5-13000">
            <when>
                <xmlfile matches="//*[local-name()='udp-listener']"/>
            </when>
            <perform>
                <hint title="UDP Listener Configuration" effort="3">
                    <message>
                        <![CDATA[
                            A UDP Listener definition can be converted to a TCP/UDP
                            gateway binding on a composite service in SwitchYard.
                        ]]>
                    </message>
                    <link title="TCP/UDP Gateway" href="https://access.redhat.com/documentation/en-us/Red_Hat_JBoss_Fuse_Service_Works/6.0/html/Development_Guide_Volume_1_SwitchYard/chap-Gateways.html#sect-TCP_UDP"/>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-5-14000">
            <when>
                <xmlfile matches="//*[local-name()='jms-jca-provider']"/>
            </when>
            <perform>
                <hint title="JMS JCA Provider" effort="3">
                    <message>
                        <![CDATA[
                            A jms-jca-provider definition can be converted to a JCA
                            gateway binding on a composite service in Fuse Service Works.
                        ]]>
                    </message>
                    <link title="JCA Gateway Binding" href="https://access.redhat.com/documentation/en-us/Red_Hat_JBoss_Fuse_Service_Works/6.0/html/Development_Guide_Volume_1_SwitchYard/chap-Gateways.html#sect-JCA"/>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-5-15000">
            <when>
                <xmlfile matches="//*[local-name()='http-provider']"/>
            </when>
            <perform>
                <hint title="HTTP Provider" effort="3">
                    <message>
                        <![CDATA[
                            A http-provider definition can be converted to a HTTP gateway
                            binding on a composite service in Fuse Service Works.

                            For additional information, see the
                            [Gateway Listener Migration Guide](https://github.com/windup/soa-migration/blob/master/advice/gateway-listener-migration.md).
                        ]]>
                    </message>
                    <tag>soa-p</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-16000">
            <when>
                <xmlfile matches="//*[local-name()='cron-schedule']"/>
            </when>
            <perform>
                <hint title="Cron Schedule" effort="3">
                    <message>
                        <![CDATA[
                            A cron-schedule definition can be converted to a Quartz
                            gateway binding on a composite service in Fuse Service Works.

                            For additional information, see the
                            [Cron Scheduler Migration Guide](https://github.com/windup/soa-migration/blob/master/advice/cron-schedule-migration.md).
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-17000">
            <when>
                <xmlfile matches="//*[local-name()='ftp-listener' and @is-gateway='true']/@name"/>
            </when>
            <perform>
                <hint title="FTP Gateway Listener" effort="3">
                    <message>
                        <![CDATA[
                            This listener requires a composite service binding in Fuse Service Works. The configuration for a FTP binding
                            can be found in the ftp-bus definition associated with this listener.

                            For additional information, see the
                            [Gateway Listener Migration Guide](https://github.com/windup/soa-migration/blob/master/advice/gateway-listener-migration.md).
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-18000">
            <when>
                <xmlfile matches="//*[local-name()='camel-gateway']/@busidref"/>
            </when>
            <perform>
                <hint title="Camel Gateway Listener" effort="3">
                    <message>
                        <![CDATA[
                            This gateway requires a composite service binding in Fuse Service Works.
                            The configuration for a Camel binding can be found in the camel-bus definition associated
                            with this listener.

                            For additional information, see the
                            [Gateway Listener Migration Guide](https://github.com/windup/soa-migration/blob/master/advice/gateway-listener-migration.md).
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                    <tag>camel</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-19000">
            <when>
                <xmlfile matches="//*[local-name()='http-gateway']/@name"/>
            </when>
            <perform>
                <hint title="HTTP Gateway Listener" effort="3">
                    <message>
                        <![CDATA[
                            A <http-gateway> can be replaced in Fuse Service Works by a http binding added to your composite service.

                            For additional information, see the
                            [HTTP Gateway Migration Guide](https://github.com/windup/soa-migration/blob/master/advice/http-gateway-migration.md).
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-20000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.smooks.SmooksAction']/@class"/>
            </when>
            <perform>
                <hint title="Smooks Transformation Action" effort="3">
                    <message>
                        <![CDATA[
                            Fuse Service Works uses a <transform> to replace the invocation
                            of as SmooksAction to transform message content. You most likely will want to use a Smooks transform
                            to specify your Smooks configuration and from/to types.

                            For additional information, see the
                            [Transformation Migration Guide](https://github.com/windup/soa-migration/blob/master/advice/transformation-migration.md).
                        ]]>
                    </message>
                    <tag>smooks</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-21000">
            <when>
                <xmlfile matches="//*[local-name()='property' and @name='smooksConfig']/@name"/>
            </when>
            <perform>
                <hint title="Smooks Config" effort="3">
                    <message>
                        <![CDATA[
                            In a Fuse Service Works Smooks transform, you can specify your Smooks configuration with the &quot;config&quot; attribute.

                            For additional information, see the
                            [Transformation Migration Guide](https://github.com/windup/soa-migration/blob/master/advice/transformation-migration.md).
                        ]]>
                    </message>
                    <tag>smooks</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-22000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.smooks.SmooksAction']/*[local-name()='property' and @name='resultType']"/>
            </when>
            <perform>
                <hint title="Smooks Result Type" effort="3">
                    <message>
                        <![CDATA[
                            Fuse Service Works uses a <transform> to replace the invocation of as SmooksAction
                            to transform message content. You most likely will want to use a Smooks transform
                            to specify your Smooks configuration and from/to types.

                            For additional information, see the
                            [Transformation Migration Guide](https://github.com/windup/soa-migration/blob/master/advice/transformation-migration.md).
                        ]]>
                    </message>
                    <tag>smooks</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-23000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.actions.soap.proxy.SOAPProxy']/@class"/>
            </when>
            <perform>
                <hint title="ESB SOAP Proxy" effort="3">
                    <message>
                        <![CDATA[
                            Instead of the JBoss ESB SOAPProxy action which transforms a specified WSDL and rewrites the address to the JBoss ESB server,
                            Fuse Service Works relies on Camel's routing capability to forward requests from a proxying service to the source.
                            Create a proxy service and a reference to the original service, and then use Camel to route them.

                            For additional information, see the
                            [SOAPProxy Migration Guide](https://github.com/windup/soa-migration/blob/master/advice/soap-proxy.md).
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-24000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.actions.SystemPrintln']/@class"/>
            </when>
            <perform>
                <hint title="ESB SystemPrintln Action" effort="3">
                    <message>
                        <![CDATA[
                            In order to log your message (or a static logging message), you may want to create a Bean service which logs the message in the manner you wish, or you can use Camel routing to log static
                            logging messages.

                            For additional information, see the
                            [Action Class Migration Guide](https://github.com/windup/soa-migration/blob/master/advice/action-class-migration.md).
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-25000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.actions.StaticRouter']/@class"/>
            </when>
            <perform>
                <hint title="ESB Static Router" effort="3">
                    <message>
                        <![CDATA[
                            In order to configure static routes for your message in
                            Fuse Service Works, you should use Camel's routing (either through Java DSL routes or route.xml).

                            For additional information, see the
                            [Action Class Migration Guide](https://github.com/windup/soa-migration/blob/master/advice/action-class-migration.md).
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-26000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.actions.routing.JMSRouter']/@class"/>
            </when>
            <perform>
                <hint title="ESB JMS Router" effort="3">
                    <message>
                        <![CDATA[
                            In order to replace the use of the JMSRouter in Fuse Service Works, you should use a JMS binding. You may need to review the options for JMS bindings in
                            Fuse Service Works if you are using the unwrap property.

                            For additional information, see the
                            [Action Class Migration Guide](https://github.com/windup/soa-migration/blob/master/advice/action-class-migration.md).
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-27000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.actions.TestMessageStore']/@class"/>
            </when>
            <perform>
                <hint title="ESB Test Message Store" effort="3">
                    <message>
                        <![CDATA[
                            TestMessageStore is an out-of-the-box ESB action that is used in JBoss Application Server
                            container tests to store a message with some form of logging - to a file, JMX, etc. TestMessageStore is used throughout
                            the JBoss ESB sample projects to help test the results of processed messages.

                            Fuse Service Works is able to leverage Arquillian to do container testing, so TestMessageStore is not
                            necessary for testing. This action should simply be removed during the migration.
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-28000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.actions.scripting.GroovyActionProcessor']/@class"/>
            </when>
            <perform>
                <hint title="ESB GroovyActionProcessor" effort="3">
                    <message>
                        <![CDATA[
                            The GroovyActionProcessor action executes a Groovy script. You can duplicate this functionality in
                            Fuse Service Works through Camel routing (both Java and XML.)

                            For additional information, see the
                            [Camel Scripting Guide](https://access.redhat.com/documentation/en-us/Red_Hat_JBoss_Fuse_Service_Works/6.0/html/Development_Guide_Volume_1_SwitchYard/chap-Service_Implementations.html#Using_Scripting_Languages).
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-29000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.services.jbpm.actions.BpmProcessor']/@class"/>
            </when>
            <perform>
                <hint title="ESB BpmProcessor" effort="3">
                    <message>
                        <![CDATA[
                            The BpmProcessor makes calls to jBPM 3 through the jBPM command API. Fuse Service Works supports jBPM 5, so you will need
                            to migrate your existing workflow from jBPM 3 to jBPM 5 and use a Fuse Service Works BPM implementation.

                            For additional information, see the
                            [BPM Migration Guide](https://github.com/windup/soa-migration/blob/master/advice/bpm_migration.md).
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-30000">
            <when>
                <xmlfile matches="//*[local-name()='fs-bus']/@busid"/>
            </when>
            <perform>
                <hint title="ESB Filesystem Bus" effort="3">
                    <message>
                        <![CDATA[
                            A fs-bus definition can be converted to a Camel binding on a composite service in Fuse Service Works.

                            For additional information, see the
                            [Gateway Listener Migration Guide](https://github.com/windup/soa-migration/blob/master/advice/gateway-listener-migration.md).
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-31000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.actions.Notifier']/@class"/>
            </when>
            <perform>
                <hint title="ESB Notifier Action" effort="7">
                    <message>
                        <![CDATA[
                            JBoss ESB uses notifiers to transform ESB aware messages to a format that ESB-unaware services can handle. Fuse Service Works uses bi-directional gateways to transfer messages
                            via its service bindings.

                            A JBoss ESB Notifier should be converted to a Fuse Service Works Service Binding.

                            For example:

                            ```xml
                            <service category="routerToFile" name="FileRouterListener" description="Static route file destination">
                                <actions mep="OneWay">
                                    <action name="notificationAction" class="org.jboss.soa.esb.actions.Notifier">
                                        <property name="okMethod" value="notifyOK"/>
                                        <property name="notification-details">
                                            <NotificationList type="ok">
                                                <target class="NotifyFiles">
                                                    <file append="false" URI="/tmp/HelloWorldFileNotifierTest.log"/>
                                                </target>
                                            </NotificationList>
                                        </property>
                                    </action>
                                </actions>
                            </service>
                            ```


                            Could be translated to:

                            ```xml
                            <sca:reference name="HelloWorld" multiplicity="0..1" promote="MyComponent/HelloWorld">
                                <camel:binding.file>
                                    <camel:directory>/tmp</camel:directory>
                                    <camel:fileName>HelloWorldFileNotifierTest.log</camel:fileName>
                                </camel:binding.file>
                            </sca:reference>
                            <sca:component name="MyComponent">
                                <sca:reference name="HelloWorld">
                                    <sca:interface.wsdl interface="HelloWorld.wsdl#wsdl.porttype(HelloWorld)"/>
                                </sca:reference>
                            </sca:component>
                            ```
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-32000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.actions.converters.ByteArrayToString']/@class"/>
            </when>
            <perform>
                <hint title="ESB ByteArrayToString" effort="3">
                    <message>
                        <![CDATA[
                            JBoss ESB uses a ByteArrayToString action to do conversion on a message body. In Fuse Service Works
                            you would use Camel to do type conversion.
                        ]]>
                    </message>
                    <link title="Camel convertBodyTo" href="http://camel.apache.org/convertbodyto.html"/>
                    <link title="Camel Type Converters" href="http://camel.apache.org/type-converter.html"/>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-33000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.actions.converters.LongToDateConverter']/@class"/>
            </when>
            <perform>
                <hint title="ESB LongToDateConverter" effort="3">
                    <message>
                        <![CDATA[
                            JBoss ESB uses the LongToDateConverter action to do conversion on a message body.

                            In Fuse Service Works you would use Camel to do type conversion.
                        ]]>
                    </message>
                    <link title="Camel Type Converters" href="http://camel.apache.org/type-converter.html"/>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-34000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.actions.converters.ObjectToCSVString']/@class"/>
            </when>
            <perform>
                <hint title="ESB ObjectToCSVString" effort="3">
                    <message>
                        <![CDATA[
                            JBoss ESB uses the ObjectToCSVString action to do conversion on a message body. Fuse Service Works
                            would use a Smooks transform or a Camel route to perform this type of conversion.

                            For additional information, see the
                            [Transformation Migration Guide](https://github.com/windup/soa-migration/blob/master/advice/transformation-migration.md).
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-35000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.actions.converters.ObjectInvoke']/@class"/>
            </when>
            <perform>
                <hint title="ESB ObjectInvoke" effort="3">
                    <message>
                        <![CDATA[
                            JBoss ESB uses a ObjectInvoke action to invoke a processor on a message.
                            Fuse Service Works would use a bean component to do this.
                        ]]>
                    </message>
                    <link title="Fuse Service Works Bean Component" href="https://access.redhat.com/documentation/en-us/Red_Hat_JBoss_Fuse_Service_Works/6.0/html/Development_Guide_Volume_1_SwitchYard/chap-Service_Implementations.html#sect-Bean"/>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-36000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.actions.converters.ObjectToXStream']/@class"/>
            </when>
            <perform>
                    <hint title="ESB ObjectToXStream" effort="3">
                        <message>
                            <![CDATA[
                                JBoss ESB uses an ObjectToXStream action to do convert an Object payload to XML using the XStream
                                processor. Fuse Service Works would use a Smooks transform or a Camel route to do this type of conversion.

                                For additional information, see the
                                [Transformation Migration Guide](https://github.com/windup/soa-migration/blob/master/advice/transformation-migration.md).
                            ]]>
                        </message>
                        <tag>jboss-esb</tag>
                    </hint>
            </perform>
        </rule>
        <rule id="soa-p-37000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.actions.converters.XStreamToObject']/@class"/>
            </when>
            <perform>
                <hint title="ESB XStreamToObject" effort="3">
                    <message>
                        <![CDATA[
                            JBoss ESB uses an XStreamToObject action to convert XML in a payload to an object using the XStream processor.
                            Fuse Service Works would use Smooks transform or a Camel route transform to do this type of conversion.

                            For additional information, see the
                            [Transformation Migration Guide](https://github.com/windup/soa-migration/blob/master/advice/transformation-migration.md).
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-38000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.actions.transformation.xslt.XsltAction']/@class"/>
            </when>
            <perform>
                <hint title="ESB XsltAction" effort="3">
                    <message>
                        <![CDATA[
                            JBoss ESB uses the XsltAction action to transform documents in a payload. Fuse Service Works would use Camel to do this type of
                            conversion.

                            For additional information, see the
                            [Transformation Migration Guide](https://github.com/windup/soa-migration/blob/master/advice/transformation-migration.md).
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-39000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.actions.converters.SmooksTransformer']/@class"/>
            </when>
            <perform>
                <hint title="ESB SmooksTransformer" effort="3">
                    <message>
                        <![CDATA[
                            Fuse Service Works uses a &lt;transform&gt; to replace the invocation of a SmooksTransformer to transform message content.
                            You will need to use a Smooks transform to specify your Smooks configuration and from/to types.

                            For additional information, see the
                            [Transformation Migration Guide](https://github.com/windup/soa-migration/blob/master/advice/transformation-migration.md).
                        ]]>
                    </message>
                    <link title="Smooks Development Guide" href="https://access.redhat.com/documentation/en-us/Red_Hat_JBoss_Fuse_Service_Works/6.0/html/Development_Guide_Volume_2_Smooks/"/>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-40000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.actions.MessagePersister']/@class"/>
            </when>
            <perform>
                <hint title="ESB MessagePersister" effort="3">
                    <message>
                        <![CDATA[
                            JBoss ESB uses the MessagePersister action to persist a message. Fuse Service Works would use
                            a [SQL reference binding](https://access.redhat.com/documentation/en-us/Red_Hat_JBoss_Fuse_Service_Works/6.0/html/Development_Guide_Volume_1_SwitchYard/chap-Gateways.html#sect-SQL) to accomplish something similar.
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-41000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.actions.EJBProcessor']/@class"/>
            </when>
            <perform>
                <hint title="ESB EJBProcessor" effort="3">
                    <message>
                        <![CDATA[
                            JBoss ESB uses the EJBProcessor action to invoke a stateless session bean with the contents of a message.
                            Similar things can be achieved in Fuse Service Works through the use ofa bean service.
                        ]]>
                    </message>
                    <link title="Fuse Service Works Bean Component" href="https://access.redhat.com/documentation/en-us/Red_Hat_JBoss_Fuse_Service_Works/6.0/html/Development_Guide_Volume_1_SwitchYard/chap-Service_Implementations.html#sect-Bean"/>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-42000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.actions.scripting.ScriptingAction']/@class"/>
            </when>
            <perform>
                <hint title="ESB ScriptingAction" effort="3">
                    <message>
                        <![CDATA[
                            The ScriptingAction executes a script using the BeanScriptingFramework. You can duplicate this functionality in Fuse Service Works
                            through Camel routing (both Java and XML.)

                            For additional information, see the
                            [Camel Scripting Guide](https://access.redhat.com/documentation/en-us/Red_Hat_JBoss_Fuse_Service_Works/6.0/html/Development_Guide_Volume_1_SwitchYard/chap-Service_Implementations.html#Using_Scripting_Languages).
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-43000">
            <when>
                <xmlfile matches="//*[local-name()='action' and windup:matches(@class, 'org.jboss.soa.esb.actions.{javaclassname}')]/@class"/>
            </when>
            <perform>
                <hint title="ESB {javaclassname}" effort="3">
                    <message>
                        <![CDATA[
                            JBoss ESB uses the {javaclassname} action to aggregate a message sequence into a single aggregated message.
                            Fuse Service Works would make use of Camel routing and Camel's aggregator to accomplish this.

                            For more information, see the
                            [Camel Aggregator Documentation](http://camel.apache.org/aggregator.html).
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
            <where param="javaclassname">
                <matches pattern="(StreamingAggregator)|(Aggregator)"/>
            </where>
        </rule>
        <rule id="soa-p-44000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.actions.routing.http.HttpRouter']/@class"/>
            </when>
            <perform>
                <hint title="ESB HTTP Router" effort="3">
                    <message>
                        <![CDATA[
                            In order to replace the use of the HttpRouter in JBoss ESB, you should use a HTTP reference binding.

                            Further documentation is available in the
                            [Fuse Service Works Developer Guide](https://access.redhat.com/documentation/en-us/Red_Hat_JBoss_Fuse_Service_Works/6.0/html/Development_Guide_Volume_1_SwitchYard/chap-Gateways.html#sect-HTTP).
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-45000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.actions.routing.email.EmailRouter']/@class"/>
            </when>
            <perform>
                <hint title="ESB Email Router" effort="3">
                    <message>
                        <![CDATA[
                            In order to replace the use of the EmailRouter in Fuse Service Works, you should use a mail reference binding.

                            Further documentation is available in the
                            [Fuse Service Works Developer Guide](https://access.redhat.com/documentation/en-us/Red_Hat_JBoss_Fuse_Service_Works/6.0/html/Development_Guide_Volume_1_SwitchYard/chap-Gateways.html#sect-Mail).
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-46000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.actions.ContentBasedRouter']/@class"/>
            </when>
            <perform>
                <hint title="ESB ContentBasedRouter" effort="3">
                    <message>
                        <![CDATA[
                            In order to replace the use of the ContentBasedRouter in Fuse Service Works, you should use Camel to route messages.

                            A good example of this functionality can be found in the quickstarts project in the [rules-camel-jbr
                            quickstart](https://github.com/jboss-switchyard/quickstarts/tree/master/rules-camel-cbr).
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-47000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.actions.StaticWiretap']/@class"/>
            </when>
            <perform>
                <hint title="ESB StaticWiretap" effort="3">
                    <message>
                        <![CDATA[
                            In order to replace the use of the StaticWiretap in Fuse Service Works, you should use a
                            [Camel Wiretap](http://camel.apache.org/wire-tap.html) to perform this action.
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-48000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.actions.StaticRouter']/@class"/>
            </when>
            <perform>
                <hint title="ESB Static Router" effort="3">
                    <message>
                        <![CDATA[
                            In order to replace the use of the StaticRouter in Fuse Service Works, you should use Camel to route messages.

                            Further information is available in the [Camel Integration Patterns Documentation](http://camel.apache.org/enterprise-integration-patterns.html).
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-49000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.actions.soap.SOAPProcessor']/@class"/>
            </when>
            <perform>
                <hint title="ESB SOAPProcessor" effort="3">
                    <message>
                        <![CDATA[
                            In order to replace the use of the SOAPProcessor you should use a SOAP reference binding in Fuse Service Works.

                            For more information, see the
                            [Fuse Service Works Development Guide](https://access.redhat.com/documentation/en-us/Red_Hat_JBoss_Fuse_Service_Works/6.0/html/Development_Guide_Volume_1_SwitchYard/chap-Gateways.html#sect-SOAP).
                        ]]>
                    </message>
                </hint>
            </perform>
        </rule>
        <rule id="soa-p-50000">
            <when>
                <xmlfile matches="//*[local-name()='action' and @class='org.jboss.soa.esb.actions.soap.SOAPClient']/@class"/>
            </when>
            <perform>
                <hint title="ESB SOAPClient" effort="3">
                    <message>
                        <![CDATA[
                            In order to replace the use of the SOAPClient in Fuse Service Works, you should use a SOAP reference binding.

                            For more information, see the
                            [Fuse Service Works Development Guide](https://access.redhat.com/documentation/en-us/Red_Hat_JBoss_Fuse_Service_Works/6.0/html/Development_Guide_Volume_1_SwitchYard/chap-Gateways.html#sect-SOAP).
                        ]]>
                    </message>
                    <tag>jboss-esb</tag>
                </hint>
            </perform>
        </rule>
    </rules>
</ruleset>
