Work with event handlers
IBM InfoSphere Enterprise Records provides the following sample events for Base, DoD, and PRO data models. You can customize the samples as needed. See the Readme file in the Events folder in the software package.
Events |
Description |
RMAutoDeclare |
This sample event lets you configure auto-declaration of records to ensure that when a specific operation (create, check in, or file in a folder) is performed on a document in a Records Object Store (ROS), a corresponding record is created automatically in the specified File Plan Object Store (FPOS). You can also choose to have every document that belongs to a specific document class be declared as a record when the document is created or checked in.
The sample event supports unclassified declaration only. Configure this event handler as an asynchronous event because of the Content Engine Event limitation that asynchronous events be used if the event handler modifies the source object. |
RMAutoSynchronizeProperties |
Synchronizes the properties of records and their associated documents. For example, when a user updates a property value of a record, IBM InfoSphere Enterprise Records updates the corresponding property value in the associated documents as well.
This sample event works for properties that use the same symbolic name. You can synchronize from document to record or from record to document, but not both. If you synchronize from record to document, then the document is updated when the record's corresponding property is updated.
This event also synchronizes property aliases across object stores either from record to document or from document to record, but not both. For example, when you sync up from Document to Record, if you assign the ID of Record property B to the alias ID field of Document property A, then B will be updated to the same value of A.
This event must be configured to use synchronous events. |
RMUpdateDateDeclared |
This sample event, together with RMLastRetrievalOfRecord, is typically used to determine when to dispose of the container, or to ensure that the container where records have been recently declared or retrieved will not be disposed of by a disposition schedule.
It is applied to the Volume and Box classes and sets the Date Last Declaration on the parent folder when a record is declared.
For the PRO data model, the RMUpdateDateDeclared event is already subscribed to and you only need to enable it. For the other data models, you must run the import script to create the RMUpdateDateDeclared event and subscribe to the Volume or Box class.
|
RMLastRetrievalOfRecord |
This sample event, together with RMUpdateDateDeclared, is typically used to determine when to dispose of the container, or to ensure that the container where records have been recently declared or retrieved will not be disposed of by a disposition schedule.
For electronic records that have an associated document in the ROS, it sets the date of the last review of a record’s content to its folder’s LastRetrievalofRecord property. |
RMSecurityPropagation |
(PRO Only) This sample event is for the PRO data model only. It sets the marking value of the Security Category property of the record, volume, and record folder (but not record category) based on the highest level of an associated entity.
The setting in System Configuration for the PRO FPOS controls how security is propagated -- from folder to record, from record to folder, both, or no propagation allowed.
If propagating from record to folder, the security parent folder's security will be updated if the record's security is higher than its security parent folder. Other folders in which the record is filed are not affected.
If propagating from folder to record, security of records at a lower level will be updated to the highest security level of their parent folders.
If propagation is set to go both directions (folder to record and record to folder), then downgrading an entity results in its security reverting to the previous higher level. For example, assume that propagation is set to go both directions. If the record folder and volume are set to Secret and you downgrade a record in the container to Confidential, it will revert back to Secret. Similarly, if you downgrade the record folder or volume to Confidential, it will revert back to Secret. |
RMSendEmailOnSupercede |
This sample event causes an email to be sent each time a record is superseded by a new version. The email message contains the details about the superseding record’s description, date, and time it was superseded. The email is sent when the container has a disposition schedule that defines a trigger based on the supersede event.
This event is not supported in JBoss or WebLogic. |
IBM InfoSphere Enterprise Records sample event handler jar files are stored as code modules in the target object store. The advantage is that you can add or update the event handler by checking in a new version without restarting the application server. Configuring IBM InfoSphere Enterprise Records sample events is as follows:
- Run import scripts from Enterprise Manager (EM) to create event actions.
- For RMAutoDeclare and RMSendEmailOnSupercede events, edit the configuration files in the target object store.
- Subscribe an event action to a target class from EM.
For information on customizing events, see the P8 software package.
Create event actions
Before starting this procedure, make sure the folder named CodeModules exists under the root folder of the object store where you are about to create event actions. If such a folder does not exist, follow the instructions in the FileNet P8 Platform Installation and Upgrade Guide to create the folder.
- Copy the folder under the CD root, ~CDRoot\RecordsManager.<platform>\Events, to the server where you run EM. This folder contains the import scripts, .jar files, and configuration files.
- Run the appropriate import scripts to create event actions you want to use.
- Right-click on the target IBM InfoSphere Enterprise Records object store.
- Select Import All.
- On the Import Helper dialog, Import Options tab, Import Manifest File field, browse to the folder you copied and select the import script for the desired event. Each file is named after the event. For example, the import file for the RMAutoDeclare event is named RMAutoDeclareImport.xml.
- On the External Content Path field, browse to the ~\Events\lib folder.
- Click Import.
After the import is completed, you should see an "Import Success" message. The event action should be created under the object store's Event Action folder, and the code modules will be created in the Code Module folder.
Customize configuration files
RMAutoDeclare and RMSendEmailOnSupercede events have their own configuration files. The import script creates the files in the object store:
- The RMAutoDeclare configuration file is RMAutoDeclare.properties under Root Folder\RM Samples folder.
- The RMSendEmailOnSupercede configuration file is RMSendEmailOnSupercede.properties under the same Root Folder\RM Samples folder.
Check out the configuration file either from Workplace or EM. After editing, check it in. See Edit the Auto Declare configuration file. For the RMSendEmailOnSupercede file, the comments preceding the line you modify are self-explanatory (SMTP host, port number, sender and receiver email addresses).
Create subscriptions
Each event requires subscriptions to one or more classes.
Subscription to the RMAutoDeclare event
To subscribe to the Document class or subclass
- In EM, navigate to the Object Stores/<ROS>/Document class or subclass where you want to create the subscription.
- Right-click the class and select Add Subscription.
- Specify a unique name and a description for the subscription.
- Select the Applies to all instances radio button.
- On the Specify Triggers screen, select the Check In event trigger.
- On the Specify Event Action screen, select the event action you have imported.
- On the Specify Additional Properties screen, don't check the Synchronous check box, as recommended, and check or uncheck the Include Subclasses check box as appropriate for each event and complete the Wizard.
To subscribe to the Folder class or subclass
- In EM, navigate to Object Stores/<ROS>/Folder class or subclass where you want to create the subscription.
- Right-click the class and select Add Subscription.
- Specify a unique name and a description for the subscription.
- Select the Applies to all instances radio button.
- On the Specify Triggers screen, select the File event trigger.
- Don't check the Synchronous check box, as recommended, and check or uncheck the Include Subclasses checkbox as appropriate, and complete the Wizard.
To subscribe to a specific folder in the ROS:
- In EM, navigate to the folder where you want to create the subscription.
- Right-click the folder and select New Subscription.
- Specify a unique name and a description for the subscription.
- Accept the default.
- Select the File event trigger.
- On the Specify Event Action screen, select the RMAutoDeclare event.
- On the Specify Additional Properties screen, don't check the Synchronous check box, as recommended, and accept the rest of the default settings and complete the Wizard.
Subscription to the RMAutoSynchronizeProperties event
Subscribing to the RMAutoSynchronizeProperties event synchronizes the properties from the source document to its record, or from the record to its source document.
CAUTION Do not attempt to synchronize in both directions. This event must be configured to use synchronous events.
To synchronize from the source document to its record:
- In EM, navigate to Object Stores/<ROS>/Document class or subclass.
- Right-click and select Add Subscription.
- Specify a unique name and a description for the subscription.
- Select the Applies to all instances radio button.
- On the Specify Triggers screen, select the Update event trigger.
- Select the event action you have imported.
- On the Specify Additional Properties screen, select the Synchronous checkbox, but leave the Include Subclasses checkbox unchecked and complete the Wizard.
To synchronize from the record to its source document
- In EM, navigate to Object Stores/<FPOS>/Document class or subclass.
- Right-click and select Add Subscription.
- Specify a unique name and a description for the subscription.
- Select the Applies to all instances radio button.
- On the Specify Triggers screen, select the Update event trigger.
- Select the event action you have imported.
- On the Specify Additional Properties screen, check the Synchronous checkbox, but leave the Include Subclasses checkbox unchecked and complete the Wizard.
Subscription to the RMLastRetrievalOfRecord event
To subscribe to the RMLastRetrievalOfRecord event:
- In EM, navigate to Object Stores/<FPOS>/Other Classes/CustomObject/RM System class.
- Right-click and select Add Subscription.
- Specify a unique name and a description for the subscription.
- Select the Applies to all instances radio button.
- In the Specify Triggers screen, select the Creation event trigger.
- Select the event action you have imported.
- In the Specify Additional Properties screen, leave the Include Subclasses checkbox unselected, select the Synchronous checkbox, and complete the Wizard.
Subscription to the RMSecurityPropagation event (For PRO only)
You can create a subscription to this event for the Record Folder class, the Volume class, or the Record class.
To subscribe to the event for the Record Folder class
- In EM, navigate to Object Stores/<PRO-FPOS>/Other Classes/Folder/RM Folder/Record Folder class.
- Right-click and select Add Subscription.
- Specify a unique name and a description for the subscription.
- Select the Applies to all instances radio button.
- On the Specify Triggers screen, select the File and Update event triggers.
- Select the event action you have imported.
- On the Specify Additional Properties screen, leave the Include Subclasses checkbox unselected, and complete the Wizard.
To subscribe to the event for the Volume class:
- In EM, navigate to Object Stores/< PRO FPOS>/Other Classes/Folder/RM Folder/Volume class.
- Right-click and select Add Subscription.
- Specify a unique name and a description for the subscription.
- Select the Applies to all instances radio button.
- In the Specify Triggers screen, select the File and Update event triggers.
- Select the event action you have imported.
- On the Specify Additional Properties screen, leave the Include Subclasses checkbox unselected, and complete the Wizard.
To subscribe to the event for the Record class:
- In EM, navigate to Object Stores/<PRO-FPOS>/Document Class/Record class.
- Right-click and select Add Subscription.
- Specify a unique name and a description for the subscription.
- Select the Applies to all instances radio button.
- On the Specify Triggers screen, select the Update event trigger.
- Select the event action you have imported.
- On the Specify Additional Properties screen, select the Include Subclasses checkbox, and complete the Wizard.
Subscription to the RMSendEmailOnSupercede event
To subscribe to the RMSendEmailOnSupercede event
- In EM, navigate to Object Stores/<FPOS>/Document Class/Record class.
- Right-click and select Add Subscription.
- Specify a unique name and a description for the subscription.
- Select the Applies to all instances radio button.
- On the Specify Triggers screen, select the Update and Checkin event trigger.
- Select the event action you have imported.
- On the Specify Additional Properties screen, select the Include Subclasses checkbox, and complete the Wizard.
Subscription to the RMUpdateDateDeclared event
For the PRO data model, you need to enable the already existing event, as follows:
- In EM, navigate to the Object Stores/<FPOS>/Events/Event Action folder.
- Right-click UpdateDateDeclared.
- Click Enable.
For the DoD and Base data models, subscribe to the Record Category, Volume, and Box classes after you create the event.
Subscribe to the event for the Record Category class
- In EM, navigate to Object Stores/<FPOS>/Other Classes/Folder/RM Folder/Record Category
- Right-click and select Add Subscription.
- Specify a unique name and a description for the subscription.
- Select the Applies to all instances radio button.
- On the Specify Triggers screen, select the File event trigger.
- Select the event action you have imported.
- In the Specify Additional Properties screen, leave the Include Subclasses checkbox unselected, and complete the Wizard.
To subscribe to the event for the Volume class
- In EM, navigate to Object Stores/<FPOS>/Other Classes/Folder/RM Folder/Volume
- Right-click and select Add Subscription.
- Specify a unique name and a description for the subscription.
- Select the Applies to all instances radio button.
- On the Specify Triggers screen, select the File event trigger.
- Select the event action you have imported.
- On the Specify Additional Properties screen, leave the Include Subclasses checkbox unselected, and complete the Wizard.
To subscribe to the event for the Box class
- In EM, navigate to Object Stores/<FPOS>/Other Classes/Folder/RM Folder/Physical Container/Box
- Right-click and select Add Subscription.
- Specify a unique name and a description for the subscription.
- Select the Applies to all instances radio button.
- On the Specify Triggers screen, select the File event trigger.
- Select the event action you have imported.
- On the Specify Additional Properties screen, leave the Include Subclasses checkbox unselected, and complete the Wizard.