Unit 1: Managing Standard Car Models


A standard model defines the common characteristics of objects, often applicable to multiple projects. Therefore, domain experts must first create and maintain standard models. This tutorial uses managing a generic car model as an example to demonstrate the specific steps for preparing a standard model.


Operation Personnel

Operation Location

Domain Expert

Application Portal

Preparations


Before starting, domain experts must ensure the following:

  • Accounts have been assigned the required permissions. If permissions are not assigned, contact the system administrator.

  • They have obtained the model group required for the project. The model group for this tutorial is “Automobile Manufacturing”. If the group is not obtained, contact the system administrator to acquire the model group and its permissions.

Job 1: Predefining Model Elements


Devices transmit data with the cloud via model elements. In practice, domain experts should first identify the model elements that need to be referenced repeatedly and predefine these elements. In this job, car model and brand elements need to be predefined for reference in subsequent steps.

  1. In the Developer Console of the Application Portal, select Model Element Library.

  2. In the top-left corner, click Elements Created in This OU > Property > New Property. On the New Property page, configure the following information as prompted, then click Save.


Refer to the following information to configure the model elements that need to be predefined for this tutorial:


Type

Name

ID

Group

Data Types

Maximum Length

Description

Attribute

Model

type

Car

string

64 characters

Car Model Information

Attribute

Brand

brand

Car

string

64 characters

Car Brand Information

Job 2: Creating Components


In this job, you need to build models for the car’s wheels and body, and declare these models as components. These components will later be combined into the standard car model.

  1. In the Developer Console of the Application Portal, navigate to the Model Element Library, then go to Models Created in This OU > New Model in the top-left corner.

  2. Refer to the “Model Configuration” column to create models for the car’s wheels and body in the pop-up window, then complete the creation by clicking Create.

  3. In the list of custom models, click Edit on the right of the target model to enter the model editing page. In the model definition page, select New > Property.

  4. Refer to the “Model Element Configuration” column to create model elements in the pop-up window, then click Save.

  5. In the model list, click > Component on the right of the target model. Toggle the Set as Component switch and select OK.


Refer to the following information to configure the components that need to be created for this tutorial:


Car Parts

Model Configuration

Model Element Configuration

Car Wheel

  • Group: Automobile Manufacturing

  • Name: Wheel

  • Business Identifier: wheel

  • Model Purpose: Leave blank

  • Description: Car wheel

  • Type: Attribute

  • Name: Size

  • Identifier: size1

  • Data Type: string

  • Maximum length: 64 characters

Car Body

  • Group: Automobile Manufacturing

  • Name: Body

  • Business Identifier: body

  • Model Purpose: Leave blank

  • Description: Car body

  • Type: Attribute

  • Name: Size

  • Identifier: size2

  • Data Type: string

  • Maximum length: 64 characters

Job 3: Creating the Standard Model


In this job, create a standard model for generic cars. Define the car’s common properties and combine the components into the standard model.

Step 1: Creating New Standard Models

  1. In the Developer Console of the Application Portal, select Model.

  2. Click Models Created in This OU > New Model in the top left of the page and configure the model attributes as prompted, including:

    • Group: Automobile Manufacturing

    • Name: Car

    • Business ID: car

    • Model Purpose: Application Building, Device Integration

    • Description: Car Model

  3. Select Configure Model to enter the configuration page.

Step 2: Creating and Referencing Model Elements

  1. On the model definition page, select New > Property. In the pop-up window, set the following functions and click Save after completing the configuration.

    • Type: Attribute

    • Name: Power Type

    • ID: powertype

    • Data Type: enum

    • Enumeration Value Type: string

    • Enumeration Values: (Parameter value: parameter description)

      • hybrid: Hybrid power

      • electric: Pure electricity

    • Description: Power Type

  2. Click > Reference Property next to New. In the pop-up window, check the brand and model elements predefined in Job 1.

  3. Click Next > OK to save the referenced attributes.

Step 3: Referencing Components

  1. Click > Reference Component next to New on the model definition page.

  2. In the pop-up window, check the created components, modify the names and identifiers based on the following information, and click OK to save the components.



Note

In this tutorial, the wheel component is referenced 4 times to define the four wheels of the car.

Job 4: Configuring Model Views

In this job, domain experts configure the model views of the standard model in preparation for subsequent application development.

  1. On the configuration page of car model, select Model View > New View.

  2. In the pop-up window, enter the following information and click OK:

    • Name: Car Basic Information

    • ID: car_basic_information

  3. Click the Configure button_model button to the right of the view to enter the configuration page.

  4. Click the Add add button to the right of Sub-View, enter the following information in the pop-up window, and click OK:

    • Name: Default

    • ID: default

  5. Select Add Element. In the pop-up window, check the following properties and click OK:

    • Brand

    • Type

    • Size (Wheel)

    • Size (Body)

    • Power Type

Results

After completing the above jobs, you can view the following information for the car model on the model configuration page:

../_images/tutorial1.png
  • Model Elements: Brand, Type, Size, Power Type

  • Components: Body, Left Front Wheel, Right Front Wheel, Left Back Wheel, Right Back Wheel, DCM Device Integration Model (automatically configured by the system)

  • Model View: Car Basic Information