Document Delivery From EBS ? Part IV

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



Brent Lowe


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.



  1. 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.


For example:


<channel name="aventx">com.strsoftware.axtko.delivery.aventx.AventXDeliveryRequestFactory</channel>



  1. Register the Custom Channel inline in the java code itself by simply adding the call:

DeliveryManager.addRequestFactory("aventx",
"com.strsoftware.axtko.delivery.aventx.AventXDeliveryRequestFactory");


Importing the properties of your custom channel is equally easy; just add an import statement in your source:

import com.strsoftware.axtko.delivery.aventx.AventXPropertyDefinitions;

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.addRequestFactory("aventx",
"com.strsoftware.axtko.delivery.aventx.AventXDeliveryRequestFactory");
         DeliveryManager deliverymanager = new DeliveryManager();
DeliveryRequest deliveryrequest = deliverymanager.createRequest("aventx");
         // Add specific properties about this document.
         deliveryrequest.addProperty(AventXPropertyDefinitions.
AVENTX_SUBJECT, "Purchase Order #" + sDocId);
         deliveryrequest.addProperty(AventXPropertyDefinitions.
AVENTX_TOCOMPANY, sToCompany);
         deliveryrequest.addProperty(AventXPropertyDefinitions.
AVENTX_TONAME, sToName);
        deliveryrequest.addProperty(AventXPropertyDefinitions.
AVENTX_FROMNAME, sUserName);  
        deliveryrequest.addProperty(AventXPropertyDefinitions.
AVENTX_FROMEMAIL, sUserEmail);
         deliveryrequest.addProperty(AventXPropertyDefinitions.
AVENTX_CONFIRMEMAIL1, sUserEmail);
         deliveryrequest.addProperty(AventXPropertyDefinitions.
AVENTX_CONFIRMLEVEL1, "All");
         deliveryrequest.addProperty(AventXPropertyDefinitions.
AVENTX_CONFIRMEMAIL2, sBuyerEmail);
         deliveryrequest.addProperty(AventXPropertyDefinitions.
AVENTX_CONFIRMLEVEL2, "Success");
         deliveryrequest.addProperty(AventXPropertyDefinitions.
AVENTX_CONFIRMEMAIL3, "purchasing@yourcompany.com");
       deliveryrequest.addProperty(AventXPropertyDefinitions.
AVENTX_CONFIRMLEVEL3, "Fatal");
deliveryrequest.addProperty(AventXPropertyDefinitions.
AVENTX_ERPTRACKNO, sRequestId);
         deliveryrequest.addProperty(AventXPropertyDefinitions.
AVENTX_ERPLOGIN, sUser);
         deliveryrequest.addProperty(AventXPropertyDefinitions.
AVENTX_DOCID, sDocId);
         deliveryrequest.addProperty(AventXPropertyDefinitions.
AVENTX_ORGID, sOrgId);
         deliveryrequest.addProperty(AventXPropertyDefinitions.AVENTX_SECONDARYATTACHMENTFILE1,
"\tmp\Instructions.doc");
         deliveryrequest.addProperty(AventXPropertyDefinitions.AVENTX_SECONDARYATTACHMENTNAME1,
"Instructions_For_Vendor.doc");
         deliveryrequest.addProperty(AventXPropertyDefinitions.AVENTX_SECONDARYATTACHMENTFILE2,
"\tmp\T&C.doc");
         deliveryrequest.addProperty(AventXPropertyDefinitions.AVENTX_SECONDARYATTACHMENTNAME2,
"Terms_and_Conditions.doc");
         deliveryrequest.addProperty(AventXPropertyDefinitions.AVENTX_PRIMARYATTACHMENTNAME,
"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";

deliveryrequest.addProperty(AventXPropertyDefinitions.AVENTX_REMARKS, sRemarks);
         deliveryrequest.addProperty(AventXPropertyDefinitions.AVENTX_ACKFILE,
"$FCHOME/tmp/grimlock.VIS1.^FAXID.%X.ACK");
         deliveryrequest.addProperty(AventXPropertyDefinitions.AVENTX_DESTINATION, sDestination);
         // Set the actual document to deliver.
         deliveryrequest.setDocument(sFileName);
         // Submit the document.
         deliveryrequest.submit();
         deliveryrequest.close();
         ...

To see a sample of the delivered document -> fax  |  email


Step 2.   Create a print driver in Oracle to call your class


Following Tim痴 example in Part III and Emailing From EBS, we can setup XMLP as a virtual printer and have that printer call our class:

   CLASSPATH=$FCHOME/axtko:$FCHOME/axtko/com/strsoftware/axtko/samples:$CLASSPATH
   export CLASSPATH
   java AventXDeliverySample $*
   RESULT=$?
   if [ $RESULT 墨e 0 ]; then
      echo 典here was an error while delivering the document.?
      exit $RESULT
   fi
   exit 0

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.

Comments:

Thank you for a great post

Posted by How to Get a Six Pack Quickly on April 29, 2010 at 05:18 PM MDT #

Your post is really nice man, I read many books about weight loss and build six pack but most of them are crap

Posted by Lavelle Rushlow on July 24, 2010 at 01:22 AM MDT #

Just in case you didn't know... your site looks very strange in Safari on a Mac

Posted by Lizette Wipf on August 07, 2010 at 12:43 PM MDT #

Dear Tim, I'm trying to register my custom delivery channel in BI Publisher Enterprise with the . I copied my custom jar "customchannel.jar" file under : D:\OracleBI\oc4j_bi\j2ee\home\applications\xmlpserver\xmlpserver\WEB-INF\lib I modified the file xdodelivery.cfg by adding : customdeliverychannel.FileDeliveryRequestFactory This file is located under D:\OracleBI\xmlp\XMLP\Admin\Delivery I also copied it under D:\OracleBI\oc4j_bi\j2ee\home\applications\xmlpserver\xmlpserver\resource When I burst a report, I have the message :"Unknown delivery Channel"...meaning my custom channel is not registered, I assume... My bursting request is to me ok. Do you have an idea to solve my issue? have you ever implemented custom delivery channel in BI Publisher Entreprise? Thank you in advance.

Posted by Matthieu LOMBARD on October 15, 2010 at 07:13 AM MDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Follow bipublisher on Twitter Find Us on Facebook BI Publisher Youtube ChannelDiscussion Forum

Join our BI Publisher community to get the most and keep updated with the latest news, How-to, Solutions! Share your feedback and let us hear your voice @bipublisher on Twitter, on our official Facebook page, and Youtube!

Search

Archives
« August 2015
SunMonTueWedThuFriSat
      
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
     
Today