Handcrafted Rule Sets for Evidence Processing are called from appropriate points during the maintenance of Case Evidence records in respect of Dynamic Evidence Types. For example, the Rule Set for Summary Information is called every time a Case Evidence record for a Dynamic Evidence Type is viewed. These Processing Rule Sets act on a particular Case Evidence record. Dynamic Evidence maintenance creates and populates a Rule Object with the details of the Case Evidence record for which the processing Rule Set is invoked.
When the Processing Rule set is invoked as part of reading a Case Evidence record, the Rule Object is populated with the data stored in the Database. When the Processing Rule set is invoked during creation or modification of a Case Evidence record, the corresponding Rule Object created is populated with the new or modified data.
The steps involved in loading a Dynamic Evidence Rule Object are as follows:
- The generated Rule Set or Rule Class for the Dynamic Evidence Type is identified. A Rule Object is created for this Rule Class.
- "evidenceID", "correctionSetID", "successionID", "caseID", "type", "receivedDate", "effectiveFrom" and "status" are attributes common to all Dynamic Evidence Types. These are populated from the Evidence Descriptor.
- Each Rule Attribute corresponding to the Data Attributes are populated with values from the database, or the value specified by the user if the Case Evidence record is being created or modified
- If the Case Evidence record is being created:
- "evidenceID", "correctionSetID" and "successionID" will all be set to zero
- Rule Attributes for navigating to Parent Records will be populated with the Parent Records selected as part of the create process. This is because the normal derivation of these Rule Attributes would try to read the Parent records from the database and the Relationship would not have been established yet, as the Case Evidence record is yet to be created. Also, Rule Attributes corresponding to Child Evidence Types would be populated with an empty List for this Case Evidence instance.
- The Rule Attribute for Address attributes will have a value of zero. The Rule Attribute corresponding to the Address object will be populated with the Address Details entered during creation.
- The Rule Attribute for Related Case Participant Attributes will have a value of zero, if an existing Case Participant is not chosen by the case worker. The Rule Attribute corresponding to the Related Case Participant object would be populated with the Details entered during creation.