Manage Components


Components are reusable models. When a model is reused across multiple business scenarios, it can be abstracted into a reusable component. This allows other models to directly reference the component, inheriting all elements within it without needing to redefine the same model elements. When a component needs to be updated, you only need to modify the component itself, and all models referencing it will automatically update. This simplifies model maintenance and iteration.


For example, define a Location model and open as component. The Location model contains general location attributes, such as Address, Latitude, and Longitude. When other models reference this component, they can directly reuse these general location attributes without needing to redefine or update them.


This file explains how to create and manage components.

Prerequisites


  • Before making an open model as component or referencing a component in a model, ensure you have editing permissions for the model group. For more information, refer to Model Management Permission Allocation.

  • Before referencing components from other groups, ensure that the component has been shared with the current OU.

Open Model as Component


  1. Log in to the EnOS application portal and navigate to the Model menu in the Developer Console.

  2. In the Model list, select the target model, then click … > Component on the right, and toggle the Open as Component switch.

  3. After enabling, you must choose Whether to Allow Modifying Identifiers When Referenced.

    • Yes, Allow Modifying Identifiers: After being referenced, a component can have a new identifier defined within the model. A model can reference the same component multiple times.

    • No, Keep Identifiers Unchanged: After being referenced by the model, the component’s identifier cannot be modified, making it easier to locate the component’s elements using a fixed identifier. A model can only reference this component once.


Note

  • If a model is already opened as a component, it cannot reference other components.

  • Once a component is referenced by other models, it cannot be unopened as a component.

  • If a parent model is not opened as a component, its child models cannot be published as components.

  • When a parent model is opened as a component, newly created child models are also automatically published as components.

  • When a parent model references a component, its child models automatically inherit the component’s elements without needing to add the component again.

Reference Component


  1. Log in to the EnOS application portal and navigate to the Model menu in the Developer Console.

  2. In the Model list, click the Edit button for the target model.

  3. Next to the Create button in the Model Definition section, click … > Reference Component to open a pop-up window.

  4. In the pop-up window, select a component and configure the component’s Name and Identifier. Whether identifiers can be modified depends on the custom settings specified when Open Model as Component.


../../_images/reference_component.png


After referencing a component, it will appear in the Component list on the left. You can view, edit, or add new components.


../../_images/component_successfully.png

Results


After referencing a component, its elements are automatically added to the model’s element list. The identifiers follow the format: “Component Identifier: Element Identifier”. You can view these elements in the list.


../../_images/component_element.png