Previous Next JavaScript must be enabled to correctly display this content

## 3.2 Maintenance Sub Domain Service

This topic describes the process to generate the Maintenance Sub Domain Service.

Maintenance service generally has concept of main and worktable. This allows enables functionality where all the Authorized records goes to main table and all the unauthorized records goes to worktable. Also, with this type of service we attach audit details to payload.

To generate the maintenance type of service, follow the below steps:

1. Navigate to same extension_home folder using cmder.
2. Use the command obx service mn -c.

   Figure 3-7 OBX Command

   Description of "Figure 3-7 OBX Command "
3. Once this command is fired, this will take user to next section where it will prompt other set of questions. Answer them accordingly to user setup and requirement.

   Figure 3-8 OBX Setup

   Description of "Figure 3-8 OBX Setup"
4. Once all the questions are answered and path of XDL is given, it will generate a folder inside the extension_home folder.

   Figure 3-9 Extension Home Folder

   Description of "Figure 3-9 Extension Home Folder"
5. Select the option based on user requirement for question: Do user want to create a Maintenance and Summary Components for this service? (Y/n).
6. For building the service go into the service folder from cmder and run the command gradle clean build.
7. This will build the service and we can find the war of the service getting created inside the build/libs directory.

   Figure 3-10 Lib's Directory

   Description of "Figure 3-10 Lib's Directory"
8. Use this service and deploy it in user environment.

Note:

- DB scripts for the service will be generated inside the folder: \extension_home\obxcustomerservice\src\main\resources\db
- Compile the Entity script in the entity schema created for extensions only.
- Service created as part of extension should be deployed in separate domain and should not be mixed or co-deployed with any other product specific services.
- Here Security Management System (SMS) scripts are also generated. \extension_home\obxcustomer-service\src\main\resources\db\sms
- As part of sqlcl make sure to check the placeholders keys in sqlclconfig.properties file in db->properties folder.
- Execute the SMS script in sms schema, here we only generate the functional activity of service. Assigning to proper role should be done according to the steps mentioned in base application.

Parent topic: Service Extensions