Skip to content

hmcts/probate-business-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Probate Business Service

License: MIT Quality Gate Status Security Rating Vulnerabilities Coverage

The probate business service provides useful business logic to the frontend service and others via RESTful APIs.

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
  • Docker

Running the application

Building and Running the Business Service

Install dependencies and build the service by executing the following command:

$ ./gradlew clean build

Once the build has completed, you will find the new .jar in build/libs. You can run the .jar with the following command:

$ java -jar build/libs/business-service-1.0.1.jar

Local Development using docker

Docker environment

Bring up the 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

API documentation

API documentation is provided with Swagger:

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

Developing

Running against AAT:

You may run a local instance of business service that points towards AAT BE services to use in conjunction with a local Orchestrator pointing to AAT, and 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, business service 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

Troubleshooting

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]

JsonMappingException when running tests in your IDE

Add the -parameters setting to your compiler arguments in your IDE (Make sure you recompile your code after). This is because we use a feature of jackson for automatically deserialising based on the constructor. For more info see: https://github.com/FasterXML/jackson-modules-java8/blob/a0d102fa0aea5c2fc327250868e1c1f6d523856d/parameter-names/README.md

License

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