在WORKFLOW中可以使用JSP方式,目前使用的方式PLSQL为拼写HTML。
关于限制请参考
http://docs.oracle.com/cd/E18727_01/doc.121/e12905/T361836T361983.htm
http://docs.oracle.com/cd/E18727_01/doc.121/e12905/T361836T361983.htm#I_doc
片段摘要
To Define a Document Attribute
-
Enter a string that identifies the document in the default value field of the Attribute property page.
You can identify the following types of document for a document attribute:
-
A PL/SQL document
-
A PL/SQL CLOB document
-
A PL/SQL BLOB document
-
An Oracle Application Framework region
Note: If you define a message attribute of type document, you must assign that attribute a source of Send. You cannot use a document attribute as a respond message attribute.
-
-
A PL/SQL document represents data from the database as a character string, generated from a PL/SQL procedure. Specify the default value of a PL/SQL document as
plsql:<procedure>/<document_identifier>
Replace <procedure> with the PL/SQL package and procedure name, separated by a period. Replace <document_identifier> with the PL/SQL argument string that you want to pass directly to the procedure. The argument string should identify the document.
Note: The PL/SQL procedure must follow a standard API format. See: Standard APIs for "PL/SQL" Documents.
For example, the following string represents the PL/SQL document po_req:2034, generated by the procedure po_wf.show_req.
plsql:po_wf.show_req/po_req:2034
Note: The maximum length of the data that a PL/SQL document can contain is 32 kilobytes. If you expect your document to exceed 32 Kb, you should use a PL/SQL CLOB document to hold the data instead.
A PL/SQL document can be displayed in the subject line of a notification, displayed in the message body of a notification, or included as an attachment to the notification.
-
A PL/SQL CLOB document represents data from the database as a character large object (CLOB), generated from a PL/SQL procedure. Specify the default value of a PL/SQL CLOB document as
plsqlclob:<procedure>/<document_identifier>
Replace <procedure> with the PL/SQL package and procedure name, separated by a period. Replace <document_identifier> with the PL/SQL argument string that you want to pass directly to the procedure. The argument string should identify the document.
Note: The PL/SQL procedure must follow a standard API format. See: Standard APIs for "PL/SQL" Documents.
For example, the following string represents the PL/SQL CLOB document, po_req:2036, generated by the procedure po_wf.show_req_clob.
plsqlclob:po_wf.show_req_clob/po_req:2036
A PL/SQL CLOB document that contains text or HTML can either be displayed in the message body of a notification or included as an attachment to the notification.
PL/SQL CLOB documents do not support further substitution of message attribute tokens. The text or HTML contents of the CLOB are printed in a message body just as they are generated by the PL/SQL procedure.
-
Do not use tokens within the CLOB.
-
Ensure that the PL/SQL procedure performs any formatting you require.
A PL/SQL CLOB document that you include as an attachment to a notification can also contain a PDF or RTF document or other binary data encoded to base64. You should first store the document in the database as a binary large object (BLOB) and then convert the document into a CLOB as part of the PL/SQL procedure you use to produce the CLOB. See: Standard APIs for "PL/SQL" Documents.
You can use the UTL_RAW.Cast_To_VARCHAR2 function to convert PDF or RTF data from the BLOB into VARCHAR2 data that you write to a CLOB. You can optionally use the WF_MAIL_UTIL.EncodeBLOB procedure to encode the binary data to base64. See: UTL_RAW, Oracle Database PL/SQL Packages and Types Reference and EncodeBLOB, Oracle Workflow API Reference.
-
-
A PL/SQL BLOB document represents data from the database as a binary large object (BLOB), generated from a PL/SQL procedure. Specify the default value of a PL/SQL BLOB document as
plsqlblob:<procedure>/<document_identifier>
Replace <procedure> with the PL/SQL package and procedure name, separated by a period. Replace <document_identifier> with the PL/SQL argument string that you want to pass directly to the procedure. The argument string should identify the document.
Note: The PL/SQL procedure must follow a standard API format. See: Standard APIs for "PL/SQL" Documents.
For example, the following string represents the PL/SQL BLOB document po_req:2038, generated by the procedure po_wf.show_req_blob.
plsqlblob:po_wf.show_req_blob/po_req:2038
PL/SQL BLOB documents do not support further substitution of message attribute tokens.
A PL/SQL BLOB document can contain an image or an application file stored as binary data, such as a PDF or RTF document or other types of files. You can include a PL/SQL BLOB document as an attachment to a notfication. However, this type of document cannot be displayed in the message body of a notification.
-
If you wish to generate the document identifier for a PL/SQL, PL/SQL CLOB, or PL/SQL BLOB document dynamically, you can token substitute the document identifier with other item type attributes. The item attribute names must be in uppercase and must be separated by a colon. See: To Token Substitute an Attribute.
For example:
plsql:po_wf.show_req/&ITEM_ATTR1:&ITEM_ATTR2
Note: If you are defining a message attribute of type Document, you can also include a special token in your argument string called &#NID which Oracle Workflow substitutes with the notification ID of the runtime notification.
-
You can also use an attribute of type document to reference an Oracle Application Framework region that you want to embed in a notification message. Specify the JSP call to reference the region as the default value for the attribute. See: Embedding Oracle Application Framework Regions in Messages.
An Oracle Application Framework region can only be displayed within the message body of a notification. It cannot be included as an attachment to the notification.
-
Choose OK when you are done.