Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
All of the shared component groups have been created. The next stage is creating the unique component group of ThingTemplates. Each of the below sections will cover one ThingTemplate, how the final property configuration should look, and any other aspects that should be added. The breakdown for the unique component group ThingTemplates is as follows:
The properties for the RoboticArm ThingTemplate are as follows:
Name | Base Type | Aspects | Data Change Type |
TimeSincePickup | NUMBER, Min Value: 0 | Persistent and Logged | ALWAYS |
Axis1 | String | Persistent and Logged | VALUE |
Axis2 | String | Persistent and Logged | VALUE |
Axis3 | String | Persistent and Logged | VALUE |
ClampPressure | NUMBER, Min Value: 0 | Persistent and Logged | ALWAYS |
ClampStatus | String | Persistent and Logged | ALWAYS |
Your properties should match the below configurations.
The properties for the PneumaticGate ThingTemplate are as follows:
Name | Base Type | Aspects | Data Change Type |
GateStatus | String | Persistent and Logged | ALWAYS |
Your properties should match the below configurations.
The properties for the ConveyorBelt ThingTemplate are as follows:
Name | Base Type | Aspects | Data Change Type |
BeltSpeed | INTEGER, Min Value: 0 | Persistent and Logged | ALWAYS |
BeltTemp | INTEGER, Min Value: 0 | Persistent and Logged | ALWAYS |
BeltRPM | INTEGER, Min Value: 0 | Persistent and Logged | ALWAYS |
Your properties should match the below configurations.
The properties for the QualityControlCamera ThingTemplate are as follows:
Name | Base Type | Aspects | Data Change Type |
QualityReading | INTEGER, Min Value: 0 | Persistent and Logged | ALWAYS |
QualitySettings | String | Persistent and Logged | ALWAYS |
CurrentImage | IMAGE | Persistent and Logged | ALWAYS |
Your properties should match the below configurations.
Create a new Event named BadQuality. Select AlertStatus as the Data Shape. Your Event should match the below configurations:
For the Data Model we created, an individual DataTable would be best utilized for each products, production orders, and maintenance requests. Utilizing DataTables will allow us to store and track all of these items within our application. In order to have DataTables, we will need DataShapes to create the schema that each DataTable will follow. This database creation aspect can be considered a part of the Data Model design or a part of the Database Design. Nevertheless, the question of whether to create DataTables is based on the question of needed real time information or needed static information. Products, production orders, and maintenance requests can be considered static data. Tracking the location of a moving truck can be considered a need for real time data. This scenario calls for using DataTables, but a real time application will often have places where Streams and ValueStreams are utilized (DataShapes will also be needed for Streams and ValueStreams).
NOTE: The DataShapes (schemas) shown below are for a simplified example. There are different ways you can create your database setup based on your own needs and wants.
DataTable Name | DataShape | Purpose |
MaintenanceRequestDataTable | MaintenanceRequest | Store information about all maintenanced requests created |
ProductDataTable | ProductDataShape | Store information about the product line |
ProductionOrderDataTable | ProductionOrderDataShape | Store all information about production orders that have been placed |
The maintenance requests DataShape needs to be trackable (unique) and contain helpful information to complete the request. The DataShape fields are as follows:
Name | Base Type | Additional Info | Primary Key |
ID | String | NONE | YES |
Title | String | NONE | NO |
Request | String | NONE | NO |
CompletionDate | DATETIME | NONE | NO |
Unless you’ve decided to change things around, your DataShape fields should match the below configurations.
The product DataShape needs to be trackable (unique) and contain information about the product. The DataShape fields are as follows:
Name | Base Type | Additional Info | Primary Key |
ProductId | String | NONE | YES |
Product | String | NONE | NO |
Description | String | NONE | NO |
Cost | NUMBER | Minimum: 0 | NO |
Unless you’ve decided to change things around, your DataShape fields should match the below configurations.
The production order DataShape needs to be trackable (unique), contain information that would allow the operator and manager to know where it is in production, and information to help make decisions. The DataShape fields are as follows:
Name | Base Type | Additional Info | Primary Key |
OrderId | String | NONE | YES |
Product | InfoTable: DataShape: ProductDataShape | NONE | NO |
ProductionStage | String | NONE | NO |
OrderDate | DATETIME | NONE | NO |
DueDate | DATETIME | NONE | NO |
Unless you’ve decided to change things around, your DataShape fields should match the below configurations.
We have created the ThingTemplates and ThingShapes that will be utilized within our Data Model for creating instances (Things). Before we finish the build out of our Data Model, let's create the Services that will be necessary for the MaintenanceSystem and ProductionOrderSystem Things.
This guide will not cover the JavaScript and business logic aspect of creating an application. When complete with the below sections, see the Summary page for how to create that level of definition.
This is the system managed by the maintenance user and geared towards their needs.
The properties for the MaintenanceSystem Thing are as follows:
Name | Base Type | Aspects | Data Change Type |
MaintEngineerCredentials | PASSWORD | Persistent | VALUE |
Your properties should match the below configurations.
The Services for the MaintenanceSystem Thing are as follows:
Service Name | Parameters | Output Base Type | Purpose |
GetAllMaintenanceRequests | NONE | InfoTable: MaintenanceRequest | Get all of the maintenance requests filed for the maintenance user. |
GetFilteredMaintenanceRequests | String: TitleFilter | InfoTable: MaintenanceRequest | Get a filtered version of all maintenance requests filed for the maintenance user. |
UpdateMaintenanceRequests | String: RequestTitle | NOTHING | Update a maintenance request already in the system. |
Use the same method for creating Services that were provided in earlier sections. Your Services list should match the below configurations.
This is the system utilized by the operator and product manager users and geared towards their needs.
The Services for the ProductionOrderSystem Thing are as follows:
Service Name | Parameters | Output Base Type |
AssignProductionOrders | String: Operator, String: ProductOrder | NOTHING |
CreateProductionOrders | String: OrderNumber, String: Product, DATETIME: DueDate | NOTHING |
DeleteProductionOrders | String: ProductOrder | NOTHING |
GetFilteredProductionOrders | String: ProductOrder | InfoTable: ProductionOrder |
GetProductionLineList | NONE | InfoTable: ProductDataShape |
GetUnfilteredProductionOrders | NONE | InfoTable: ProductionOrder |
MarkSelfOperator | NONE | BOOLEAN |
UpdateProductionOrdersOP | String: ProductOrder, String: UpdatedInformation | NOTHING |
UpdateProductionOrdersPM | String: ProductOrder, String: UpdatedInformation | NOTHING |
Use the same method for creating Services that were provided in earlier sections. Your Services list should match the below configurations.
Complete the implementation of the Data Model shown below by creating the Thing instances of the ThingTemplates we have created. When finish, add more to the Data Model. Some ideas are below.
Ideas for what can be added to this Data Model:
# | Idea |
1 | Add users and permissions |
2 | Add Mashups to view maintenance requests, products, and production orders |
3 | Add business logic to the Data Model |
Congratulations! You've successfully completed the Data Model Implementation Guide.
This guide has given you the basic tools to:
The next guide in the Design and Implement Data Models to Enable Predictive Analytics learning path is Create Custom Business Logic.