Custom Search SOABYTE here

Monday, November 8, 2010

Rejection Handlers

This feature lets you configure your BPEL process to process the correct records of a file and write only the rejected records to an archive directory by setting the rejectedMessageHandlersparameter in the bpel.xml file. Correct. However, the "Rejection handlers" come in four different flavors.
(Note:all the following bpel.xml properties must be defined asActivation Agent properties, for example

  <BPELProcess src="ErrorTest.bpel"  id="ErrorTest">




         <property name="rejectedMessageHandlers">


so they only apply to Inbound (WSDL) operations (~ BPEL Receive).

File system based Rejection Handler

<property name="rejectedMessageHandlers">


for example
<property name="rejectedMessageHandlers">


This rejection handler is straight forward - bad messages are written to the configured directory - using the file name pattern
INVALID_MSG_ + <process-name> + <operation-name> + <current-time>

RAW Oracle Advanced Queue based Rejection Handler

<property name="rejectedMessageHandlers">


(<password> can be encrypted) for example
<property name="rejectedMessageHandlers">


This rejection handler allows the user to designate a Oracle Rdbms RAW AQ queue as the rejection storage. Note that the ":" and "|" must appear in the places shown. Also note that the password can be encrypted using theencrypt.batutility inorabpel/bin.

BPEL Process Rejection Handler

<property name="rejectedMessageHandlers">


(<password> for domain if not "bpel" - can be encrypted - "[]" means optional)
for example
<property name="rejectedMessageHandlers">


This rejection handler will send the bad message to another (designated error handling) BPEL process. The user can thus define a process with a Receive operation of his own choosing (WSDL and BPEL src) - the only constraint is on theMessage Typeof the message that will be sent to this rejection handler.
It must be declared to have the type "RejectedMessage". This can conveniently be achieved by importing the "xmllib" resident WSDL "RejectionMessage.wsdl" which defines such a message:
<message name="RejectionMessage">

  <part name="message" element="err:RejectedMessage"/>

An xmllib WSDL import (from another WSDL) is achieved using the "well-known" URL
<import namespace=""
i.e. the Receive operation WSDL which the user defines for his Rejection Handler BPEL Process would simply contain this import and then the port type would reference this:
<definitions ...


  <portType name="MyRejectionHandlerPortType">
    <operation name="myHandleRejectionOperation">
      <input message="rej:RejectionMessage"/>

WSIF Based Rejection Handler

<property name="rejectedMessageHandlers">
for example
<property name="rejectedMessageHandlers">


This last rejection handler lets the user configure any type ofWSIF WSDL(JCA, EJB, JMS, HTTP, Java etc), i.e. any kind of Service which can be reached via WSIF - as the bad message handler. The exact same constraint vis-a-vis theMessage Typeas described above for the BPEL Process Rejection Handler also applies here.


Post a Comment

Blogger Profile