Giter Club home page Giter Club logo

wa-case-event-handler's Introduction

wa-case-event-handler

Build Status

Notes

Since Spring Boot 2.1 bean overriding is disabled. If you want to enable it you will need to set spring.main.allow-bean-definition-overriding to true.

JUnit 5 is now enabled by default in the project. Please refrain from using JUnit4 and use the next generation

Building and deploying the application

Building the application

The project uses Gradle as a build tool. It already contains ./gradlew wrapper script, so there's no need to install gradle.

To build the project execute the following command:

  ./gradlew build

Running the application

  • Prerequisite:

    • Check if all services are running in minikube, if not follow the README in https://github.com/hmcts/wa-kube-environment
    • Check if minikube IP is set as environment variable.
      echo $OPEN_ID_IDAM_URL
      
      You should see the ip and port as output, eg: http://192.168.64.14:30196. If you do not see, then from your wa-kube-enviroment map environment variables
      source .env
      
  • You can either run as Java Application from run configurations or

      ./gradlew clean bootRun
  • In order to test if the application is up, you can call its health endpoint:

      curl http://localhost:8090/health

    You should get a response similar to this:

      {"status":"UP","diskSpace":{"status":"UP","total":249644974080,"free":137188298752,"threshold":10485760}}
    
  • To run all functional tests or single test you can run as Junit, make sure the env is set

        OPEN_ID_IDAM_URL=http://'minikubeIP:port'
    

    Note: Make sure the BPMN and DMN are deployed onto Camunda locally. Workflow and Task Configuration services should be running

  • To run all tests including junit, integration and functional. NOTE: This service is dependent on wa-workflow-api and wa-task-configuration service , so make sure it is running locally when running FTs.

    You can run the command

        ./gradlew test integration functional
    

    or

    ./gradlew tests
    

Configuration for functional test

  • To run functional tests, application should connect to the ASB. Make sure you have ASB subscription and provide correct values for these environment variables before you start the application.

    export AZURE_SERVICE_BUS_CONNECTION_STRING="Endpoint=sb://ccd-servicebus-demo.servicebus.windows.net/;SharedAccessKeyName=SendAndRecieveCCDMessage;SharedAccessKey=<Access_Key>;EntityPath=wa-case-event-handler-topic-sessions-ft"
    export AZURE_SERVICE_BUS_TOPIC_NAME=wa-case-event-handler-topic-sessions-ft
    export AZURE_SERVICE_BUS_CCD_CASE_EVENTS_SUBSCRIPTION_NAME=<subscription_name>
    export AZURE_SERVICE_BUS_MESSAGE_AUTHOR=<author_name>
    
  • To run application please provide these values

    export AZURE_SERVICE_BUS_DLQ_FEATURE_TOGGLE=true
    
  • To run functional tests, make sure Application is up and running.

  • please provide these values

  • export AZURE_SERVICE_BUS_DLQ_FEATURE_TOGGLE=false
    
  • Functional tests send messages to CaseEventHandlerTestingController, we are not using ASB for messaging. However, MessageReadinessConsumer peek into the ASB DLQ to make sure DLQ is empty before setting any message READY to be processed. So we still need to connect the application to the ASB. Functional test context doesn't need any of the ASB configuration as tests do not connect to the ASB

  • Example command to run Application

    AZURE_SERVICE_BUS_CONNECTION_STRING="Endpoint=sb://ccd-servicebus-demo.servicebus.windows.net/;SharedAccessKeyName=SendAndRecieveCCDMessage;SharedAccessKey=<Access_Key> \
    AZURE_SERVICE_BUS_DLQ_FEATURE_TOGGLE=true \
    ./gradlew clean bootrun
    
  • Example command to run Functional Tests

    AZURE_SERVICE_BUS_CONNECTION_STRING="Endpoint=sb://ccd-servicebus-demo.servicebus.windows.net/;SharedAccessKeyName=SendAndRecieveCCDMessage;SharedAccessKey=<Access_Key> \
    AZURE_SERVICE_BUS_DLQ_FEATURE_TOGGLE=false \
    ./gradlew clean functional
    

License

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

wa-case-event-handler's People

Contributors

abhiahirv1 avatar adityadwadasi avatar alexbaeza avatar andreitrushkov avatar burale avatar dependabot-preview[bot] avatar dependabot[bot] avatar dharmendrak avatar emily-whitley avatar hajam09 avatar iguannago avatar indvamshi avatar jamesboadi avatar kvvasudev avatar ludo05 avatar mcareyma avatar mkayad avatar mokainos avatar omer-hmcts avatar rafalkalita avatar raghera avatar rasikasri avatar renovate[bot] avatar sammichong avatar satvinder-hullait avatar serdaroguzhanakin avatar skandala-cgi avatar sullivangareth avatar timpickmanhmcts avatar vgulapally avatar

Stargazers

 avatar

Watchers

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

wa-case-event-handler's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Repository problems

These problems occurred while renovating this repository. View logs.

  • WARN: Invalid schedule: Failed to parse "after 8am and before 11am every first day of month"

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • Update versions.tomcat to v9.0.93 (org.apache.tomcat.embed:tomcat-embed-websocket, org.apache.tomcat.embed:tomcat-embed-core)
  • Update ch.qos.logback:1.2.13 to v1.5.6 (ch.qos.logback:logback-core, ch.qos.logback:logback-classic)
  • Update dependency com.azure:azure-messaging-servicebus to v7.17.2
  • Update dependency com.github.hmcts:fortify-client to v1.4.3
  • Update dependency com.launchdarkly:launchdarkly-java-server-sdk to v6.3.0
  • Update dependency com.zaxxer:HikariCP to v5.1.0
  • Update dependency commons-io:commons-io to v2.16.1
  • Update dependency hashicorp/terraform to v1.9.4
  • Update dependency net.logstash.logback:logstash-logback-encoder to v7.4
  • Update dependency org.apache.commons:commons-lang3 to v3.16.0
  • Update dependency org.camunda.bpm:camunda-external-task-client to v7.21.0
  • Update dependency org.springdoc:springdoc-openapi-ui to v1.8.0
  • Update org.seleniumhq.selenium:4.1.4 to v4.23.1 (org.seleniumhq.selenium:selenium-support, org.seleniumhq.selenium:selenium-api, org.seleniumhq.selenium:selenium-edge-driver, org.seleniumhq.selenium:selenium-safari-driver, org.seleniumhq.selenium:selenium-chrome-driver, org.seleniumhq.selenium:selenium-firefox-driver, org.seleniumhq.selenium:selenium-remote-driver, org.seleniumhq.selenium:selenium-java)
  • Update plugin com.github.ben-manes.versions to v0.51.0
  • Update plugin io.freefair.lombok to v6.6.3
  • Update versions.reformLogging to v6.1.5 (com.github.hmcts.java-logging:logging-appinsights, com.github.hmcts.java-logging:logging)
  • Update actions/checkout action to v4
  • Update actions/setup-java action to v4
  • Update dependency checkstyle to v10
  • Update dependency com.github.hmcts:core-case-data-store-client to v5
  • Update dependency com.github.hmcts:service-auth-provider-java-client to v5
  • Update dependency com.launchdarkly:launchdarkly-java-server-sdk to v7
  • Update dependency net.logstash.logback:logstash-logback-encoder to v8
  • Update dependency org.flywaydb:flyway-core to v10
  • Update dependency org.springframework.cloud:spring-cloud-starter-openfeign to v4
  • Update dependency org.zalando:logbook-spring-boot-starter to v3
  • Update dependency pmd to v7
  • Update guava monorepo to v33 (major) (com.google.guava:guava-testlib, com.google.guava:guava)
  • Update hmctspublic.azurecr.io/base/java Docker tag to v21
  • Update plugin io.freefair.lombok to v8
  • Update plugin org.sonarqube to v5
  • Update spring boot to v3 (major) (org.springframework.boot:spring-boot-starter-security, org.springframework.boot:spring-boot-starter-validation, org.springframework.boot)
  • Update spring security to v6 (major) (org.springframework.security:spring-security-web, org.springframework.security:spring-security-test, org.springframework.security:spring-security-taglibs, org.springframework.security:spring-security-saml2-service-provider, org.springframework.security:spring-security-rsocket, org.springframework.security:spring-security-oauth2-resource-server, org.springframework.security:spring-security-oauth2-jose, org.springframework.security:spring-security-oauth2-core, org.springframework.security:spring-security-oauth2-client, org.springframework.security:spring-security-messaging, org.springframework.security:spring-security-ldap, org.springframework.security:spring-security-data, org.springframework.security:spring-security-crypto, org.springframework.security:spring-security-config, org.springframework.security:spring-security-cas, org.springframework.security:spring-security-aspects, org.springframework.security:spring-security-acl, org.springframework.security:spring-security-core)
  • Update versions.serenity to v4 (major) (net.serenity-bdd:serenity-spring, net.serenity-bdd:serenity-rest-assured, net.serenity-bdd:serenity-junit, net.serenity-bdd:serenity-core)
  • Update versions.tomcat to v10 (major) (org.apache.tomcat.embed:tomcat-embed-websocket, org.apache.tomcat.embed:tomcat-embed-core)

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

docker-compose
docker-compose.yml
dockerfile
Dockerfile
  • hmctspublic.azurecr.io/base/java 17-distroless
github-actions
.github/workflows/stale.yml
  • actions/stale v9
.github/workflows/swagger.yml
  • actions/checkout v3
  • actions/setup-java v3
gradle
build.gradle
  • net.serenity-bdd:serenity-gradle-plugin 3.2.0
  • io.spring.dependency-management 1.1.6
  • org.springframework.boot 2.7.18
  • org.owasp.dependencycheck 10.0.2
  • com.github.ben-manes.versions 0.48.0
  • uk.gov.hmcts.java 0.12.63
  • org.sonarqube 3.5.0.2730
  • info.solidsoft.pitest 1.15.0
  • io.freefair.lombok 6.5.1
  • checkstyle 8.29
  • pmd 6.40.0
  • com.github.docker-java:docker-java 3.3.3
  • com.google.guava:guava 32.1.3-jre
  • commons-fileupload:commons-fileupload 1.5
  • commons-io:commons-io 2.14.0
  • net.minidev:json-smart 2.5.0
  • org.glassfish:jakarta.el 4.0.2
  • ch.qos.logback:logback-classic 1.2.13
  • ch.qos.logback:logback-core 1.2.13
  • io.netty:netty-all 4.1.112.Final
  • org.seleniumhq.selenium:selenium-java 4.1.4
  • org.seleniumhq.selenium:selenium-remote-driver 4.1.4
  • org.seleniumhq.selenium:selenium-firefox-driver 4.1.4
  • org.seleniumhq.selenium:selenium-chrome-driver 4.1.4
  • org.seleniumhq.selenium:selenium-safari-driver 4.1.4
  • org.seleniumhq.selenium:selenium-edge-driver 4.1.4
  • org.seleniumhq.selenium:selenium-api 4.1.4
  • org.seleniumhq.selenium:selenium-support 4.1.4
  • org.springframework.security:spring-security-core 5.8.13
  • org.springframework.security:spring-security-acl 5.8.13
  • org.springframework.security:spring-security-aspects 5.8.13
  • org.springframework.security:spring-security-cas 5.8.13
  • org.springframework.security:spring-security-config 5.8.13
  • org.springframework.security:spring-security-crypto 5.8.13
  • org.springframework.security:spring-security-data 5.8.13
  • org.springframework.security:spring-security-ldap 5.8.13
  • org.springframework.security:spring-security-messaging 5.8.13
  • org.springframework.security:spring-security-oauth2-client 5.8.13
  • org.springframework.security:spring-security-oauth2-core 5.8.13
  • org.springframework.security:spring-security-oauth2-jose 5.8.13
  • org.springframework.security:spring-security-oauth2-resource-server 5.8.13
  • org.springframework.security:spring-security-openid 5.8.13
  • org.springframework.security:spring-security-remoting 5.8.13
  • org.springframework.security:spring-security-rsocket 5.8.13
  • org.springframework.security:spring-security-saml2-service-provider 5.8.13
  • org.springframework.security:spring-security-taglibs 5.8.13
  • org.springframework.security:spring-security-test 5.8.13
  • org.springframework.security:spring-security-web 5.8.13
  • org.junit.jupiter:junit-jupiter-api 5.10.3
  • org.junit.jupiter:junit-jupiter-engine 5.10.3
  • org.junit.jupiter:junit-jupiter-params 5.10.3
  • org.junit.platform:junit-platform-commons 1.10.3
  • org.junit.platform:junit-platform-engine 1.10.3
  • org.springframework.boot:spring-boot-starter-validation 2.7.18
  • org.springframework.security:spring-security-rsa 1.1.5
  • org.springframework.boot:spring-boot-starter-security 2.7.18
  • org.springframework.retry:spring-retry 2.0.7
  • org.springframework.cloud:spring-cloud-starter-openfeign 3.1.9
  • org.springdoc:springdoc-openapi-ui 1.7.0
  • org.zalando:logbook-spring-boot-starter 2.16.0
  • com.github.hmcts.java-logging:logging 6.0.1
  • com.github.hmcts.java-logging:logging-appinsights 6.0.1
  • com.github.hmcts:service-auth-provider-java-client 3.1.4
  • com.github.hmcts:core-case-data-store-client 4.9.2
  • com.azure:azure-messaging-servicebus 7.15.0
  • io.projectreactor.netty:reactor-netty-http 1.1.21
  • io.projectreactor.netty:reactor-netty-core 1.1.21
  • org.apache.tomcat.embed:tomcat-embed-core 9.0.83
  • org.apache.tomcat.embed:tomcat-embed-websocket 9.0.83
  • org.camunda.bpm:camunda-external-task-client 7.19.0
  • com.launchdarkly:launchdarkly-java-server-sdk 6.2.1
  • org.apache.commons:commons-lang3 3.13.0
  • com.github.ben-manes.caffeine:caffeine 3.1.8
  • net.logstash.logback:logstash-logback-encoder 7.0.1
  • org.junit.vintage:junit-vintage-engine 5.10.3
  • com.obsidiandynamics.pojotester:core 0.9.0
  • com.jparams:to-string-verifier 1.4.8
  • com.google.guava:guava-testlib 32.1.3-jre
  • net.serenity-bdd:serenity-core 3.1.20
  • net.serenity-bdd:serenity-junit 3.1.20
  • net.serenity-bdd:serenity-rest-assured 3.1.20
  • net.serenity-bdd:serenity-spring 3.1.20
  • org.testcontainers:postgresql 1.20.1
  • org.testcontainers:junit-jupiter 1.20.1
  • org.pitest:pitest 1.15.0
  • info.solidsoft.gradle.pitest:gradle-pitest-plugin 1.9.11
  • org.codehaus.sonar-plugins:sonar-pitest-plugin 0.5
  • com.github.hmcts:fortify-client 1.3.0
  • com.github.hmcts:document-management-client 7.0.1
  • org.flywaydb:flyway-core 8.5.13
  • com.zaxxer:HikariCP 5.0.1
  • com.vladmihalcea:hibernate-types-52 2.21.1
  • com.fasterxml.jackson.datatype:jackson-datatype-jsr310 2.15.2
  • org.postgresql:postgresql 42.7.2
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 7.6.4
helm-values
charts/wa-case-event-handler/values.yaml
helmv3
charts/wa-case-event-handler/Chart.yaml
  • java 5.2.1
terraform
infrastructure/main.tf
infrastructure/state.tf
  • azuread 2.53.1
  • azurerm ~> 3.0
infrastructure/versions.tf
  • hashicorp/terraform >= 1.3.4
terraform-version
infrastructure/.terraform-version
  • hashicorp/terraform 1.7.0

  • Check this box to trigger a request for Renovate to run again on this repository

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.