Skip to content

Provides updated status information about cases in underlying systems

License

Notifications You must be signed in to change notification settings

Sundsvallskommun/api-service-case-status

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CaseStatus

Provides updated status information about cases in underlying systems, ensuring that users are always informed about the current state and progress of their cases.

Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone [email protected]:Sundsvallskommun/api-service-case-status.git
    cd api-service-case-status
  2. Configure the application:

    Before running the application, you need to set up configuration settings. See Configuration

    Note: Ensure all required configurations are set; otherwise, the application may fail to start.

  3. Ensure dependent services are running:

    If this microservice depends on other services, make sure they are up and accessible. See Dependencies for more details.

  4. Build and run the application:

    mvn spring-boot:run

Dependencies

This microservice depends on the following services:

  • CaseManagement
    • Purpose: Serves as link between clients and subsystems
    • Repository: Link to the repository
    • Setup Instructions: Refer to its documentation for installation and configuration steps.
  • Citizen
    • Purpose: To information about a citizen.
    • Repository: Not available at this moment.
    • Additional Notes: Citizen is a API serving data from Metadatakatalogen.
  • Open-e Platform
    • Purpose: This service retrieves messages from the Open-e Platform.
    • Repository: Open-ePlatform
    • Setup Instructions: Refer to its documentation for installation and configuration steps.
  • Party
    • Purpose: Translate partyId to legalId and reverse for both private citizens and businesses
    • Repository: Link to the repository
    • Setup Instructions: Refer to its documentation for installation and configuration steps.
  • SupportManagement
    • Purpose: Managages cases primarily related to support related subjects.
    • Repository: Link to the repository
    • Setup Instructions: Refer to its documentation for installation and configuration steps.

Ensure that these services are running and properly configured before starting this microservice.

API Documentation

Access the API documentation via Swagger UI:

Alternatively, refer to the openapi.yml file located in src/main/resources for the OpenAPI specification.

Usage

API Endpoints

Refer to the API Documentation for detailed information on available endpoints.

Example Request

curl -X GET http://localhost:8080/{municipalityId}/{externalCaseId}/oepstatus

Configuration

Configuration is crucial for the application to run successfully. Ensure all necessary settings are configured in application.yml.

Key Configuration Parameters

  • Server Port:

    server:
      port: 8080
  • Database Settings:

    spring:
      datasource:
        url: jdbc:mysql://localhost:3306/your_database
        username: your_db_username
        password: your_db_password
  • External Service URLs:

    integration:
      case-management:
        base-url: https://your_service_url/casemanagement
      citizen:
        base-url: https://your_service_url/citizen
      open-e:
        base-url: https://your_service_url/opene
        password: somePassword
        username: someUsername
      party:
        base-url: https://your_service_url/party
      support-management:
        base-url: https:/your_service_url/supportmanagement
    
    
    security:
      oauth2:
        client:
          provider:
            citizen:
              token-uri: https://token_url
            case-management:
              token-uri: https://token_url
            party:
              token-uri: https://token_url
            support-management:
              token-uri: https://token_url
          registration:
            citizen:
              client-id: the-client-id
              client-secret: the-client-secret
            case-management:
              client-id: the-client-id
              client-secret: the-client-secret
            party:
              client-id: the-client-id
              client-secret: the-client-secret
            support-management:
              client-id: the-client-id
              client-secret: the-client

Database Initialization

The project is set up with Flyway for database migrations. Flyway is disabled by default so you will have to enable it to automatically populate the database schema upon application startup.

spring:
  flyway:
    enabled: true
  • No additional setup is required for database initialization, as long as the database connection settings are correctly configured.

Additional Notes

  • Application Profiles:

    Use Spring profiles (dev, prod, etc.) to manage different configurations for different environments.

  • Logging Configuration:

    Adjust logging levels if necessary.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

License

This project is licensed under the MIT License.

Code status

Quality Gate Status Reliability Rating Security Rating Maintainability Rating Vulnerabilities Bugs


© 2024 Sundsvalls kommun

About

Provides updated status information about cases in underlying systems

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published