Creating an event action

To programmatically respond to an event for an object, create an event action. You use a subscription to associate the created event action with one or more events and objects.

About this task

You can create event actions to run code modules that act on objects. This action happens in response to an event for an object.

Procedure

To create an event action:

  1. Start the New Event Action wizard in the administration console:
    1. In the domain navigation pane, click the object store.
    2. In the object store navigation pane, right-click the Events, Actions, Processes > Event Actions folder and click New Event Action.
  2. Specify a name for the event action that you want to create.
  3. Select a class that is associated with the action.
    You can select either the parent class or a subclass that you created for the event action.
  4. Specify whether the event action handler is implemented as a Java™ component.
    1. If you selected JavaScript, click Next to enter the event action script. You can open and modify a script or add code to the default code stubs. A event action handler that is implemented as JavaScript can fail in some WebLogic configurations. To resolve the problem, see JavaScript action handler fails (WebLogic application server).
    2. If you selected Class, enter the name of the primary Java class for the event action handler. If the Java class is contained in a package, qualify the Java class name with the package it is contained in.

      To configure the code module that contains the event action handler, select Configure Code Module before you click Next. If you do not select this option, the required Java class or JAR file must be on the local Content Platform Engine application server and must be in the application server class path.

  5. Complete the wizard.