Skip to content

hmcts/probate-orchestrator-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Probate Orchestrator

License: MIT Quality Gate Status Security Rating Vulnerabilities Coverage

The Probate Orchestrator is an API Gateway that mediates API calls between Probate frontend and APIs such as the back office, submit service and business service.

It is written Java and uses the Sprint Boot framework.

Overview

probate-frontendprobate-caveats-frontendprobate-back-officeprobate-orchestrator-serviceprobate-business-serviceprobate-submit-serviceprobate-persistence-service


Citizen view
Caseworker view

Getting Started

Prerequisites

  • Java 21
  • Gradle

Running the application

Run the service by executing the following command:

$ ./gradlew bootRun

API documentation

API documentation is provided with Swagger:

  • http://localhost:4400/swagger-ui.html - UI to interact with the API resources

Developing

Local development environment

# rebuild every time you make changes
./gradlew assemble

# first time only
npx @hmcts/probate-dev-env --create

# start the dev env
npx @hmcts/probate-dev-env

Running against AAT:

You may run a local instance of orchestrator that points towards AAT BE services to use in conjunction with a local FE instance (probate-frontend or probate-caveats). This allows one to debug the orchestrator by triggering events through local FE.

Steps:

  1. Ensure VPN is on.
  2. Run ./gradlew generateAatEnvFile
  3. Run POINT_TO_AAT=true ./gradlew run
  4. After ~10 seconds, orchestrator will be running.

Unit tests

To run all unit tests please execute the following command:

$ ./gradlew test

Coding style tests

To run all checks (including unit tests) please execute the following command:

$ ./gradlew check

Crons

You can manually run a cron task from the cli:

TASK_NAME=[task] java -jar probate-orchestrator-service.jar run

# E.g.
TASK_NAME=SmeeAndFordExtractTask java -jar probate-orchestrator-service.jar

# or
TASK_NAME=SmeeAndFordExtractTask ./gradlew bootRun

To configure a new cron in AAT please checkout the cnp-flux-config repository and run:

./bin/add-cron.sh SmeeAndFordExtractTask ~/cnp-flux-config "0/10 * * * *"

Then create a PR in the cnp-flux-config repository.

Note that the cron will only run in the aat-00 cluster as we don't have a way to run the job once over multiple clusters. Let's hope that cluster doesn't go down.

IDE Settings

Project Lombok Plugin

When building the project in your IDE (eclipse or IntelliJ), Lombok plugin will be required to compile.

For IntelliJ IDEA, please add the Lombok IntelliJ plugin:

  • Go to File > Settings > Plugins
  • Click on Browse repositories...
  • Search for Lombok Plugin
  • Click on Install plugin
  • Restart IntelliJ IDEA

Plugin setup for other IDE's are available on [https://projectlombok.org/setup/overview]

License

This project is licensed under the MIT License - see the LICENSE file for details.