Defining Collection Plan Element Alert Actions
There are four alert actions available in Oracle Quality:
- Send an electronic mail notification
- Execute an operating system script
- Launch a concurrent request
Oracle Quality alert actions are similar but distinctly different from the event alerts you can define using Oracle Alerts. They share the same underlying database tables and require some of the same setups. See: Overview of Oracle Alert and Alert Setup for Quality.
Quality alert actions require action details. Examples of action details include recipients (for electronic mail notifications), arguments, and file names (for SQL and operating system scripts).
You can customize alert action details using output variables. Output variables represent quality results values (e.g. &ITEM represents "C12345") and are dynamically defined as action rules are evaluated. Output variables can be imbedded in alert action details and can thus be used in the following contexts:
Send an electronic mail notification: You can create dynamic distribution lists by including output variables in the recipient/distribution fields (List, To, Cc, and Bcc). If you send a text message, you can include quality results values in the message text.
Execute an operating system script: You can use output variables to dynamically pass quality results values as arguments to operating system scripts. If you enter operating system script text, you can include output variables in the text.
Execute a SQL script: You can use output variables to dynamically pass quality results values as arguments to SQL scripts. If you enter SQL script text, you can include output variables in the text.
Attention: SQL script actions are limited to Updates or Inserts. To Select a SQL string, use the Assign a Value action. See: Defining Actions that Assign a Value: User-Defined Formulas.
Prerequisites
To select collection elements and action rules:
1. Navigate to the Collection Plans window.
2. Select the Collection Plan.
3. Select the Collection Element.
4. Choose the Actions button. The Quality Actions window appears.
5. In the Action Rules region, select the action rule.
To define electronic mail alerts:
1. In the Actions this Rule Invokes region, select the Send an electronic mail notification action.
3. Optionally, select an Oracle Office public mail List or a distribution List. If you select an Oracle office public mail list, you can enter the list name in any of the recipient (To, Cc, Bcc) fields. If you select a distribution list, the electronic mail IDs associated with the list are automatically displayed in the recipient fields. You cannot change these values.
4. Enter the electronic mail IDs of the "To" mail message recipients separated by spaces or commas. You can enter as many recipients as you want, up to 240 characters. You can dynamically distribute mail messages by including output variables in the recipient fields.
For example, you could define and use output variable for an Inspector ID collection plan element if Inspector IDs are equivalent to electronic mail IDs.
Note: If you are integrated with Oracle Office, all electronic mail IDs listed in the recipient (To, Cc, and Bcc) fields are validated before the alert is processed. If an invalid ID is entered in any of the recipient fields, the system returns the message to the user who invoked the alert. The user's electronic mail ID is determined from the value entered in the Email/Fax field of the Users window (from the System Administrator responsibility). If the value of the Email/Fax field is null, then the system checks to see whether the value for the Default User Mail Account option in the Oracle Alert Options window is set to Operating System Login ID or Application Username and sends the message to the appropriate user using one of these two IDs. The Electronic mail validation is disabled if you integrate with other electronic mail systems to send outgoing messages.
5. Enter the Subject, up to 240 characters, of the mail notification.
6. Optionally, enter the electronic mail IDs of the Cc, carbon copy, mail recipients.
7. Optionally, enter the electronic mail IDs of the Bcc, blind carbon copy, mail recipients.
8. Define your message source by selecting either File or Text.
File: Enter the File name including the full path name.
Text: Enter the message Text for the electronic message. You can include output variables in the text. For example, you can specify that the quality results values associated with the Item collection plan element appear in the text of an electronic mail notification.
An example of a text message containing output variables is as follows:
Please test the contents of item number &ITEM received on &TRANSACTION_DATE.
10. Choose OK to Save your work.
To define concurrent request alerts:
1. In the Actions this Rule Invokes region, select the Launch a concurrent request action.
3. Select the name of the Application that owns the concurrent program.
4. Select the concurrent Program Name.
5. Enter arguments, separated by spaces.
Arguments are dependent on the application and program name selected.
6. Select OK to save your work.
To define operating system script alerts:
1. In the Actions this Rule Invokes region, select the Execute an operating system script action.
3. Choose the source of the operating system script by selecting either File or Text. You cannot select an application or enter arguments if you choose to enter a text script.
File: You can enter the full path and file name of the operating system script source file rather than select an Application.
Text: You can enter the a text operating system script. You can include output variables in the text. For example, you can specify that the quality results values associated with the Item collection element appear in the text of an operating script.
An example of text operating system script containing output variables is as follows:
echo Please test the contents of lot number &LOT received on &TRANSACTION_DATE from supplier &SUPPLIER. The following defect was noted by receiving: &DEFECT_CODE
4. If the operating system script you want to execute is in a file located in an Application's base path bin directory, select the Application name.
Attention: If you enter an application name or arguments then choose to enter operating system script Text, values entered in these fields are erased.
5. Optionally, enter arguments, separated by spaces, to pass to the operating system script file.
You can dynamically pass arguments to your operating system script using output variables. If these output variables select character or date data, place single quotes around the output variable to correctly pass the argument.
7. Choose OK to Save your work.
To define SQL script alerts:
1. In the Actions this Rule Invokes region, select the Execute a SQL script action.
3. Choose the source of the SQL system script by selecting either File or Text. You cannot select an application or enter arguments if you choose to enter a text script.
File: You can enter the full path and file name of the SQL script source file rather than select an Application.
Text: You can enter the a text SQL script. You can include output variables in the text. For example, you can specify that the quality results values associated with the Item collection element appear in the text of an SQL script.
If your SQL script text includes output variables that select character or date data, place single quotes around your output variables so the system can correctly pass the data. If a single quote lies within your character string, the system adds a second single quote. For example, if your character string is resume', the system displays this as resume''.
An example of SQL script text containing output variables is as follows:
update my_lot
set status = 3
where lot_name = '&LOT';
Note that in conformance with SQL standard formatting conventions, a semicolon (;) or a forward slash (/) must be placed at the end of each SQL statement.
4. If the SQL system script you want to execute is in a file located in an Application's base path sql directory, select the Application name.
Attention: If you enter an application name or arguments then choose to enter SQL script Text, values entered in these fields are erased.
5. Optionally, enter arguments, separated by spaces, to pass to the SQL script file.
You can dynamically pass arguments to your SQL script using output variables. If these output variables select character or date data, place single quotes around the output variables to correctly pass the argument.
7. Choose OK to Save your work.