Skip Headers

Oracle Workflow Developer's Guide
Release 2.6.3

Part Number B10284-02
Previous Next       Contents Index Glossary
         Previous  Next          Contents  Index  Glossary

"PL/SQL BLOB" Documents

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

procedure <procedure name> (document_id in varchar2,
display_type in varchar2,
document in out blob,
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 BLOB" document (plsqlblob:<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: plsqlblob:po_wf.show_req_blob/2038. 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: plsqlblob:po_wf.show_req_blob/&POREQ_NUMBER.
display_type For a PL/SQL BLOB document, this value should be ' ' to represent the content type used for the notification presentation, also referred to as the requested type:
' '--the document is presented as a separate attachment to the notification. Any content type may be returned.
document The outbound LOB locator pointing to where the document text is stored. This locator is a temporary LOB locator, so you must write your document text to this locator rather than replacing its value. If this value is overwritten, the temporary LOB is not implicitly freed. For more information, see Temporary LOBs, Oracle Application Developer's Guide - Large Objects (LOBs).
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. This argument should specify an appropriate MIME type with a primary type of either application or image, such as 'application/doc', 'application/pdf', 'image/jpg', or 'image/gif'. You can also optionally specify a file name for the attachment as part of this argument. Use a semicolon (';') to separate the file name from the preceding value in the argument, and specify the file name in the format 'name=<filename>' with no spaces before or after the equal sign ('='). For example, you can set a value for the document_type with the following command:
document_type := 'image/jpg; name=filename.jpg';

See Also

To Define a Document Attribute
         Previous  Next          Contents  Index  Glossary

Oracle Logo
Copyright © 2003 Oracle Corporation.

All rights reserved.