Underwriting definitions and their relation to underwriting approval records

Underwriting Definitions reside in the Admin workspace. They are used as templates to generate Underwriting Approval Records for a client workspace. One Approval record is generated for each Underwriting Definition that matches the following criteria:

UD (Underwriting Definition) unique Department
UD Approval Type = RFP or Renewal
UD Contract Type = CM Contract Type OR is empty
UD IsActive = True

Underwriting Definition configurations are managed by unique Department/Approval Type/Contract Type:

For a given Department, a Definition can be created with EITHER a unique Contract Type OR no Contract Type
A Definition with no Contract Type specified will cause an Approval record to be created for ANY CM/PB Contract Type
You are not allowed to have an active Department/Approval Type/Contract Type record and an active Department/Approval Type/No Contract Type as that is considered redundant and would result in duplicate Department Approvals

Each Time the Batch is ‘Accepted’ (RFP) or ‘Submitted’ (Renewal Batch), any existing Approvals in the workspace are inactivated. New Definitions are retrieved based on the current state of the CM and Batch. Since the Contract Type could change during a Reprocess (RFP) or at any stage in the Renewal process, it is critical that new Definitions are evaluated with each workflow pass. This prevents Approvals that no longer apply to a client from being orphaned and left in the critical path. Consider the following RFP scenario:

A new client is created with Contract Type = PEO
Two Underwriting Definitions exist for Contract Type = PEO:
Risk
Carrier
When the Batch is Accepted, two active Underwriting Approvals are generated:
Risk (Pending)
Carrier (Pending)
It is then decided to convert this client to PEO-Low Cost
The Batch must be Reprocessed as the Contract Type is currently locked
The two existing Approval records are set to Status = Reprocess, but they are still Active in the workspace
The Contract Type is changed to PEO-Low Cost
One Underwriting Definition exists for Contract Type = PEO-Low Cost
HR
When the Batch is Accepted, we must inactive the invalid Approvals ‘Risk’ and ‘Carrier’ and generate the valid Approval ‘HR’. If this did not take place, three Approvals would be in the system that would have to be processed, even though two of them no longer apply to the business
The inactivated Approvals are not removed from the system; they are simply removed from the current workflow process. Notes/Comments on those Approvals are still available.
If this PEO-Low Cost client is ever Reprocessed and the Contract Type is set back to PEO, the existing inactive Approvals ‘Risk’ and ‘Carrier’ will be recycled (re-activated and re-used), and the non-applicable Approval ‘HR’ will be inactivated for possible future recycling.