Evidence Relationship

By default, the Evidence infrastructure facilitates the linking of parent-child evidence via the EvidenceRelationship link entity. The structure of the EvidenceRelationship link entity is as follows:

Table 1. Evidence Relationship Link Entity
Evidence Relationship
evidenceRelationshipID
parentID
parentType
childID
childType

This supports the relationship between any parent-child evidence and does away with the necessity for customers to model their own link entities for managing such relationships. When evidence is being inserted, the generic EvidenceController.insertEvidence function makes a call to the business process EvidenceRelationship.createLink. If a parent type has been specified, i.e. passed in from the client as part of the insert, then a record will be written to the EvidenceRelationship entity linking the child evidence to its parent. Also, a call is made to the business process EvidenceRelationship.cloneLinks directly after the call to the interface operation insertEvidenceOnModify. From cloneLinks, two further calls are made to cloneLinksForParent and cloneLinksForChild.

If customers are using their own link entities to manage relationships, they will need to override the Evidence Relationship business processes for creating and cloning links. The evidence type is available in the input keys of both these functions which means that responsibility can be delegated to the appropriate custom relationship processing based on the evidence type in the key.