Ability to reverse the Clients and Policies created via Create Clients and Create Policy BR while Activity reversal

This enhancement is to enable a way to reverse the client records or policy records by creating a way to either soft delete (put to Shadowed status) such records
Reversing of Activity with Create Clients or Create Policy attached Business Rules
Activity Reversal Processing
On reversal of an activity that creates a Client or a Policy through the CreateClients BR or CreatePolicy BR, A "business error" is thrown in case reversal is attempted in an invalid scenario:

In case of a user initiated reverse/recycle action, the condition will be evaluated before the reversal activity is added or activity details is displayed for recycle processing. In case the condition in the expression fails, the message will be displayed in a popup window. The recycle/reverse action will be stopped and the user cannot enter the reversal/recycle. See screenshot below for the popup screen display.

In case of a system initiated undo/redo action, the undo activity (and redo activity as well in case of redo) will be created automatically. In this case, when the undo activity is processed, the first step will be to evaluate the expression and if it fails, a business error will be displayed similar to all business errors (like ValidateExpressions error messages). The business error will be added on the undo activity (and not the forward activity which is already in Active status). This error will not be overrideable.

On CreateClients Business Rule and CreatePolicy Business Rule, the following shall be the expression evaluated to determine whether reversal processing is applicable or not:

CreateClients Business Rule: When reversing an activity that processes CreateClients Business Rule to create one or more client records, the following conditions will be evaluated on each client created by the CreateClients Business Rule. If any of the following conditions fail on any of the client records created, a business error stating "There are Roles or Activities that need to be manually reversed/deleted. Recycle/Reversal cannot be processed."

Validation for Activities that have some processing completed.
There should be no activities (all types of activities to be considered for this check - both program and non-program; both spawned and user-added; both Normal and Recycle activities) in a status where there is some processing (lightning bolt action) beyond just addition of activity has been already performed: TypeCode = ‘01’ or ’04’; StatusCode not in ‘02’, '09', ‘12’ and ‘34’.
If there is one or more activities with some processing (statuses defined in point i above), system will error out – above business error will be displayed.

Validation for Roles in “Active” status that the Client is the Role Player for:

There should be no Role records in AsRole table (relating to Policy roles only; Company roles needn’t be counted) or AsAgreementRole (relating to Agreement level roles) or with this Client as the Role Player that is in “Active” status.

When considering Policy Roles, only Policies which are not in "12" - Shadow status should be considered. This is required since the UI based Shadow Policy functionality allows Role records stay unchanged basis configuration.

If there is one or more Policy or Agreement roles in “Active” status – the system should display above business error.

CreatePolicy Business Rule: When reversing an activity that processes CreatePolicy BR to create a policy record, the following conditions should be evaluated on the policy created. If any of the following conditions fail, a business error stating "The policy created from this activity contains some Activity records that need to be manually reversed. Recycle/Reversal cannot be processed."

Validation for Activities that have some processing completed.

There should be no activities (all types of activities to be considered for this check - both program and non-program; both spawned and user-added; both Normal and Recycle activities) in a status where there is some processing (lightning bolt action) beyond just addition of activity has been already performed: TypeCode = ‘01’ or ’04’ StatusCode not in ‘02’, '09', ‘12’ and ‘34’.

If there is one or more activities with some processing (statuses defined in point i above), system will error out – above business error will be displayed.

ReversalProcessing section in CreateClients Business Rule
The element <ReversalProcessing> in the CreateClients BR will define the way the Client record(s) created from the CreateClients BR will be handled when the transaction is reversed/recycled (both user initiated and undo/redo). The syntax will be as defined in the xml help guide

There will be two child elements <ShadowOnReversal> and <DeleteOnReversal>. Both will allow configuring a set of Expressions to be evaluated under the <Tests> element.

The expressions configured under the ShadowOnReversal and DeleteOnReversal elements will continue to be evaluated during reversal processing.

The expressions configured under these two elements can use all Activity Fields and any Activity Math variable that was logged (into AsActivityMath table) - non-logged math variables cannot be used..

The <ReversalProcessing> is an optional element and if this is not configured, when the activity with CreateClients BR is reversed, the Client records created will be unaffected

When configured, the system will execute the reversal based on expression evaluation under the ShadowOnReversal and DeleteOnReversal elements as follows:

If all expressions configured under the <Tests> element under <ShadowOnReversal> are TRUE:

The Client record will be Shadowed

Change StatusCode of client in AsClient table to "Shadowed" status.
Update the UpdatedGMT on the AsClient table with the current timestamp.
Any activity in Pending statuses (status code ‘02’ and '09'); move them to "Pending Shadow".
Update all related tables that involve a Status column to the status value corresponding to Shadow/Inactive/Expired.

If all expressions configured under the <Tests> element under the <DeleteOnReversal> are TRUE:

The Client record will be Deleted
The Client record from the AsClient table.
All activities linked to the client from the AsActivity table including any activities in status code '02' and '09'.
Delete related records in all related tables

This will be executed only if the ShadowOnReversal is FALSE (not TRUE). If Both <ShadowOnReversal> and <DeleteOnReversal> evaluate to true, the ShadowOnReversal takes precedence.

If both <ShadowOnReversal> and <DeleteOnReversal> evaluate to FALSE, then the Client record will stay unaffected. This is similar to current CreateClients BR where the client records are not affected.

ReversalProcessing section in CreatePolicy Business Rules
The element <ReversalProcessing> will define the way the Policy record created from the CreatePolicy BR will be handled when the transaction is reversed/recycled (both user initiated and undo/redo). The syntax will be as defined in the xml help guide.

There will be two child elements <ShadowOnReversal> and <DeleteOnReversal>. Both will allow configuring a set of Expressions to be evaluated under the <Tests> element.

The expressions configured under the ShadowOnReversal and DeleteOnReversal elements will continue to be evaluated during reversal.

The expressions configured under these two elements can use all Activity Fields and any Activity Math variable that was logged (into AsActivityMath table) - non-logged math variables cannot be used.

The <ReversalProcessing> is an optional element and if this is not configured, when the activity with CreatePolicy BR is reversed, the Policy record created will be unaffected.

When configured, the system will execute the reversal based on expression evaluation under the ShadowOnReversal and DeleteOnReversal elements as follows:

If all expressions configured under the <Tests> element under <ShadowOnReversal> are TRUE:
The Policy record will be Shadowed (soft-deleted).
Change StatusCode of policy in AsPolicy table to "Shadowed" status.
Update the UpdatedGMT on the AsPolicy table with the current timestamp.
Any activity in Pending status; move them to "Pending Shadow".

Update all related tables that involve a Status column to the status value corresponding to Shadow/Inactive/Expired.

If all expressions configured under the <Tests> element under the <DeleteOnReversal> are TRUE:

The Policy record will be Deleted.
The Policy record from the AsPolicy table.
All activities linked to the client from the AsActivity table table including any activities in status code '02' and '09'.
Delete related records in all related tables
This will be executed only if the ShadowOnReversal is FALSE (not TRUE). If Both <ShadowOnReversal> and <DeleteOnReversal> evaluate to true, the ShadowOnReversal takes precedence.

If both <ShadowOnReversal> and <DeleteOnReversal> evaluate to FALSE, then the Policy record will stay unaffected.

     
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. About Oracle Insurance | Contact Us