ARCHIBUS Web Central

Data Event Workflow Rules

There are two workflow rules of type DataEvent:

LoggerDataEventListener
RoomTransactionDataEventListener

These two workflow rules are disabled by default. The Add-In Manager can enable the rules using the System Administration/ARCHIBUS System Administration/Add-In Manager/Define Workflow Rules view. To apply the changes, the Add-In Manager should re-start Web Central.

Application parameters may be used to govern logging behavior. For example, to change the list of tables for which Data Change events will be logged, the Add-In Manager changes the value for application parameter AbSystemAdministration-DataChangeEventTablesToLog using the System Administration/ARCHIBUS Administrator - Application Configuration/Configure Application Parameters view. To apply changes, the Add-In Manager clicks on the Save button.

The action:

This guarantees that the updated parameter value will be visible to any workflow rule immediately. Altering an application parameter also allows Business Process Owners to enable or disable specific Data Change event listeners without having to ask the System Integrator to restart the app server.

The Add-In Manager can then navigate to System Administration/ARCHIBUS System Administration/ARCHIBUS Administrator - User and Security/View Data Events Log to review the log of data event changes after each test.

LoggerDataEventListener

The LoggerDataEventListener workflow rule is shipped with the AbSystemAdministration application and is in the Workflow Rules table as:

AbSystemAdministration-SecurityTablesDataChangeLogger

This entry calls the example rule located in:

schema\ab-core\system-administration\common\src\main\com\archibus\app\sysadmin\event\data\LoggerDataEventListener.java

The application parameter AbSystemAdministration-DataChangeEventTablesToLog contains a list of table names for which the workflow rule should log events. The default list is: afm_users, afm_groups, afm_roles, afm_groupsforroles, and afm_roleprocs. The application parameter can contain either "%", indicating all tables, or a list of tables: "rm;bl;fl". When a user uses the Smart Client or a Web Central form to change a record in one of the listed tables, the callback workflow rule logs the single-record or bulk update in the database event log.

The LoggerDataEventListener logs all event parameters to the afm_data_event_log table.

A DataRecord change event uses the following rules for logging event parameters:

For a direct SQL event,the workflow rule has to determine if the event changed the data (versus a read event). If the SQL contains an INSERT, UPDATE, or DELETE statement, the rule logs all event parameters.

The LoggerDataEventListener logs old values if the user changed a primary key value and did not use direct SQL.

If your particular usage requires alternate features, you can modify the default listener. If you log memo fields, you should also adjust how you store the data to the logging table (afm_data_event_log), either by expanding the size of the fields holding the old and new values or logging the memo fields to different tables (as some servers have limits to the length of any single record that is stored, so you may not be able to store the old value and the new values in the same record).

RoomTransactionDataEventListener

The Workspace Transactions features of Space Management also make use of Data Change event logging. We ship class RoomTransactionService in the AbSpaceRoomInventoryBAR (Space Inventory & Performance) application. This class is used by RoomTransactionDataEventListener and by the scheduled rule ResynchRoomTransactionsTable. The associated application parameter UseWorkspaceTransactionsgoverns this feature and indicates whether or not to record a history of all space-related changes.

Use the Enable or Disable Workspace Transactions view in the Space Inventory & Performance application (Space Planning and Management/Space Inventory and Performance/Background Data/ Enable or Disable Workspace Transactions) to turn on the workspace transaction feature. Doing so enables several processes in the Level 4 – Process Owner and application Licensee roles. Doing so also enables the Room Transactions Data Change event listener.

Using Extensions for AutoCAD, the Extensions for Revit, the Smart Client grid, or a Web Central form, insert, change (Division and Department), or delete a record.

The Workspace Transactions table (rmpct) shows: