Model Example
Consider a hypothetical company named Acme Mowers that sells and services residential riding lawn tractors. Acme Mowers is introducing a new line of smart and connected tractors and is using ThingWorx to build solutions for their customers and dealers. To accomplish this, they must start by creating a ThingWorx model of their new tractors.
Using Things, Thing Shapes, and Thing Templates, they can construct a complex model. For example, Acme Tractors can have Serial Number SN100M123 (Thing) that is an Economy Series Tractor (Thing Template) and an MSeriesTractor (Thing Template) that has a Fuel Pump Assembly, Mower Deck, and Tractor Engine (Thing Shapes).
These entities have properties (for example, TractorEngine has EngineHours, EngineTemperature, and MaxRPM), and their state changes may trigger events (for example, ChangeOilDate service and EngineOverheating alarm) that are handled by subscriptions.
The model can become more intricate when subsystems, assemblies, and components have separate life cycles, need to be tracked and analyzed independently, or have interchangeable options. For example, you can enhance the above model by adding a new property called Battery to the TractorEngine. By defining the Battery property type as a ThingName you can set the value of the property to a specific name of a Thing.
For example, you can add a BatteryShape Thing Shape, a TopTerminalBattery or SideTerminalBattery Thing Template, and finally the Things Size65TopTerminal or Size75TopTerminal. Depending on the battery installed for a given tractor engine, the Battery property value will be the name of appropriate battery Thing. Size75TopTerminal battery implements a TopTerminalBattery Thing Template which is composed of the BatteryShape Thing Shape.
BatteryShape becomes the relationship between your tractor and your battery.
Specific batteries can be tracked separately from the mower, so when batteries are changed, only their relationship with the engine needs to change.