Skip to main content

Create and Vary a Licence and Delius

Supports integration between Create and Vary a Licence and Delius. This service listens to domain events raised when a licence is activated in Create and Vary a Licence, determines the licence conditions that will now apply to person on probation and creates these licence conditions in Delius for the purposes of managing the licence supervision. Licence conditions are modelled differently across the two services and therefore this service uses a mapping defined in the Delius database to determine the type of licence condition to create. The service also provides API endpoints providing probation case management information to Create and Vary a Licence.

Business Need

Reducing re-keying of licence conditions across Create and Vary a Licence and Delius saving probation practitioners time and improving data quality

Data Dependencies

Create and Vary a Licence depends on Delius data for background on the relevant Person on Probation and the specific Probation Case as well as which areas of the probation service have responsibility for the case. The API also enables Create a Vary a Licence to add a specific Role to a Delius User, which supports onboarding to the service without the need for manual work to update permissions.

Context Map - Probation Data

Context Map

Case Responsibility is not a single concept in Delius and therefore Create and Vary a Licence uses a number of Delius entities to determine which cases to show to it’s users.

Workflows

Licence Condition Workflows

Licence conditions are managed in Create and Vary a Licence and supervised by probation practitioners using Delius. Workflows across the two systems reduce the need for manual re-keying of the licence condition information.

Context Map - Licence Conditions

Context Map

Workflow: Licence Activation

Activation of a licence on release from prison triggers creation of licence conditions in Delius. There are three types of licence condition Standard Conditions, Additional Conditions and Bespoke Conditions. The mapping process between Create and Vary a Licence and Delius determines how each licence condition is created in Delius. If the mapping between the Create and Vary a Licence and Delius conditions cannot be found the incoming domain event message will fail to process and the licence condition will not be automatically created.

Business Event Message Event Type / Filter
Licence Activation create-and-vary-a-licence.licence.activated

Workflow Map

Interfaces

Message Formats

The service responds to HMPPS Domain Event messages via the Create and Vary a Licence and Delius Queue. The events are raised by the Create and Vary a Licence Service to communicate activation of the licence.

Example messages are in the development source tree.

Incoming messages are filtered on eventType by the SQS queue policy

API Access Control

API endpoints are secured by roles supplied by the HMPPS Auth client used in the requests

API Endpoint Required Role
All ROLE_PROBATION_API__CVL__CASE_DETAIL