You are on page 1of 4

Debatching : When a file contains multiple messages, you can select to publish messages

in a specific number of batches. This is referred to as debatching. During debatching, the file
reader, upon restart, proceeds from where it left off in the previous run, thereby avoiding
duplicate messages.
Files greater than or equal to 7 MB cannot be delivered. As an alternative, you can debatch
large files (if they have multiple messages), and publish these files in messages of sizes less
than 7 MB. This alternative option is applicable only to structured files (comma-delimited or
fixed position), which contain more than one message. It is not applicable to binary or XML
files.

File Polling
The frequency with which to poll the inbound directory for new files to retrieve.
The minimum file age of files to retrieve. For example, this enables a large file to be
completely copied into the directory before it is retrieved for processing. The age is
determined by the last modified time stamp. For example, if you know that it takes three to
four minutes for a file to be written, set the minimum age of pollable files to five minutes. If
a file is detected in the input directory and its modification time is less than 5 minutes older
than the current time, the file is not retrieved because it is still potentially being written to.
Whether or not to delete files after a successful retrieval. If this check box is not selected,
processed files remain in the inbound directory, but are ignored. Only files with modification
dates more recent than the last processed file are retrieved. If you place another file in the
inbound directory with the same name as a file that has already been processed, but the
modification date remains the same, that file is not retrieved.

File Processing
The file adapter prepares the files for processing and delivers them to the adapter
translator for translation and debatching (if necessary).
If you have many inbound files to process or very large files of more than 1 MB, you
may need to increase the configtimeoutvalue in the Oracle_
Home\integration\orabpel\system\appserver\oc4j\j2ee\home\server.
xmlfile:
<transactionconfigtimeout="30000"/>

Native Data Translation


If native format translation is not required (for example, a JPG or GIF image is being
processed) select the Native format translation is not required check box. The file is
passed through in base-64 encoding. XSD files are required for translation. If you want to
define a new schema or convert an existing data type description (DTD) or COBOL
Copybook, select Define Schema for Native Format. This starts the Native Format Builder
Wizard. This wizard guides you through the creation of a native schema file from file formats
such as comma-separated value (CSV), fixed-length, DTD, and COBOL Copybook. After the
native schema file is created, you are returned to this Messages window with the Schema
File URL and Schema Element fields filled in. Ensure that the schema you specify includes
a namespace. If your schema does not have a namespace, an error message appears.

Error Handling
The file adapter provides several inbound error handling capabilities:
rejectedMessageHandlers Property
fatalErrorFailoverProcess Property
uniqueMessageSeparator Property
Default Error Directory
rejectedMessageHandlers Property
You can 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 rejectedMessageHandlers
property. For example, assume that you have a file with four records. If three records are
processed successfully and one record is not, the file is processed with the three correct
records. The record that errored is written to a rejected messages directory. The behavior of
the rejectedMessageHandlersproperty in case a file has only one message is to reject the
entire message.
You first define the rejectedMessageHandlersproperty as an activationAgent
property in the bpel.xmlfile so that it applies to inbound WSDL operations only:
<BPELSuitcase>
<BPELProcesssrc="ErrorTest.bpel"id="ErrorTest">
<activationAgents>
<activationAgent
className="oracle.tip.adapter.fw.agent.jca.JCAActivationAgent"
partnerLink="inboundPL">
<propertyname="rejectedMessageHandlers">
file://C:/orabpel/samples/test/errorTest/rejectedMessages
</property>

This causes messages that error to be written to the configured directory using the
following naming pattern:
INVALID_MSG_+process-name +operation-name +current-time

fatalErrorFailoverProcess Property
If the file adapter (or any OracleAS Adapter) encounters an unrecoverable system
error (such as no more memory or a full disk), it can instruct the adapter framework to
shut down the BPEL process.
You can optionally configure a standby (or failover) BPEL process to be invoked when
the adapter initiates the shutdown request of the (main) BPEL process.
You configure this failover BPEL process by setting the
fatalErrorFailoverProcessproperty as an activationAgent property in the
bpel.xmlfile.
<propertyname="fatalErrorFailoverProcess">
bpel://bpel-domain:password|process-name|operation-name|
input-message-part-name
</property>

where password (which can be omitted if it is bpel) can be encrypted.


For example:
<propertyname="fatalErrorFailoverProcess">
bpel://default|JCAFatalErrorHandler|handleError|message
</property>

or
<propertyname="fatalErrorFailoverProcess">
bpel://default:C23487CFA591952D3ED0B81F0961F65A|JCAFatalErrorHandler|handleError|
message</property>

where the bpelpassword was specified in encrypted form (using the encrypt.bat
(for Windows) or encrypt.sh(for UNIX) command line utility).
The fatal error BPEL process must use a specific input (WSDL) message type. This
message type is defined in the system-provided WSDL file
FatalErrorMessageWSDL.wsdl. This WSDL can be referenced (imported) using
the following:
<importnamespace="http://xmlns.oracle.com/pcbpel/fatalErrorHandler"
location="http://localhost:9700/orabpel/xmllib/jca/FatalErrorMessage.wsdl"/>

The XML schema type for this message is as follows:


<complexTypename="FatalErrorMessageType">
<sequence>
<elementname="Reason"type="string"/>
<elementname="Exception"type="string"/>
<elementname="StackTrace"type="string"/>
</sequence>
</complexType>

The purpose of the failover BPEL process can be to undertake error compensating
actions, alert someone through e-mail or short message service (SMS), or restart some
other process.
uniqueMessageSeparator Property
In the case of debatching (multiple messages in a single file), the typical behavior is to reject
the messages from the first bad message to the end of the file. If each message has a
unique separator and that separator is not part of any data, then rejection can be more finegrained. In these cases, you can define a uniqueMessageSeparatorin the schema element
of the native schema to have the value of this unique message separator. This property
controls how the adapter translator works when parsing through multiple records in one file
(debatching). This property enables recovery even when detecting bad messages inside a
large batch file; when a bad record is detected, the adapter translator skips to the next
unique message separator boundary and continues from there. If you do not set this
property, all records that follow the record that errored are also rejected.
The following schema file provides an example of using uniqueMessageSeparator.
<?xmlversion="1.0"?>
<xsd:schemaxmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
targetNamespace="http://TargetNamespace.com/Reader"
xmlns:tns="http://TargetNamespace.com/Reader"
elementFormDefault="qualified"attributeFormDefault="unqualified"
nxsd:encoding="USASCII"nxsd:stream="chars"
nxsd:version="NXSD"nxsd:uniqueMessageSeparator="${eol}">
<xsd:elementname="emplisting">
<xsd:complexType>
<xsd:sequence>
<xsd:elementname="emp"minOccurs="1"maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:elementname="GUID"type="xsd:string"nxsd:style="terminated"
nxsd:terminatedBy=","nxsd:quotedBy="&quot;">
</xsd:element>
<xsd:elementname="Designation"type="xsd:string"

nxsd:style="terminated"nxsd:terminatedBy=","
nxsd:quotedBy="&quot;">
</xsd:element>
<xsd:elementname="Car"type="xsd:string"nxsd:style="terminated"
nxsd:terminatedBy=","nxsd:quotedBy="&quot;">
</xsd:element>
<xsd:elementname="Labtop"type="xsd:string"
nxsd:style="terminated"nxsd:terminatedBy=","
nxsd:quotedBy="&quot;">
</xsd:element>
<xsd:elementname="Location"type="xsd:string"
nxsd:style="terminated"nxsd:terminatedBy=","
nxsd:quotedBy="&quot;">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<!NXSDWIZ:D:\work\jDevProjects\Temp_BPEL_process\Sample2\note.txt:>
<!USEHEADER:false:>
https://asksoa.wordpress.com/fileadaptererrorhandling/
https://community.oracle.com/thread/991438?start=0&tstart=0

Default Error Directory


If you do not set the rejectedMessageHandlersproperty, records that error during
translation are placed by default in

Oracle_Home\integration\orabpel\domains\domain_name\archive\jca\default_directory

You might also like