VPA Use Case: Unpacking Dependencies
Service Contracts
VPA Groups Use Case: Bridge Tables (Service Contracts example) shows how to work service contracts using bridge tables. However, scenarios for service contracts may be more complex. In particular, you may wish to manage lists of craftspersons by work team and vendor and to limit access to records by vendors after the contract with that vendor has expired.
In this scenario, the goal is to limit a craftsperson's access to equipment and work requests based on the following SLAs.
- An account manager sets up the Service Contract as well as the SLA Request Parameters, which map Equipment and Activity Type to SLA Responses.
- The account manager sets up the SLA Response Parameters, which provide Service Contract (
servcont
), Vendor (vn
), and Work Team (cf_workteam
) information (as well as the Service Desk Manager, Dispatcher, and Supervisor).
Presume that:
- Craftspersons (
cf)
are associated with Work Teams (cf_workteam
), which in this example are in turn associated with a Vendor. Note that in the actual Archibus schema, theservcont.servcont_vendor
is not linked tovn.vendor_id
; and Work Teams do not have avn.vendor_id
.
Unpacking Service Contracts
Suppose that nightly, a scheduled rule unpacks the service contract dependencies.
The rule deletes the contents of the VPA Equipment Mappings (vpa_eq)
table. This removes permissions from SLAs that have expired.
The rule uses a datasource that joins Equipment, SLA Request Parameters, SLA Response Parameters, and Service Contracts.
- For each row, the rule verifies that the Date Service Contract Expires has not passed. This step removes permissions for expired contracts, even if the account manager did not adjust the SLA.
- For each row, the rule then finds all Work Teams and Craftspersons for the Vendor in the SLA Response Parameter. The datasource joins the Archibus Users table.
- For each Work Team associated with the Vendor:
- Create a VPA Equipment Mappings (
vpa_eq
) table entry with the Equipment Code and the craftsperson's User Name.
- Create a VPA Equipment Mappings (
- For each Work Team associated with the Vendor:
VPA Equipment Mappings (vpa_eq) table
This table holds the mappings the scheduled rule creates when unpacking the dependencies. In theory, this table duplicates data that\ can be derived from the table join used in the scheduled rule. However, "unpacking" this information into a mapping table speeds the query, simplifies the VPA restrictions, and reduces the risk of errors in the VPA by reducing the complexity of the VPA and configuration.
VPA Group | Equipment Code | User Name |
---|---|---|
SERVCONT | 107833 | carl_casteo@finers_biomedical.com |
SERVCONT | 107833 | erika_alina@finers_biomedical.com |
SERVCONT | 107833 | allen_krantz@nova_helium.com |
SERVCONT | 20145 | george_green@titan_facilities.com |
VPA Restrictions (vpa_rest) table
You can establish VPA Restrictions like the following.
Applies to Table | Type | Role Name | Subquery |
---|---|---|---|
eq | VPA Group | VPA ALL OTHER ROLES | <none> |
This VPA Restriction gives access to only roles or users that are member of the SERVCONT group. The VPA restriction restricts the Equipment (eq
) table and all tables that validate on the eq
table, such as the Work Requests (wr
) table.