Defining Collection Element Alert Actions

You can assign any of these five alert actions to collection elements:

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). Further, 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.

See: Associating Output Variables with Actions.

arrow icon   To select collection elements and action rules:

  1. Navigate to the Collection Elements window.

  2. Select the Collection Element.

  3. Choose the Actions button. The Quality Actions window appears.

  4. In the Action Rules region, select the action rule.

arrow icon   To define electronic mail alert actions:

  1. In the Actions this Rule Invokes region, select the Send an electronic mail notification action.

  2. In the Action Details tab, choose the Action Details button. The Actions:Send Electronic Mail window appears.

  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.

    Note: Before using alert outputs in a distribution list, note that distribution lists can be used for many alerts, and each alert can have different outputs. An output you use in a distribution list for one alert could result in an error when used in another alert. There is no support for a distribution list to be passed as an output variable.

  4. In the To field, enter the electronic mail IDs of the 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 an output variable for an Inspector ID collection plan element if Inspector IDs are equivalent to electronic mail IDs.

  5. In the Subject field, enter the subject (up to 240 characters), of the mail notification.

  6. Optionally, in the Cc field enter the electronic mail IDs of the mail recipients to whom you want to send an electronic copy.

  7. Optionally, in the Bcc field, enter the electronic mail IDs of the mail recipients to whom you want to send a blind electronic copy (these recipients' names do not appear on the electronic mail message or on any copies of the message).

  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.

  9. Choose the Variables button to associate output variables with the action. See: Associating Output Variables with Actions.

  10. Choose OK to Save your work.

arrow icon   To define concurrent request alert actions:

  1. In the Actions this Rule Invokes region, select Execute a SQL script from the list of values (See: To define SQL script alert actions).

  2. Choose Action Details to display the Actions:SQL Script window.

  3. Select the Text radio button and enter the arguments within a SQL script. The SQL script enables you to use variables to associate the concurrent request arguments with entered quality results.

    For example, the Template Supplier Nonconformance Record Plan launches the Collection Import Manager concurrent process to import results records into the master collection plan.

  4. Choose OK to save your work.

arrow icon   To define operating system script alert actions:

  1. In the Actions this Rule Invokes region, select the Execute an operating system script action.

  2. In the Action Details region, choose the Action Details button. The Actions:Operating System Script window appears.

  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.

  6. Optionally, choose the Variables button to associate output variables with the actions. See: Associating Output Variables with Actions.

  7. Choose OK to Save your work.

arrow icon   To define SQL script alert actions:

  1. In the Actions this Rule Invokes region, select the Execute a SQL script action.

  2. In the Action Details region, choose the Action Details button. The Actions:SQL Script window appears.

  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 wip_discrete_jobs

    set attribute1 = &defect

    where organization = &org.id

    and wip_entity_id=

    (select wip_entity_id

    from wip_entities

    where wip_entity_name=&job);

    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.

  6. Optionally, choose the Variables button to associate output variables with the actions. See: Associating Output Variables with Actions.

  7. Choose OK to Save your work.

What's Next

See: SQL*Plus User's Guide and Reference, Release 3.2.