Skip to main content

Component Structure

Component​

A Component is a modular part of an ApplicationApplicationThe overarching model container grouping all components, domain logic, and configurations for an enterprise solution.. It can contain one or more Elements and will function as a namespace for the elements within that component.

Attributes​

  • name: just like ApplicationApplicationThe overarching model container grouping all components, domain logic, and configurations for an enterprise solution., a component requires a name that will be used in technical references (such as the schemaname of a database). See Naming conventions for the casing rule.
  • description: a descriptive text for the component.
  • version: the version of the component model.
  • applications: since a Component is a reusable module, it can technically be aggregated in different applicationsApplicationThe overarching model container grouping all components, domain logic, and configurations for an enterprise solution..
  • dataElements & taskElements: the elements the component contains.
  • componentDependencies: the ComponentDependencies of the component.

File location​

Components are located in the components directory.

project
├── conf
├── applications
└── components
├── invoicing
│ └── model
│ └── invoicing.xml
└── rental
└── model
└── rental.xml

Example​

<component name="invoicing">
<version>1.0.0</version>
</component>

ComponentDependency​

Elements within a component can refer to each other without limit. However, by default, elements from one Component are invisible to elements from another Component. By defining a ComponentDependency, you can give access to the elements from another Component.

Attributes​

  • dependsOn: the component whose elements become accessible, referenced by name.
Rules
  • Component dependencies are unidirectional: one component depends on another. The dependee does not know it is being depended on.
  • You cannot have any cycles of dependencies between components.

Example​

By adding this dependency, the Invoice element can retrieve information from a Booking element.

invoicing.xml
<component name="invoicing">
<version>1.0.0</version>
<componentDependencies>
<componentDependency>
<dependsOn name="rental"/>
</componentDependency>
</componentDependencies>
</component>