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:
- Start the New Event Action wizard in the administration
console:
- In the domain navigation pane, click the object store.
- In the object store navigation pane, right-click the
folder and click New Event Action.
- Specify a name for the event action that you want to create.
- 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.
- Specify whether the event action handler is implemented as a Java™ component.
- 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).
- 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.
- Complete the wizard.