Document Delivery From EBS ? Part IV
By Tim Dexter on Oct 03, 2007
A treat for me today, Brent Lowe from Oracle Partner STR Software sent me a blog entry to share. STR Software provide a really nice, tight delivery server integration for EBS customers. They have developed a user interface to allow you to deliver and monitor documents via the forms interface. If you are not wanting to get into the delivery manager APIs and need a 'delivery' solution that installs in a snap and works with Publisher check out STR's offereing.
Brent's post deals with a delivery channel I did not cover in last year's delivery series - that is the 'custom' channel. He uses the extensibility of the Publisher delivery manager to provide the tight integration that you see in the STR solution today. This was just what we were looking for from a third party when we decided to provide the custom channel option. If you are wondering how you could take advantage of the channel, read on ... if not read on anyway its a good article.
So with out further ado ...
Document Delivery From EBS : Part IV
To continue the series on document delivery from EBS, I thought it would be helpful to demonstrate the use of a Custom Delivery Channel. Looking back on Tim痴 original post, the Custom Delivery Channel was defined as:
"Custom" if you have your own channel or a third party delivery solution you (or they) can create a custom delivery channel interface and XMLP will direct documents down that channel.?
As it turns out, we (STR Software) fall into this realm of the 奏hird party delivery solution? and decided to extend the BI/XML Publisher Delivery Manager email and fax capabilities by creating our own Custom Channel. The AventX Custom Channel enables a number of features we felt were necessary to provide in an enterprise environment:
- Centralized management of email and fax transmissions.
- Notification of the successful or failed transmission of documents to email addresses, flat files or via reports.
- Multiple email and fax recipients or combinations of both.
- Support of multiple attachments or multiple documents in a single transmission.
- Dynamic cover page information such as the recipient痴 name and company, send information, remarks or notes, etc.
- Does not use open source/unsupported software (CUPS/eFax/FAX4CUPS).
OK, enough about us, let痴 get back to the real point of this post.
Once you have a Custom Delivery Channel, how do you use it?
To demonstrate how to use a Custom Delivery Channel, I thought it would be beneficial to walk through an example of delivering a standard Purchase Order (or any document) from Oracle EBS.
Step 1. Create a class that utilizes the Custom Channel.
There are a couple key points to remember here.
- You must register your Custom Channel prior to using it.
- You must import the properties of your Custom Channel so that they are available for use.
So how do you register your Custom Channel? You have 2 options.
- Use the $XDO_TOP/resource/xdodelivery.cfg file
The xdodelivery.cfg file has a section named <channels>, here you can simply define the location of your custom channel痴 Request Factory and it will be made available for the entire Delivery System.
- Register the Custom Channel inline in the java code itself by simply adding the call:
Importing the properties of your custom channel is equally easy; just add an import statement in your source:
Now that you have registered your Custom Channel and imported the properties, using the channel is as easy as setting the appropriate properties to the values that are important to you, your users and the recipients. To see all of the available properties in our custom channel, check out this link. In the example below I am setting the following properties:
- The email or fax cover page subject to be "Purchase Order #x" where x is the actual PO number.
- The Recipient Name and Company information for a fax cover page or email message body.
- The Sender痴 name and email address for the fax cover page or for email from information and bounce backs.
- Multiple email confirmations to be delivered to the user that submitted the document, the buyer of the PO and a hard coded address. These notifications will be delivered on the Successful or Failed transmission of the email or fax.
- The Concurrent Request ID, Oracle User Name, Organization ID and Document ID so that the document can be easily queried or reported on.
- Different attachments to my delivery, in this case I am adding a description of one of the widgets I am purchasing and my standard terms and conditions.
- The name of my Purchase Order attachment to be 撤urchase Order #X.pdf? for email delivery.
- Remarks for my cover page and email message body. Note that for faxes I can actually add a Signature (denoted by the [SIG=]) to my cover page!
- A byte delimited status file that can be read programmatically to post status information back to my Oracle database.
- And finally, I set who I want this document to go to, where sDestination can be a fax or email address.
// Create an 'aventx' delivery channel
DeliveryManager deliverymanager = new DeliveryManager();
DeliveryRequest deliveryrequest = deliverymanager.createRequest("aventx");
// Add specific properties about this document.
AVENTX_SUBJECT, "Purchase Order #" + sDocId);
"Purchase_Order_#" + sDocId + ".pdf");
// Create the remarks for the coverpage.
sRemarks = "Dear Sir or Madam, \nPlease find the attached Purchase Order #" + sDocId + ".\n" ;
sRemarks += "It has been a pleasure working with you!\n\n";
sRemarks += "Sincerely,\n";
sRemarks += "[SIG=RBL1]\n\n\n\n";
sRemarks += "Brent Lowe";
// Set the actual document to deliver.
// Submit the document.
Step 2. Create a print driver in Oracle to call your class
java AventXDeliverySample $*
if [ $RESULT 墨e 0 ]; then
echo 典here was an error while delivering the document.?
Now when running your Purchase Order Reports, you can simply direct the output to your XMLP Virtual printer!
As you can see, using a Custom Delivery Channel is as easy as using the standard fax and email APIs. What a Custom Channel buys you over the base channels is flexibility. As you値l note from the above example, I have far more control over my document delivery needs as I am able to tailor the channel to my business specifications.