Creating Alert Actions

After you define your alert you need to create the actions you want your alert to perform. There are four types of actions you can create:

arrow icon   To create an action for an alert:

  1. Display the alert that you want to create an action for in the Alerts form.

  2. Choose Actions to display the Actions window.

  3. Enter a name (up to 80 characters) and description (up to 240 characters) for your alert action. See: Oracle Alert Naming Conventions.

  4. Select a level for your action: Detail, Summary, or No Exception.

    During an alert check, a detail action performs once for each individual exception found, a summary action performs once for all exceptions found, and a no exception action performs when no exceptions are found.

  5. Choose Action Details to display the Action Details window.

  6. Select the type of action you want to create in the Action Type field: Message, Concurrent Program, Operating System Script, or SQL Script.

    Depending upon the action level and type you choose, different fields appear in the Action Details window.

arrow icon   To define message actions:

  1. Choose Message in the Action Type field of the Action Details window if you want the alert to send a message as its action.

  2. Specify the electronic mail IDs of the recipients you want to send your message to in the To field. You can also enter the IDs of recipients to whom you want to send "carbon" (Cc) and "blind" (Bcc) copies of your alert message. If you list more than one recipient in any of these recipient fields, separate each recipient by a space, or a comma, or a combination of the two. You can enter as many recipients as you want, up to 240 characters.

  3. You can also enter in the List field, a distribution list that you define in the Distribution Lists window. See: Defining a Distribution List.

    If you enter a distribution list name, Oracle Alert displays all electronic mail IDs on the list in the To field, and does not let you change any values in the To, Cc, Bcc, Print For, or Printer fields.

  4. In the Reply To field, you can optionally specify the address that should receive the reply to the alert message. This address must be either the reply-to address for the Workflow Notification Mailer, the e-mail address for a human in charge of response processing, or the address for a custom processing agent external to the notification mailer. If you leave this field blank, the Workflow Notification Mailer uses the value of its own Reply-to Address configuration parameter instead.

  5. You can also have Oracle Alert print your message to the printer you specify in the Printer field. Enter in the Print For User field, the names, or alert outputs or response variables that represent the names of the recipients for whom you want to print a copy of the message. Separate the names by commas and do not use blank spaces within a name.

    Oracle Alert prints the message preceded by a banner page with the name as it appears in the Print For User field. You can enter as many names as you want, up to 240 characters.

  6. In the Subject field, enter a brief statement that describes the message's subject matter. You can enter up to 240 characters.

  7. You can also enter alert outputs or response variables in any of the alert detail fields. Oracle Alert automatically substitutes the associated output value when checking the alert or the associated response variable value when reading the response. By entering an output or response variable rather than a mail ID in a recipient field, you can make use of dynamic distribution. See: Defining a Response Processing Alert.

    For example, if you define an alert that reminds users to change expired passwords, you can define an alert output called &USER to hold the user's electronic mail ID. Enter &USER in the To: field to have Oracle Alert send a message to each user whose password has expired.

  8. For a detail message action, you can either send the contents of a file as the message, or write the text of your message in Oracle Alert. If you want to write your message in Oracle Alert, choose the Text option and enter the text in the Text field. (You can also click on the Import button and import the contents of a file into the Text field.) You can include any outputs in the message text.

    If you want to send the contents of a file, choose the File option and enter the file name (including the full path), or the output from the alert Select statement that represents the file name and location, in the File field. You may use any outputs to construct the file name.

    Note: If this message action has a response set associated with it, you must define the text of the message within Oracle Alert.

  9. For detail message actions, Oracle Alert distributes one message for each exception found during an alert check. Place outputs wherever you need to in the message text, to format your message as you like. When Oracle Alert sends the message it substitutes the output variables with the exception values found during the alert check.

  10. If this action is a response action, identify your response variables with an ampersand before the name, for example, &VARIABLE_NAME. Oracle Alert reads the value for a response variable from the response message. If the response message does not include the response variable, Oracle Alert uses the default value from your response variable definition.

  11. For a no exception message action, Oracle Alert distributes a message when no exceptions are found for an alert check. Do not use outputs to define your no exception message and recipients.

    Note: If you decide to change the Action Level of your action after entering message text in the Text field, you must delete the message text yourself. Oracle Alert does not automatically delete the text for you.

    Attention: For detail or no exception message actions, the message text that you specify for an event alert must be less than 32000 characters. This includes a limitation for the number of operating units that can be defined in the Installation tab. The message file that you specify must be less than 32K.

    For information about defining operating units in the Installation tab, see Specifying Alert Details.

  12. For summary message actions, complete your action details by following the instructions listed in the next section.

  13. Save your changes.

  14. When you are done defining actions, close the Actions and Action Details window and choose Action Sets to define the action set(s) for your alert definition. See: Creating an Action Set for an Alert.

arrow icon   To complete the action details for a summary message:

  1. Choose the Text option. A Summary Message Template appears in the text field.

  2. You can place outputs anywhere in the three parts of the summary message body: above the summary template in the opening text, within the Summary Message Template, and after the summary template in the closing text.

  3. Enter the opening text of your summary message at the top of the window above the summary template. Use this area to enter any introductory text that you want to precede the columns in your message and to lay out your column headings.

    Suggestion: You can use any output values in the opening text of your summary message. Use outputs like current date (if you want to display the date that the exception was found) in the introductory text of the message to avoid repeating the date as a separate column in the summary.

  4. Leave the summary template lines exactly as you find them. Move the cursor between the two template lines and enter your outputs in this space, lined up below your column headings. Do not use spaces 1 and 2 within the summary template lines, as specified by the two asterisks (**); Oracle Alert reserves these to mark duplicate exceptions. You have up to 178 spaces across in which to lay out your outputs, and you can vary this value by specifying a number of characters in theMax Width field. (Oracle Alert defaults to the value of the Maximum Summary Message Width option defined in the Oracle Alert Options form.)

    The number of characters your message displays for each output depends on the number of characters you allot for each output in the Max Length field in the Outputs tabbed region of the Alert Details window. The ampersand (&) of the output defines the left margin of an output's column area. Oracle Alert defines the right margin of an output's column area as two spaces to the left of the next column. Oracle Alert left-justifies any character or date outputs within that output's column area. For number outputs, Oracle Alert right-justifies the data within the column area. If the output in the rightmost column is defined as a number, Oracle Alert right-justifies the data in a column 15 characters wide. If the numeric data is wider than the column width allotted, Oracle Alert displays '###' in the message. See: Formatting Summary Message Actions.

  5. If you want to use multiple lines per exception, position your outputs on as many lines as you need, in the positions you want. If you want a blank line between each set of exceptions, leave a blank line between your outputs and the lower summary template line.

  6. Enter the closing text below the summary message template. You can use any outputs in your closing text.

    If you define a Message Action Header and/or a Message Action Footer in the Oracle Alert Options form, this generic text attaches to the top (before any message-specific text begins) and bottom (after any message-specific text ends) of your message text, respectively. If you define a header and footer, Oracle Alert adds it to every message constructed, including messages for which Oracle Alert is expecting a response. See: Defining Boilerplate Message Text.

  7. Choose Wrap or Truncate in the Column Overflow field to indicate whether Oracle Alert should wrap column values that exceed the space allotted to them or truncate them. If you choose Wrap, Oracle Alert uses as many lines as necessary to display the output value. If you choose Truncate, Oracle Alert truncates a column at the start of the next column, or at the page width (right margin), if it is the last column. See: Formatting Summary Message Actions.

  8. Enter the width of your message in the Max Width field. The default value is defined by the Maximum Summary Message Width option listed in the Other Options tabbed region of the Oracle Alert Options form. You cannot define a message wider than this maximum, but you can define a narrower message. Oracle Alert uses this value to determine the location of the right margin in the summary message.

  9. Oracle Alert distributes one summary message for each unique combination of critical output values found during an alert check. Outputs that you place outside the Summary Message Template are considered critical outputs. Within the message, Oracle Alert summarizes all the exceptions found during an alert check for those outputs located within the Summary Message Template.

  10. If this action is a response action, identify your response variables with an ampersand before the name, for example, &VARIABLE_NAME. Oracle Alert reads the value for a response variable from the response message. If the response message does not include the response variable, Oracle Alert uses the default value from your response variable definition.

    Note: If you decide to change the Action Level of your action after entering message text in the Text field, you must delete the message text yourself. Oracle Alert does not automatically delete the text for you.

    Attention: For a summary message actions, the message text that you enter for an event alert must be less than 32000 characters. This includes a limitation for the number of operating units that can be defined in the Installation tab. The message file that you specify must be less than 32K.

    For information about defining operating units in the Installation tab, see Specifying Alert Details.

  11. Save your changes.

  12. When you are done defining actions, close the Actions and Action Details window and navigate to the Action Sets window to define action sets for your alert definition. See: Creating an Action Set for an Alert.

arrow icon   To define concurrent program actions:

  1. Choose Concurrent Program in the Action Type field of the Action Details window.

  2. Enter the name of the application that owns the concurrent program you want to define as an action.

  3. Enter the name of the concurrent program.

  4. Enter any arguments for the concurrent program in the Arguments field, each separated by a space.

    You can use output variables from the alert SQL statement or response variables to dynamically pass arguments to your concurrent program. If your concurrent program action uses arguments that select character or date data, place double quotes around your argument so that Oracle Alert can correctly pass the data.

  5. If this action is a response action, identify your response variables with an ampersand before the name, for example, &VARIABLE_NAME. Oracle Alert reads the value for a response variable from the message response and reads the value of an alert output from the original alert message, then substitutes the value when sending the message. If the response message does not include the response variable, Oracle Alert uses the default value from your response variable definition.

  6. For detail concurrent program actions, Oracle Alert submits the concurrent program request once for each exception found during an alert check.

  7. For summary concurrent program actions, Oracle Alert submits the concurrent program request once for each unique combination of critical output values. Outputs used as arguments are considered critical outputs.

  8. For no exception concurrent program actions, Oracle Alert submits the concurrent program request if it finds no exceptions during an alert check. Do not use outputs when defining your no exception concurrent program actions.

  9. Save your changes.

  10. When you are done defining actions, close the Actions and Action Details window and navigate to the Action Sets window to define action sets for your alert definition. See: Creating an Action Set for an Alert.

arrow icon   To define operating system script actions:

  1. Choose Operating System Script in the Action Type field of the Action Details window.

  2. If the operating system script you want to execute is in a file located in an Application's base path bin directory, specify that Application name in the Application field.

  3. Enter any arguments you want to pass to the operating script in the Arguments field, each separated by a space.

    You can use output variables from the alert SQL statement or response variables to dynamically pass arguments to your operating system script. If your operating system script action uses arguments that select character or date data, place single quotes around your argument so that Oracle Alert can correctly pass the data.

  4. Choose File if the operating system script resides in a file.

  5. If the operating system script is in a file, and you do not specify a value in the Application field, as specified above, then enter the full path of the operating system script, or the output from the alert SQL statement that represents the file name and location in the File field.

    Note: Oracle Alert cannot substitute values into output variables located in an operating system script file.

    Note: The operating script file must be less than 32K.

  6. If you want to enter the script in Oracle Alert, check Text and type the script in the Text field. (You can also click on the Import button and import the contents of a file into the Text field.) For an event alert, the script must be less than 32000 characters. This includes a limitation for the number of operating units that can be defined in the Installation tab. For information about defining operating units in the Installation tab, see Specifying Alert Details.

    Identify your alert outputs with an ampersand before the name, for example, &OUTPUT_NAME.

  7. If this action is a response action, identify your response variables with an ampersand before the name, for example, &VARIABLE_NAME. Oracle Alert reads the value for a response variable from the message response and reads the value of an alert output from the original alert message, then substitutes the value when sending the message. If the response message does not include the response variable, Oracle Alert uses the default value from your response variable definition.

  8. For detail operating system script actions, Oracle Alert performs the operating system script once for each exception found during an alert check.

  9. For summary operating script actions, Oracle Alert performs the operating system script once for each unique combination of critical output values returned by the alert Select statement. If the operating system script is found in a file, the outputs used as the file name and arguments are considered critical outputs. If the operating system script is found in the Text field, all outputs in the operating system script are considered critical outputs.

  10. For no exception operating system script actions, Oracle Alert performs the operating system script if it finds no exceptions during an alert check. Do not use outputs when defining your no exception operating system script actions.

    Attention: When performing an operating system action, Oracle Alert executes the commands with the privileges of the operating system user that started the Concurrent Manager.

  11. Save your changes.

  12. When you are done defining actions, close the Actions and Action Details window and navigate to the Action Sets window to define action sets for your alert definition. See: Creating an Action Set for an Alert.

arrow icon   To define SQL statement script actions:

  1. Choose SQL Statement Script in the Action Type field of the Action Details window.

  2. If the SQL statement script you want to execute is in a file located in an Application's base path sql directory, specify that Application name in the Application field.

  3. Enter any arguments you want to pass to the SQL statement script in the Arguments field, each separated by a space.

    You can use output variables from the alert SQL statement or response variables to dynamically pass arguments to your SQL statement script.

  4. Choose File if the SQL statement script resides in a file.

  5. If the SQL statement script is in a file, and you do not specify a value in the Application field, as indicated in above, then enter the full path of the SQL statement script, or the output from the alert SQL statement that represents the file name and location in the File field.

    Note: You can use PL/SQL for your SQL statement script action.

    Attention: The SQL script file must be less than 32K.

  6. If you want to enter the script in Oracle Alert, check Text and type the SQL script in the Text field. (You can also click on the Import button and import the contents of a file into the Text field.)

    Identify your alert outputs with an ampersand before the name, for example, &OUTPUT_NAME. If your SQL statement script action uses outputs that select character or date data, place single quotes around your output so that Oracle Alert can correctly pass the data. If a single quote lies within your character string, Oracle Alert adds a second single quote. For example, if your character string is resume', Oracle Alert displays this data as resume''. Follow SQL format conventions in the text of your SQL statement action, and place a semicolon (;) or a forward slash (/) at the end of each SQL statement.

    Attention: The SQL script you enter for an event alert must have less than 32000 character. This includes a limitation for the number of operating units that can be defined in the Installation tab. For information about defining operating units in the Installation tab, see Specifying Alert Details.

  7. If this action is a response action, identify your response variables with an ampersand before the name, for example, &VARIABLE_NAME. Oracle Alert reads the value for a response variable from the message response and reads the value of an alert output from the original alert message, then substitutes the value when sending the message. If the response message does not include the response variable, Oracle Alert uses the default value from your response variable definition.

  8. For detail SQL statement script actions, Oracle Alert performs the SQL statement script once for each exception found during an alert check.

  9. For summary SQL statement script actions, Oracle Alert performs the SQL statement script once for each unique combination of critical output values returned by the alert Select statement. If the SQL statement script is found in a file, the outputs used as the file name and arguments are considered critical outputs. If the SQL statement script is found in the Text field, all outputs used in the SQL statement are considered critical outputs. See: Formatting Summary Message Actions.

  10. For no exception SQL statement script actions, Oracle Alert performs the SQL statement script if it finds no exceptions during an alert check. Do not use outputs when defining your no exception SQL statement script actions.

  11. Save your changes.

  12. When you are done defining actions, close the Actions and Action Details window and navigate to the Action Sets window to define action sets for your alert definition. See: Creating an Action Set for an Alert.

arrow icon   To delete an action:

  1. Select the action you wish to delete in the Actions window of the Alerts form.

  2. Choose from the Edit menu, Delete Record.

    You can delete an action if there is no history for the action and the action is not an enabled member of an action set, response set, or action group (such as an escalation or threshold group).

  3. If the action is an enabled member of an action group, action set, or response set, an error message followed by a References window appears.

    You can also choose References from the Tools menu in the Actions window at any time to display the References window.

  4. The References window shows you where the action is referenced. Choose the Action Groups, Action Sets, or Response Sets tab to display the list of action groups, action sets, or response sets that reference this action.

    You must navigate to the appropriate window and disable or remove the action from those action groups, action sets, or response sets that reference the action before you can delete the action.

  5. Once you delete your action, save your changes.

Related Topics