This section describes how an approval entity can be created
What does this section cover?
Create an Approval Entity
In order for an entity to be available to Approvals Mechanism, it has to meet the following conditions:
1. Data Object Class
The entity's DO class must implement ICRMDOApprovalEntity interface and its twelve methods:
- getNumberOfPendingAprovals()
- setNumberOfPendingAprovals(Integer numberOfPendingAprovals)
- getIsPendingAproval()
- setIsPendingAproval(Integer IsPendingAproval)
- isPendingAproval()
- getCanBeApproved()
- setCanBeApproved(Integer canBeApproved)
- canBeApproved()
- getUsersAuthorisedToRespond()
- setUsersAuthorisedToRespond(Set<CRMDOUser> users)
- getApprovalRequests()
- setApprovalRequests(Set<CRMDOApprovalRequest> approvalRequests)
In order for the obove methods to be implemented the following java properties must be defined:
- Integer numberOfPendingAprovals
- Integer isPendingAproval
- Integer canBeApproved
- Set<CRMDOUser> usersAuthorisedToRespond
- Set<CRMDOApprovalRequest> approvalRequests
Note that these fields are transient, and therefore do not have a corresponding database field.
2. Entities Metadata File
In entities metadata file, <approvalincluded> tag's value must be set to true. Keep in mind that <approvalincluded> default value is false.