Create and manage structure objects

更新时间:
复制 MD 格式

A structure object is defined within an application service of a bounded context and serves as an input or output parameter for the service's methods. This topic describes how to create, edit, and delete structure objects.

Create a structure object

  1. Log in to BizWorks, in the select Platform drop-down list selected modeling Platform.

  2. Click the a7.pngicon or the text box in the upper-right corner of the page. From the drop-down list, click the name of the project that you want to view and click the Modeling tab. In the Modeling navigation bar, choose Technical Modeling > Bounding Context.

  3. On the Bounding Context page, click the name of the bounding context.

  4. In the navigation pane of the target bounded context, click Structure Object. On the Structure Object page, click New Structure Object.

  5. In the New Structure Object panel, configure the Basic Information. The form includes the Object name (required), Code (required, a combination of letters and digits that starts with an uppercase letter), Parent object (optional), and Description fields. Click Create.

    Parameter

    Description

    Object name

    A custom name for the structure object.

    Code

    A unique combination of letters and digits within the bounded context. It must start with an uppercase letter and be no more than 80 characters long.

    Parent object

    From the Parent Object drop-down list, select the target parent object.

    Note

    To avoid errors during service orchestration, do not select a parent object that would cause a circular inheritance.

    Description

    Enter an optional description for the structure object.

  6. On the Fields tab, click Add to define the fields. The parameters include Field name, Code, Data type, and Description. For example, you can add a field with Field name set to String1, Code set to s01, and Data type set to String.

    Parameter

    Description

    Field name

    A custom name for the field of the structure object.

    Code

    A unique combination of letters and digits within the structure object. It must start with a lowercase letter and be no more than 80 characters long.

    Data type

    Select a value from the drop-down list:

    • Primitive type: String, Integer, Boolean, and so on.

    • Collection type: List<primitive type or structure object code>, Set<primitive type or structure object code>, and Map<primitive type or structure object code>.

    • Object type: A structure object that has been created and saved in the current bounded context.

      Important

      To select the structure object that you are currently creating, you must first click Create after you configure its basic information. Then, click Edit in the Actions column for the object.

    • New Structure Object: You can create a new structure object and use it as the data type for the field.

  7. Optional: Click the Structure Preview tab to preview the object's structure. The preview includes the child object ChildDTO, which contains the parentName (String) and childName (String) fields.

    Note

    If a parent object is set for the structure object, all fields from the parent object are visible on the Structure Preview tab.

  8. Click Create in the lower-left corner of the New Structure Object panel to save the configuration. You can then view, edit, or delete the structure object in the structure object list.

    Table 1. Structure object generation rules and examples

    Property

    Generation format

    Example

    Notes

    Structure object name

    Data model name

    Order

    None

    Structure object code

    Data model code + DTO

    SalesOrderDTO

    None

    Parent object

    None

    None

    By default, an object generated from a data model does not have a parent object.

    Structure object description

    None

    None

    The description field is empty for new structure objects. If you overwrite an existing structure object, its description remains unchanged.

Edit a structure object

  1. In the structure object list, click the name of the target object or click Edit in the Actions column for that object.

  2. In the Edit Structure Object panel, modify the configuration information.

    Note

    Only structure objects of the platform type can be edited. Structure objects of the code and fake types cannot be edited; they can only be deleted.

  3. Click Save.

Delete a structure object

  1. In the structure object list, click Delete in the Actions column for the target object.

  2. In the confirmation dialog box, click Delete.