--- alias: tutorials-name-generator-creatingentitymao timetoread: true hide: - toc description: "This documentation explains creating Maintenance Activity Orders (MAOs) using custom name generators within a configuration system" --- # Creating an Entity - MAO CM MES provides a default **Name Generator** for the creation of a **Maintenance Activity Order (MAO)** with the `MaintenanceActivityOrder` configuration: ![Screenshot showing a UI with an incomplete or illegible input field labeled "A Cant grata =".](../images/mao_01.png) This **Name Generator**, called `MaintenanceActivityOrderNameGenerator`, simply provides a number, through an Absolute Counter, which can be very limited as to the information contained in the name of the entity. Below is an image of the said generator: ![Screenshot showing a user interface for creating an entity, specifically a Name Generator, within the MAO system.](../images/mao_02.png) Therefore, the starting point here would be to create a **Name Generator** that is more complete and will provide more information in the name that is generated. For the purpose of this tutorial, the following **Name Generator** was created: ![Screenshot showing a step in creating an entity within the MAO system, with a focus on generating names.](../images/mao_03.png) The configured tokens will be reflected in the new entity name. Moreover, the newly created **Name Generator**, `MAONameGenerator`, was subsequently edited into the applicable configuration: ![Screenshot showing a UI with a form or input field labeled "Name Generator" and related fields, possibly including "Cant yearon" and "Ben".](../images/mao_04.png) So, when you associate a Maintenance Plan to a **Resource**, the system will create a **Maintenance Plan Instance** for this **Resource**, and therefore a **MAO** will be created for each Maintenance Activity. This **MAO** will receive the **Name Generator** that was set in the configuration. In this example we have **MAOs** created with the `MaintenanceActivityOrderNameGenerator` in which we only have a number for the **MAO**: ![Screenshot showing a maintenance plan instance creation process.](../images/mao_05.png) However, when we use the newly created **Name Generator**, `MAONameGenerator`, the result we have in the **Name** column follows the configured tokens used above: ![Screenshot showing a Maintenance Activity Order (MAO) creation interface.](../images/mao_06.png) The created **Name Generator** was put into action and generated a new name with a date, name, and a counter. This entity was created according to the **Name Generator** that was defined in the configuration, in this specific example, a **MAO**. Furthermore, the use of the newly created `MAONameGenerator` in contrast to the default `MaintenanceActivityOrderNameGenerator` can clearly be seen in the **MAO** page: ![Screenshot showing a system configuration for an entity named "Mamenaree Aeemiy Order" in MAO.](../images/mao_07.png) !!! note With any created entity that has a system configuration, there will be a Name Generator associated to it, which you can use or you can create your own, and edit the configuration to this effect. Now you should continue, and read the [[tutorials-name-generator-integration]] use case.