Rating versioning and auditing
This blueprint describes a new functionnality for CK:
- add the ability to version a set of rating rules
- store version along rating computation
- add applicabilities
CK Rating versioning and auditing
#######
Today, CK store only a rating value with no possibility to recover how this value was computed.
This blueprint proposes to add versioning and auditing capabilities to CK for the hashmap
module.
Ruleset
=======
Description
-----------
A ruleset is used to identify a set of rating rules in time.
Only one ruleset can be active and used for computation at a time.
A ruleset is active until another one replace it.
Ruleset model
-------------
A *ruleset* is defined as:
* id: a unique id
* descr [optional]: a description
* Rating rules: some rating rules
* Activation date: date when the ruleset should be effective and used for computation
* states: append-only state list. last back-inserted item is the current state
Ruleset state model
-------------------
A *state_item* is defined as:
* state: an enum based state indicator
* created-at: state creation date
* created-by: user id (can be the CK service user)
Ruleset state has the following life-cycle:
draft <--> commited --> active --> archived.
In *draft* state, a ruleset can be modify.
In *commited* state, a ruleset is made available to the CK engine to be used. For modification,
ruleset state should be reverted to *draft*
In *active* state, the ruleset is activily used for rating computation. It cannot be modified and
can only evolve to *archived* state
In *archived* state, the ruleset is no more used and is archived for auditing purposes.
Ruleset actions
---------------
Create a ruleset
^^^^^^^^^^^^^^^^
A user can create a new ruleset (state: *draft*) from scratch, by copy or by import.
Commit a ruleset
^^^^^^^^^^^^^^^^
A user can commit a ruleset.
Revert a ruleset
^^^^^^^^^^^^^^^^
A user can revert a commited ruleset to draft.
Activate a ruleset
^^^^^^^^^^^^^^^^^^
A user can activate a particular ruleset.
This action automatically archived the current active ruleset.
Ruleset collection actions
-------
List rulesets
^^^^^^^^^^^^^
A user can query for a list of ruleset.
A set of filters can be provided to restrict outputs
Get ruleset
^^^^^^^^^^^
A user can query for a ruleset details (values + state history)
Storage modification
=======
any rating record should embed the current active ruleset id
Orchestrator behavior modification
=======
At each period, the orchestrator should evaluate the list of commited rulesets in order to
check if a new ruleset should be actived (according to the activation date).
The check is done regarding the collected data date.
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Medium
- Drafter:
- Maxime Cottret
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- Drafting
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by