Chapter 24. Archetype management Business Central provides an archetype management feature that enables you to list, add, validate, set as default, and delete the archetypes. You can manage archetypes from the Archetypes page in Business Central. Archetypes are projects installed in Apache Maven repositories in which you can set or create a template structure if required. For the most up-to-date and detailed information about archetypes, see the Introduction to Archetypes page . 24.1. Listing archetypes The Archetypes page lists all the archetypes that are added in Business Central. This list provides the detailed information about Group ID , Artifact ID , Version , Created Date , Status , and Actions of an archetype. Prerequisites You have created an archetype and listed it in the Business Central Settings from the maven repository. Procedure In Business Central, select the Admin icon in the upper-right corner of the screen and select Archetypes . In the Status column, green icon indicates it is a valid archetype, red icon indicates it is an invalid archetype whereas blue icon indicates the corresponding archetype is the default one for the new spaces. 24.2. Adding an archetype You can add a new archetype to Business Central. Prerequisites You have installed an archetype in the Maven repository. Procedure In Business Central, select the Admin icon in the upper-right corner of the screen and select Archetypes . Click Add Archetype . In the Add Archetype panel, enter the GAV attributes in the Group ID , Artifact ID , and Version fields respectively. Click Add . Business Central validates the newly added archetype and make it available to be used as a template in all the spaces. 24.3. Managing additional features of an archetype You can delete, set a default, and validate the archetypes from the Archetypes page in Business Central. Prerequisites You have created an archetype and listed in the Business Central Settings from the Maven repository. Procedure In Business Central, select the Admin icon in the upper-right corner of the screen and select Archetypes . From the Actions column, click the icon on the right side of an archetype. Select Delete from the drop-down menu to delete an archetype from the list. Select Validate from the drop-down menu to validate whether the archetype is valid or not. Note When the Business Central is starting up, all the registered archetypes are automatically validated. Select Set as default from the drop-down menu to set an archetype as a default for the new spaces. 24.4. Creating a project using archetypes You can use archetypes to create a project in Business Central. When you create a project in Business Central, it is added to the Git repository that is connected to your Red Hat Decision Manager installation. Prerequisites You have created an archetype and listed it in the Business Central Settings from the Maven repository. You have set an archetype as default in your space in the Business Central. Procedure In Business Central, go to Menu Design Projects . Select or create the space into which you want to add a new project from an archetype template. Click Add Project . Type the project name and description in the Name and Description fields respectively. Click Configure Advanced Options . Select the Based on template check box. Select the archetype from drop-down options if required. The default archetype is already set in the space. Click Add . The Assets view of the project opens based on the selected archetype template. 24.5. Managing archetypes using space settings in Business Central When you add archetypes to Business Central, you can use them as templates in all the spaces. You can manage all the archetypes from the Settings tab, which is available in the space. This tab is visible only to users with the admin role. Prerequisites You have installed an archetype in the Maven repository. You have created an archetype and listed it in the Business Central Settings from the Maven repository. Procedure In Business Central, go to Menu Design Projects . Select or create the space into which you want to manage the archetypes. The default space is MySpace . Click Settings . To include or exclude the archetypes in the space, select the Include check box. From the Actions column, click the icon on the right side of an archetype and select Set as default from the drop-down menu to set an archetype as a default for the space. Click Save .

Commands: