GithubHelp home page GithubHelp logo

ministryofjustice / laa-nolasa Goto Github PK

View Code? Open in Web Editor NEW
3.0 20.0 1.0 4.22 MB

Not on LIBRA Auto Search Application

License: MIT License

Java 99.01% Dockerfile 0.21% Shell 0.78%
laa-apply laa-crime-apps

laa-nolasa's Introduction

Background and context

The Managed Libra records application (MLRA) is an LAA system that shares a database with the means assessment administration tool (MAAT). It links cases to their corresponding cases in the HMCTS Libra system. This is for the purposes of tracking cases through the course / Legal Aid system in a joined up way (i.e. updates of a person's status through the courts system is updated in LAA systems once a case is linked).

If an LAA caseworker searches for a case on the Libra system using MLRA and they are unable to find a corresponding case (this can happen for numerous reasons, for instance a Legal Aid application being submitted by a legal provider before the police/courts have added onto LIBRA), the case is marked by a caseworker as 'NOT ON LIBRA' and places onto a backlog queue (the 'not on libra' queue). Case workers will then research these cases at a later date to see if the corresponding case is now on Libra system.

This researching can take time as there is not a great way of prioritizing cases that may be on Libra. This is where the NOLASA application comes in.

Not On Libra Auto-Search Application (NOLASA)

Not On Libra Auto-Search Application (NOLASA) is a microservice that reads cases that have been marked as 'not-on-libra' from the MLRA database once a day (8pm). It then auto-searches the HMCTS Libra system via the LAA's InfoX message broker service. The message protocol used is SOAP.

If NOLASA finds that there are results returned for a case it updates its status in MLRA to say 'RESULTS FOUND'. This means that caseworkers can filter 'not on libra' cases to ones that they know they will have results for. They can then prioritize their case searching and linking more effectively.

NOLASA Springboot Microservice

The NOSALA microservice has been developed using Springboot framework with embedded Tomcat server. Tomcat is fully contained in the fat JAR file. Gradle packages executable JAR file which is deployed as Docker image on AWS ECS.

Developer setup

Pre-requisites

  1. Docker
  2. Java - required version specified in the file .java-version
  3. SSH
  4. Access to the MAAT development database
  5. Java IDE - e.g. IntelliJ, eclipse, or atom

We're using Gradle to build the application. This also includes plugins for generating IntelliJ configuration.

1. Clone the repository

git clone {this repo}
cd laa-nolasa

2. Set up an SSH tunnel to access the database

Database and InfoX endpoints need to be up and running before the application runs. This step is not required if you are running in an AWS workspace.

Database: You will need to have the relevant database accessible on port 1521 locally. This can be provided by an SSH tunnel to an RDS instance in AWS. Once connected to the MoJ Digital VPN, execute the command below to tunnel to Dev (replace <username> with your Bastion username):

ssh -L 1521:rds.maat.aws.dev.legalservices.gov.uk:1521 <username>@3.10.83.171 -i ~/.ssh/id_rsa

3. InfoX connection configuration

NOLASA requires connection to InfoX to search against Libra. The simplest way is to run InfoX stub locally by following the instructions from https://github.com/ministryofjustice/laa-infoX-application. The application needs an environment variable to be provided when the container is run so the InfoX connection works correctly

The LIBRA_ENDPOINTURI environment variable has been assigned to http://host.docker.internal:8080/infoX/gateway, but if you want to connect to a different endpoint you can modify the config property LIBRA_ENDPOINTURI in the docker-compose.override.yml

LIBRA_ENDPOINTURI=http://172.16.3.131:8550/infoX/gateway

4. MAAT Database connection configuration

For NOLASA to be able to connect to the database you will need to update the configuration property DATASOURCE_PASSWORD in docker-compose.override.yml with the password for the datasource.

5. Build and run the app

You will need to build the artifacts for the source code, using gradle

./gradlew clean build

Information: The 'nolasa-0.1.0.jar' is located in: ./build/libs

The apps should then start cleanly if you run

docker-compose build
docker-compose up app

Alternatively, you can run the script cleanBuildAndRun.sh to do all of the above.

sh cleanBuildAndRun_Local.sh

This application does not have any user interface, so nothing would be available on the corresponding web page http://localhost:8081.

Environment variables are specified for DEV environment. It is also possible to override them before running docker-compose. If you want to connect to a different environment you can override them with the following runtime arguments:

docker-compose run -e DATASOURCE_URL=jdbc:oracle:thin:@host.docker.internal:1521:maatdb -e DATASOURCE_USERNAME=mla -e DATASOURCE_PASSWORD=****** -e LIBRA_ENDPOINTURI=http://host.docker.internal:8080/infoX/gateway app

6. Configure your IDE

Run ./gradlew tasks to see more details.

Eclipse and IntelliJ both support Gradle projects. You should be able to define a new project in either IDE, and import this codebase.

That is the recommended approach.

Alternatively, you can use Gradle to generate configuration for your preferred IDE.

  • ./gradlew eclipse will generate the Eclipse meta-data project files
  • ./gradlew idea will generate the IntelliJ meta-data project files

We do not check these files into version control. Gradle is our repeatable build process; not an IDE.

We use Lombok for code generation, so you need to install a plugin for whichever IDE you are using.

Additional documentation

laa-nolasa's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar donmasters avatar evilr00t avatar govindkalyanamoj avatar jabley avatar kerin avatar lkm0287 avatar matmoore avatar mian-moj avatar mikereiddigital avatar mohammad-rana avatar msahilan07 avatar mtac50 avatar stone-dj avatar vc13837 avatar vladimir-kovalyov avatar willmcb avatar zuriguardiola avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

uk-gov-mirror

laa-nolasa's Issues

A branch protection setting is not enabled: administrators require review

Hi there
The default branch protection setting called administrators require review is not enabled for this repository
See repository settings/Branches/Branch protection rules
Either add a new Branch protection rule or edit the existing branch protection rule and select the Require a pull request before merging option
See the repository standards: https://github.com/ministryofjustice/github-repository-standards
See the report: https://operations-engineering-reports.cloud-platform.service.justice.gov.uk/github_repositories
Please contact Operations Engineering on Slack #ask-operations-engineering, if you need any assistance

A branch protection setting is not enabled: Include administrators

Hi there
The default branch protection setting called Include administrators is not enabled for this repository
See repository settings/Branches/Branch protection rules
Either add a new Branch protection rule or edit the existing branch protection rule and select the Include administrators option
This will enable the branch protection rules to admin uses as well
See the repository standards: https://github.com/ministryofjustice/github-repository-standards
See the report: https://operations-engineering-reports.cloud-platform.service.justice.gov.uk/github_repositories
Please contact Operations Engineering on Slack #ask-operations-engineering, if you need any assistance

Dependabot couldn't parse the config file at .dependabot/config.yml

Dependabot couldn't parse the config file at .dependabot/config.yml. The error raised was:

(<unknown>): mapping values are not allowed in this context at line 3 column 17

Please ensure the config file is a valid YAML file. On online YAML linter is available here.

You can mention @dependabot in the comments below to contact the Dependabot team.

Default branch is not main

Hi there
The default branch for this repository is not set to main
See repository settings/settings/branches to rename the default branch to main and ensure the Branch protection rules is set to main as well
See the repository standards: https://github.com/ministryofjustice/github-repository-standards
See the report: https://operations-engineering-reports.cloud-platform.service.justice.gov.uk/github_repositories
Please contact Operations Engineering on Slack #ask-operations-engineering, if you need any assistance

A branch protection setting is not enabled: codeowners require reviews

Hi there
The default branch protection setting called codeowners require review is not enabled for this repository
This option affects a pull request, i.e a PR will need to be reviewed and approved by a CODEOWNER before it can be merged.
See repository settings/Branches/Branch protection rules
Either add a new Branch protection rule or edit the existing branch protection rule and select the Require review from Code Owners option
Create a .github/CODEOWNERS file
Add a or multiple entries of @ministryofjustice/team_name to the CODEOWNERS file
The team_name shall be a team from within the MoJ teams: https://github.com/orgs/ministryofjustice/teams
See GH Codeowners documentation: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
See the repository standards: https://github.com/ministryofjustice/github-repository-standards
See the report: https://operations-engineering-reports.cloud-platform.service.justice.gov.uk/github_repositories
Please contact Operations Engineering on Slack #ask-operations-engineering, if you need any assistance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.