Inventory at risk due to fire and flood - IBM/intelligence-suite-supply-chain-solutions GitHub Wiki

As a supply chain management manager, I need a dashboard to help me measure the impact of weather at various warehouse locations so I can provide feedback and take action to my suppliers to recover costs and drive continuous improvement supply chain route planning.

This tutorial will show you how to develop a dashboard for viewing locations with related weather. We will display information on the center of the weather, and then monitor the information on the location of the warehouse affected by the weather. Also show affected stock products

Here are some sample screenshots of the expected output:

image


Prerequisites

This use case assumes you are familiar with implementing solutions in SCIS. You can find relevant tutorials for all of the instructions here in the User interface, Data platform, Data import-export and Produce quality use case tutorial wikis.

Note - these tutorials are provided as-is for educational purposes only. We do our best to make them fully useable, however there will be gaps as published. If you have suggestions for improvements please submit an issue.


Solution

Data model

In this use case we are going to use the ExternalEvent to represent a weather. One ExternalEvent business object indicates an ongoing or ended weather. Using Inventory business object to store the relation of inventory and product and location. An Inventory allows a product to be associated with an inventory location. We use the Product business object to record product information. We use the Location business object to record a location's information. We use the GeoCorrelationIssue business object to link between Location and ExternalEvent. A GeoCorrelationIssue allows to record a location associated with a weather.

Attributes

We will register an extended property isCurrentlyMeetingCorrelationCriteria = true to indicate that a location is currently affected by a weather, or otherwise. We will use the attributes locationName, locationIdentifier and some other attributes in Location. Use properties subject, areaCounty, country, stateProvince in ExternalEvent. We will use property forecastedEnd and start on which forecastedEnd >= nowTime && start <= nowTime to filter the ongoing weathers. We use the attribute includeInCorrelation=true to filter whether the impact of weather needs to be considered.

Calculations

While we could query the ExternalEvent directly and compare the Locaion's coordinates to its sphere of influence, it is better to create a new object to record the relationship between the ExternalEvent and Locaion that are associated. This will simplify the query and execute faster. To do this, we will register a new object GeoCorrelationIssue.


Steps

NOTE: In the following examples, you need to make suitable replacements for the following: <INSERT_YOUR_ORG_ID_HERE>, <INSERT_YOUR_TENANT_ID_HERE>,

  1. Load sample data
  2. Register rules
  3. Register work queues
  4. Create widgets
  5. Create pages
  6. Create dashboards
  7. Test on https://www.supply-chain.ibm.com/

Step 1. Load sample data

Step 2. Register rules

POST https://api.ibm.com/infohub/run/metadata/api/v1/na/derived/rules

Create GeoCorrelationIssue to correlate ExternalEvent (weather event) with locations

Step 3. Register work queues

POST https://api.ibm.com/infohub/run/metadata/api/v1/na/workqueues

Step 4. Create widgets

POST https://api.ibm.com/supplychainui/run/na/api/v1/wms/widget_definitions
POST https://api.ibm.com/supplychainui/run/na/api/v1/wms/subscriptions/subscribe

Dashboard widgets

Detail page widgets

View all widgets

Step 5. Create pages

POST https://api.ibm.com/supplychainui/run/na/api/v1/wms/layout_templates

View all pages

Detail pages

Step 6. Create dashboard

POST https://api.ibm.com/supplychainui/run/na/api/v1/wms/layout_templates

then POST https://api.ibm.com/supplychainui/run/na/api/v1/wms/subscriptions/subscribe

Subscription body should be of the form:


{
  "id": "<TEMPLATE_ID>_subscription",
  "offeringId": "SCO",
  "state": "ACTIVE",
  "subscriptionConfig": [],
  "tenantId": "<tenant_id>",
  "templateId": "<TEMPLATE_ID>"
}

Location advisories - dashboard-location-advisories-v2.json

image

⚠️ **GitHub.com Fallback** ⚠️