2 Replies Latest reply on Jul 31, 2012 11:57 AM by zerayaqob

    how to use NotificationList type="err" ,NotificationList type="ok", and exceptionMessage in a notifier.

    zerayaqob Newbie

      I have been trying to figure this out for some time and am finding it very hard. What I want to do is  call notifySQL with the message 'success' or 'error' passed to it in its value depending on the outcome of the first notification targer "CustomNotifyFTP" which attempts to send a file to a remote server. I am able to catch exceptions that occurs in this FTP notifier but I have not been able to make the SQLNotifier know of this failure. Whatever happens the notifier with the value 'success' gets called, even if the notifyFTP returns with an exception. I have gone over the documentation and haven't found any clear description on how to do this. Can you guys enlighten me?

       

      Thanks.

       

       

       

      <action class="org.jboss.soa.esb.actions.Notifier" name="sendSFTPAction">

           <property name="okMethod" value="notifyOK"/>

           <property name="exceptionMethod" value="notifyError"/>

           <property name="destinations">

      <NotificationList type="ok">

             <target class="CustomNotifyFTP">

              <ftp URL="sftp://${url}" filename="${fileName}"/>

             </target>

             <target class="NotifySQL"

              connection-url="jdbc:hsqldb:hsql://localhost:1706"

              driver-class="org.hsqldb.jdbcDriver" fileNameColumn="fileName"

              password="pword" table="log" user-name="sa">

              <column name="status" value="success"/>

             </target>

            </NotificationList>

            <NotificationList type="err">

             <target class=NotifySQL"

              connection-url="jdbc:hsqldb:hsql://localhost:1706"

              driver-class="org.hsqldb.jdbcDriver" fileNameColumn="fileName"

              password="pword" table="log" user-name="sa">

              <column name="status" value="error"/>

             </target>

               </NotificationList>

        </property>

          </action>