Oracle Workflow Guide
Release 2.6.2

Part Number A95265-03
  Go to previous page Go to next page       Go To Table Of Contents Go To Index Go To Table Of Contents

                     Contents  Index  Glossary Master Index Feedback

"PL/SQL CLOB" Documents

The PL/SQL procedure that generates a PL/SQL CLOB document must have the following standard API:

procedure <procedure name> (document_id in varchar2,
display_type in varchar2,
document in out clob,
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 value that you specify in the default value field of the Attribute property page for a "PL/SQL CLOB" document (plsqlclob:<procedure>/<document_identifier>). <procedure> should be replaced with the PL/SQL package and procedure name in the form of package.procedure. The phrase <document_identifier> should be replaced with the PL/SQL argument string that you want to pass directly to the procedure. The argument string should identify the document. For example: plsqlclob:po_wf.show_req_clob/2036. If you wish to generate the PL/SQL argument string value dynamically, create another item attribute, and reference that item attribute as "&ITEM_ATTRIBUTE" in place of the PL/SQL argument string. Then before any activity that references this other item attribute gets executed, call the WF_ENGINE.SetItemAttribute API to dynamically set the PL/SQL argument string value. For example: plsqlclob:po_wf.show_req_clob/&POREQ_NUMBER.
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.
text/html--the document is embedded inside an HTML representation of the notification as viewed from the Notification Web page. The procedure must generate a HTML representation of the document, 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. If you include top level HTML tags accidentally, Oracle Workflow removes the tags for you when the document attribute is referenced in a message body. 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.
' '--the document is presented as a separate attachment to the notification. Any content type may be returned.
document The outbound text buffer where the 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.
Note: You can call WF_NOTIFICATION.WriteToClob() to help build the CLOB by appending a string of character data to it. See: WriteToClob.

See Also

To Define a Document Attribute  
         Previous  Next          Contents  Index  Glossary

Copyright © 1996, 2002 Oracle Corporation.

All Rights Reserved.