Skip to content

Commit

Permalink
PI-1480: Document Manage Offences and Delius service (#2299)
Browse files Browse the repository at this point in the history
Co-authored-by: Anthony Britton <[email protected]>
  • Loading branch information
mxco86 and anthony-britton-moj authored Sep 22, 2023
1 parent ff290e2 commit 75a494e
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 2 deletions.
18 changes: 16 additions & 2 deletions projects/manage-offences-and-delius/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# manage-offences-and-delius
# Manage Offences and Delius

// TODO Describe the service
## Business Need

Inbound service that responds to events raised by the HMPPS Manage Offences service when there are changes to the set of [CJS Offence Codes](https://www.criminaljusticehub.org.uk/jargon-buster/cjs-offence-code/) managed by that service. Any changes to the set of offence codes is reflected in the Delius database. This ensures that Delius is up-to-date with the common set of offence codes used across HMPPS Digital services.

## Interfaces

### Message Formats

The service responds to an HMPPS Domain Event message via an
[SQS Queue](https://github.com/ministryofjustice/cloud-platform-environments/blob/main/namespaces/live.cloud-platform.service.justice.gov.uk/hmpps-probation-integration-services-prod/resources/manage-offences-and-delius-queue.tf).
The events are raised by the [Manage Offences API](https://github.com/ministryofjustice/hmpps-manage-offences-api) when a CJS offence code is either created or updated.

| Business Event | Message Class | Message Event Type / Filter |
|----------------------------|--------------------|---------------------------------|
| Change to CJS offence code | HMPPS Domain Event | manage-offences.offence.changed |
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: AsyncAPI Reference
source_url: 'https://github.com/ministryofjustice/hmpps-probation-integration-services/blob/main/projects/manage-offences-and-delius/tech-docs/source/async-api-reference.html.md.erb'
weight: 30
---

# ASyncAPI Reference

* [ASyncAPI Spec](https://studio.asyncapi.com/?url=https://raw.githubusercontent.com/ministryofjustice/hmpps-probation-integration-services/main/projects/manage-offences-and-delius/tech-docs/spec/async-api.yaml&readOnly)
23 changes: 23 additions & 0 deletions projects/manage-offences-and-delius/tech-docs/spec/async-api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
asyncapi: 2.6.0
info:
title: Manage Offences and Delius
description: Reflect changes to CJS offence codes in Delius
version: 0.1.0

servers:
development:
url: https://sqs.eu-west-2.amazonaws.com/754256621582/probation-integration-dev-manage-offences-and-delius-queue
protocol: sqs
preproduction:
url: https://sqs.eu-west-2.amazonaws.com/754256621582/probation-integration-preprod-manage-offences-and-delius-queue
protocol: sqs
production:
url: https://sqs.eu-west-2.amazonaws.com/754256621582/probation-integration-prod-manage-offences-and-delius-queue
protocol: sqs

channels:
hmpps-domain-events/manage-offences-and-delius/offence-changed:
subscribe:
operationId:
message:
$ref: https://raw.githubusercontent.com/ministryofjustice/hmpps-domain-events/main/spec/schemas/manage-offences/offence-changed.yml

0 comments on commit 75a494e

Please sign in to comment.