EVENT_TEXT is a 4000 character field used to provide a completion clause for a workflow action. A completion clause is required in order to close the workflow loop. An SQL select statement can be entered here such that if the value in the select statement is returned, the workflow action is complete. If no value is returned, then the workflow action item remains incomplete. Note that the value is arbitrary BUT must be only one single value (or column).

The exceptions to this are found in the example of an email being sent. In this case, no completion clause is provided, yet the workflow action is marked with a status of 'Completed' or in the case of just wanting to launch a form or report.

SQL statements can be difficult to write therefore we recommend that a person with SQL knowledge along with familiarity of the various tables within the database be responsible for writing these statements.

When entering a 'Completion Clause' on IMWA, if the SQL script is invalid or has error the following message will be shown:

"Event Text Error = ORA-00942: table or view does not exist
ORA-06512: at P2k.P2k_SMREFCUR", line 8"
If you then press OK to this message, the record is saved. If this message should appear take the SQL script you are entering in IMWA and execute it in SQLPlus to see if there are any errors. Once you have a clean SQL script, put this into the IMWA and then you will not receive the error messages previously noted.

To use a completion clause you only have one piece of information from the workflow log available to use and it MUST be used in the clause. That piece of information is the ID for the record that triggered the log to be written. For example, a completion clause for WF_RAP would need to use ":RAP_ID" in the completion clause.

SELECT 1 FROM P2K_RE_APPLICATIONS WHERE ID = :RAP_ID AND APPLICATION_STATUS = '80'

Due to changes in the Oracle9i Database, you can no longer specify "*" as the value in the select as in SELECT * FROM …. The value selected is arbitrary and not used for anything so it can be a column or a constant value BUT can only be a single value. For example:

SELECT 1 FROM …
will work in every completion clause.


Notes #

Click to create a new notes page