# Training Use Case

The course is designed to follow a use case development and introducing the concepts of Kumologica in gradual fashion.

# Requirement

A mobile app needs a feature to provide the users with the current weather condition and some simple safety advice based on it. The weather condition will be shown based on the user location.

For this requirement the mobile app needs a backend service (Weather risk reporting service) which will be invoked on a regular time interval. The service will be connecting with an external weather api provider to in order to get the current weather data. Based on the weather status the service will send appropriate safety advice as a response back to the app.

Training Use Case

# Flow logic

Below is the outline of the logic that we will be implementing for Weather risk reporting service.

Training Use Case

  1. Receive the location (zip code and country short code) as query parameter. Eg : 2135,au.
  2. Log the request.
  3. Invoke the weather API by passing the location zip code.
  4. Check the status value from the weather API response.
    • If the status is misty then map the response with the following advice. Drive carefully. Check your wiper and AC is in good condition.
    • If the status is foggy then map the response with the following advice.
      Drive carefully. Use fog lights.
    • If the status is clear then map the response with the following advice. Good day to plan for a trip.
    • If the status is invalid then map the response with the following advice. Not available