A Spring Boot application for creating new appeals for SSCS appellants.
The SSCS Tribunals Case API is part of the SSCS ecosystem, enabling appellants to submit appeals and interact with the tribunal system. It integrates with CCD and other services to manage appeals.
- Java 21 - Required for running the application
- Spring Boot - Framework for building the application
- Gradle - Build tool for managing dependencies and tasks
- Docker - Used for containerizing the application and running dependencies such as CCD and Pact Broker locally. Ensure Docker is installed and running on your machine. Download Docker
For versions and a complete list of dependencies, see build.gradle
.
NOTE: If you haven't already connected to the HMCTS Azure environment through Azure CLI, you will need to do this. Please contact the development team for instructions.
-
Build the application:
./gradlew build
-
Run the application:
./gradlew bootWithCCD
-
Test the application health:
curl http://localhost:8008/health
Expected response:
{"status":"UP"}
The application integrates with the rse-cft-library
. Additional Docker Compose files can be provided in src/cftlib/resources/docker
.
- Run a cron task locally:
TASK_NAME=MigrateCasesTask ./gradlew bootRun
- Run a cron task in preview by adding the
pr-labels:job
label to the PR in GitHub. Configure additional settings incharts/sscs-tribunals-api/values.job.preview.template.yaml
.
Refer to this sample for setting up cron tasks in Flux.
Run all unit tests:
./gradlew test
- Ensure your local CCD is running with subscription ID
7S9MxdSBpt
. - Execute:
./gradlew --info smoke
-
Run contract tests:
./gradlew contract
-
Publish pact tests locally:
docker-compose -f docker-pactbroker-compose.yml up ./gradlew pactPublish
-
Run and publish tests in one go:
./gradlew runAndPublishConsumerPactTests
-
Verify CCD Provider Tests:
- Clone the ccd-data-store-api.
- Run the
CasesControllerProviderTest
with the following configuration:@PactBroker(scheme = "${PACT_BROKER_SCHEME:http}", host = "${PACT_BROKER_URL:localhost}", port = "${PACT_BROKER_PORT:80}", consumerVersionSelectors = { @VersionSelector(tag = "Dev")})
- Publish results:
System.getProperties().setProperty("pact.verifier.publishResults", "true");
-
Create the distribution:
./gradlew installDist
-
Build the Docker image:
docker-compose build
-
Run the application:
docker-compose up
# Build the application
./gradlew build
# Run the application
./gradlew bootWithCCD
# Run unit tests
./gradlew test
# Run smoke tests
./gradlew --info smoke
# Build Docker image
docker-compose build
# Run Docker containers
docker-compose up
# Test application health
curl http://localhost:8008/health
Preview environments are not created for PRs starting with "Bump" due to a decision to avoid unnecessary environments created by Dependabot.
Elastic indices may be missing on preview. Recreate them by logging into CCD admin (e.g., https://admin-web-sscs-tribunals-api-pr-4091.preview.platform.hmcts.net/
) and clicking "Create Elasticsearch Indices."
This avoids re-triggering the pipeline build and saves time.
Work allocation is now enabled in preview. To enable work allocation in preview, you need to add the pr-values:wa
label to your PR. This will ensure that the work allocation service is started and configured correctly for the preview environment.
If some events are not triggering WA tasks, or are not being recognised by the WA service, double check that the case-event.json entry for the event has the Publish
field set to "Y"
. If it is not set, then CCD will not publish the event to the message listener and the WA service will not be able to process it.