Setting Up Archibus Cascading Update and Delete

The following sections address various methods for controlling cascading updates and deletes .

Implementations running Oracle or Microsoft SQL database servers use the Archibus cascading update and delete feature.

Controlling Cascading Updates and Deletes for the Project

Enable and disable the entire Cascade feature

You can enable and disable the entire cascading update and deletion feature by setting the Use Archibus Features for Cascade? field of the Archibus Schema Preferences table (the afm_scmpref.afm_cascades_changes field). This effects all fields, regardless of the field-level setting described below.

Control if cascading applies to deletions, updates, or both

You can control whether the system cascades updates, deletes, neither, or both by editing /confing/context/core/core-optional.xml and setting cascadeDeleteEnabled and cascadeUpdateEnabled .

<property name="cascadeDeleteEnabled" value="yes"/> <!-- Used to activate/deactivate cascade update only. Supported values (yes,no) --> <property name="cascadeUpdateEnabled" value="yes"/>

There are four possible configurations:

cascadeDeleteEnabled cascadeUpdateEnabled Result

yes

yes

Both delete/update are enabled.

no

yes

Only cascade update works. Delete works, but you receive an error if there are children dependencies.

Example: If you add a new building (with no floors or rooms) you can delete it.

yes

no

Only cascade delete works. Update works, but you receive an error if there are children dependencies.

Example: If you add a new building (with no floors or rooms) you can update the bl_id.

no

no

Both update/delete are prohibited. An ordinary update/delete will work, but will never cascade.

You may notice that a room can be deleted but cannot be updated when both CasacadeUpdateEnabled and CasacadeDeleteEnabled are set to No. Since creating a room automatically creates a rmpct record, you must disable the RoomTransactionDataEventListener in order to update or delete a newly-created room.

In order to update a record that has no dependency when CasacadeUpdateEnabled is set to No:

  1. Disable the listener by updating afm_activity_params set param_value=0 where param_id in ('useworkspacetransactions','CaptureSpaceHistory')

  2. Restart webcentral.

Field-Level Security to Manage Cascading Updates

Because cascading updates are powerful events that can change thousands of records, this capability should be managed carefully.

Use field level security (the Review and Edit groups in afm_flds) to control the users who can make edits to the following tables that have primary keys that link to other tables.

  • Buildings

  • Accounts

  • Employees

  • Divisions

  • Departments

  • Floors

  • Rooms

  • Equipment

For more information, see Introducing Archibus Application Security.

Disabling Archibus Cascade for SQL Views

Archibus cascading updates obey the "Is SQL View" schema preference. Once you have enabled Archibus cascade for a project with the afm_scmpref.afm_cascades_changes field, the afm_tbls.is_sql_view field determines whether the Archibus cascade is used for a specific table. By default, the field is set to 0, meaning that the Archibus cascade is invoked.

If a table is an SQL view, to disable the Archibus cascade for the table, set the afm_tbls.is_sql_view field for the table to "1".

See Also