Skip to content

hmcts/bulk-scan-orchestrator

Repository files navigation

bulk-scan-orchestrator

Codacy Badge

Purpose

The purpose of this application is to:

  • Process envelopes (with scanned documents) received from bulk-scan-processor and update CCD with them, either by updating existing cases or by creating exception records (special type of cases that need to be converted into proper service cases or be attached to existing service cases)
  • Handle CCD callbacks for exception records' events, so that they can be attached or converted into service cases

Getting Started

Prerequisites

  • JDK 17
  • Project requires Spring Boot v3.x to be present.

Installation

  • Clone the repository
  • Ensure all required environment variables have been set.

Running end to end using docker

  • Run up the docker environment from bulk-scan-shared-infrastructure
  • You will have to setup these environment variables on either your run configuration or bash shell
IDAM_USERS_BULKSCAN_USERNAME = [email protected]
IDAM_USERS_BULKSCAN_PASSWORD = Password12
  • Either using the environment vars or application default you will need to set

    queue:
      envelopes:
        connection-string: XXXXX
        queue-name: YYYY
    
    • where:
      • XXXX is the connection string from azure to the queue you intend to use.
      • YYYY is the name of the queue
  • add a case into ccd using the case management ui

  • copy the case number from the UI (excluding the # and -'s) and place it into the example1.json#case_ref to reference the created case.

  • get the secret and run the getSasSecret script to create the queue jwt token.

  • put this in the send_message.sh script

  • run the send_message script in and make sure the 201 success is returned.

  • Voila ... you should see the debug of your service retrieving the message and processing it.

Quick Start (Alternative)

An alternative faster way getting started is by using the automated setup script. This script will help set up all bulk scan/print repos including bulk-scan-orchestrator and its dependencies. See common-dev-env-bsbp repository for more information. Once set up script has ran successfully you can move the bulk-scan-orchestrator from the newly created common-dev-env-bsbp/apps directory to your desired location.

Building

The project uses Gradle as a build tool but you don't have install it locally since there is a ./gradlew wrapper script.

To build project execute the following command:

    ./gradlew build