AssetRelation Object
Description
Represents a directed relation between two assets.
Remarks

This object represents a directed "uses-used by" relation between the object that owns the relation and another entity used by the relation owner. The relation can be between objects of the same or of different types.

A relation is created by the AssetRelationFactory Object of any object that implements ISupportAssetRelations: BPModelPath, BPModelElement, Component, QCResource, Test, TestConfig, and UserAsset. The owner type and ID are those of the object that owns the factory. These are set automatically when the relation is created.

After creating the AssetRelation object, set the dependent end of the relation to point to the asset used by the relation owner. Specify the used asset with <AssetRelation Object>.Field("ASR_RELATED_ID") and <AssetRelation Object>.Field("ASR_RELATED_TYPE"). The type is the name of the database table that contains the asset.

You can also specify an order among different assets of the same owner using <AssetRelation Object>.Field("ASR_ORDER"). This property is for the use of the testing tool. ALM makes no use of the field.

See  Example: Setting Up Assets and Relations.

Interfaces
Implemented InterfaceDescription
IBaseField2Represents a basic data field or entity, such as an attachment.
IBaseField3Represents a basic data field or entity, such as an attachment.
IBaseField4Represents a basic data field or entity, such as an attachment.
Public Methods
Public Method LockObjectLocks the object. Returns True if the object has been changed on the server.
Public Method PostPosts all changed values into database.
Public Method RefreshReads saved values, overwriting values in memory.
Public Method UndoUndoes changes to field values that have not been posted.
Public Method UnLockObjectUnlocks the object.
Public Properties
Public Property AutoPostIf true, the database is updated immediately when the field value changes.
Public Property AutoUnlockIndicates whether to make the item changeable to other users automatically after a Refresh or Post.
Public Property DeletedAssetInfoA reference to this AssetRelation's DeletedAssetInfo object.
Public Property FieldThe value of the specified field.
Public Property FieldMultiValueThe MultiValue object of the specified field.
Public Property IDThe item ID.
Public Property IsBrokenReturns true if either object in the relation does not exist.
Public Property IsLockedChecks if object is locked for editing.
Public Property ModifiedChecks if the item has been modified since last refresh or post operation. If true, the field properties on the server side are not up to date.
Public Property TypeNameThe field's type.
Public Property VirtualChecks if this is a virtual item, that is, an item that does not have a corresponding database record.
See Also