Unit 1: Manage the Standard Model for Cars


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: Predefine 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 Custom Elements > Features > Create Features. On the Create Feature 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

Identifier

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: Create Component


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 Custom Models > Create 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 Add > Feature.

  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 Open as Component switch and select Confirm.


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: Create the Standard Model


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

Step 1: Create a New Standard Model

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

  2. Click Custom Model > Create Model in the top left of the page and configure the model attributes as prompted, including:

    • Group: Automobile Manufacturing

    • Name: Car

    • Business Identifier: car

    • Model Purpose: Application Building, Device Integration

    • Description: Car Model

  3. Select Configure Model to enter the configuration page.

Step 2: Create and Reference Model Elements

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

    • Type: Attribute

    • Name: Power Type

    • Identifier: 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 Feature next to Create. In the pop-up window, check the brand and model elements predefined in Job 1.

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

Step 3: Reference Components

  1. Click > Reference Component next to Create 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 Confirm 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: Configure 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 Views > Created View.

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

    • Name: Car Basic Information

    • Identifier: 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 Confirm:

    • Name: Default

    • Identifier: default

  5. Select Add Elements. In the pop-up window, check the following features and click Confirm:

    • 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