Previous  Next          Contents  Index  Glossary  Library

Standard API for a "PL/SQL" Document

You can integrate a document into a workflow process by defining the document as an attribute for an item type, message, or activity. One type of document that Oracle Workflow supports is a "PL/SQL" document. Oracle Workflow constructs a dynamic call to a PL/SQL procedure that generates the document. The PL/SQL procedure must have the following standard API:

procedure <procedure name> ( document_id in varchar2,
        display_type in varchar2,
        document in out varchar2,
        document_type in out varchar2)

The arguments for the procedure are as follows:

document_id A string that uniquely identifies a document. This is the same string as the document identifier that you specify in the default value field of the Attribute property page for a "PL/SQL" document (plsql:<procedure>/<document_identifier>).
display_type One of three values that represents the content type used for the notification presentation, also referred to as the requested type.:
text/plain--the document is embedded inside a plain text representation of the notification as viewed from an E-mail message. The entire email message must be less than or equal to 32K, so depending on how large your E-mail template is, some of the plain text document that the procedure generates may get truncated. See: Modifying Your Message Templates.
text/html--the document is embedded inside an HTML representation of the notification as viewed from the Notification Web page, or the HTML attachment to an E-mail message. The procedure must generate a HTML representation of the document of up to 32K, but should not include top level HTML tags like <HTML> or <BODY> since the HTML page that the document is being inserted into already contains these tags. Note that the procedure can alternatively generate a plain text document, as the notification system can automatically surround plain text with the appropriate HTML tags to preserve formatting.
document The outbound text buffer where up to 32K of document text is returned.
document_type The outbound text buffer where the document content type is returned. Also referred to as the returned type. If no type is supplied, then 'text/plain' is assumed.


         Previous  Next          Contents  Index  Glossary  Library