Determining if an object is governed

To determine if an object in WSRR is part of a governance lifecycle the ServiceRegistryGovernance EJB method getGovernanceRecord() can be used.

This will return the GovernanceRecord SDO associated with the object or null if the object is not currently part of a governance lifecycle.

To further determine if the object is the root object of a governed collection or if it is governed as a result of being related to some other root object, the entityBsrURI property of the GovernanceRecord SDO can be examined and compared to the bsrURI of the object in question. The entityBsrURI in the GovernanceRecord always refers to the root object of the associated governed collection.

To determine if the governance lifecycle is applied to a collection of objects or to just a single object, the governedObjects property of the GovernanceRecord SDO can be examined. This will list all the objects in the collection (including the root object) or just the single root object if that is all that is governed.