Status transition
Business goalβ
A Status Transition Definition defines how the dossier can go from one status to another.
For each transition, validations can be defined to verify if the transition is possible.
π― Functional documentationβ
The Status Transition Definition is linked to one or more Dossier Definitions.
- By pointing to a
DossierStatusTransitionConfigurationvia an identifier- These are configured as JSON using the configuration framework
βοΈ Configurationβ
At the time of writing there is no way to manage the transitions in the UI.
Therefore weβll explain the JSON model.
General fields related to the import/export:
type: This should refer toDOSSIER_STATUS_TRANSITIONSversion: Technical version of the configuration format. This is not a functional version. Create a second status transition file with for example the suffix_v2in the identifier.value: The content of the status transition file.identifier:fspname_dossier_status_transitions
The configuration itself:
statusMap: The grouping of all the states. Every entry has a βfromβ dossier status as key, and all possibletodossier statuses as value. The order of the statuses is followed in the UI. So the first configured status is displayed on the top right side of the UI and will have a primary color.to: The state after the transition.forRoles: This limits a state transition to certain roles. Every role listed must hold thefsp.dossier.details.transitionpermission. A role can additionally restrict the transition to specific dossiers β see Restricting a transition to specific dossiers.validations: Which conditions should be met.className: the class that should be met as a validation
See validationssettings: optional settings to configure the validation class.
Example:
{
"type": "DOSSIER_STATUS_TRANSITIONS",
"version": 1,
"value": {
"identifier": "customer_dossier_status_transitions",
"statusMap": {
"OPEN": [
{
"to": "IN_PROGRESS",
"forRoles": [ "PARTNER_ADVISOR_RBAC", "PARTNER_MANAGER_RBAC" ],
"validations": [
{
"className": "eu.myharmoney.app.bll.validators.dossierstatustransition.AtLeastOneResponsible",
"settings": {}
}
]
}
]
}
}
}
Restricting a transition to specific dossiersβ
forRoles accepts the identifiers of RBAC roles β either a standard RBAC role (e.g. PARTNER_ADVISOR_RBAC) or a custom role identifier.
Every role listed in forRoles must hold the fsp.dossier.details.transition permission. This means:
- Custom roles must also be granted the
fsp.dossier.details.transitionpermission, and can additionally narrow which dossiers the role may transition by adding adossierFilterto that grant. The transition is then only offered (and only allowed) for dossiers that match the filter; for other dossiers it is not shown and is rejected if attempted.
The fsp.dossier.details.transition permission cannot be removed from a role while that role is referenced by any transition's forRoles. Remove the role from all transitions first.
Example: only senior advisors may close high-risk dossiersβ
The custom role grants transition only for dossiers with RBA rating HIGH (name of role: senior_advisor):
{"fsp": { "dossier": { "details": { "permissions": { "transition": { "dossierFilter": { "rbaRatings": ["HIGH"] } } } } } } }
The transition lists that role in forRoles.
With this configuration the ACCEPTED β CLOSED transition is offered and allowed only to users holding senior_advisor, and only for dossiers whose RBA rating is HIGH.