3.9 Field Config Service

This topic provides the systematic instructions to Field Config Service.

This service will be used to:
  • Hiding fields from screen .
  • Defaulting values on screen .
  • Disable field.
  • Making Non-mandatory field Mandatory

This section describes the process to generate Field config service. The purpose of this service is to hide/show, disable/enable fields, defaulting values for fields and making non mandatory fields mandatory according to configurations provided in OBX_TM_FIELD_CONFIG_MASTER table. To generate it please follow the below steps:

  1. Navigate to same extension_home folder using cmder.
  2. Use the command obx service fc -c.
  3. Inputs to be given after the command.  
  4. Select the product family.
  5. Enter name of the service-> fieldconfig (I'll construct it as <productFamilyName>-batch<serviceName>extended-services):
  6. Enter product release version.
  7. Upon successful creation of service, user will find a folder generated with service code generated.
  8. Locate the CONFIG folder in db folder replace the values of eureka.client.serviceUrl.defaultZone and server.port insert configuration for properties table in CONFIG_SCRIPT.sql and SMS_TM_ROLE_ACTIVITY entry in ROLE_ACTIVITY.sql file appropriately.
  9. In \resources\db\properties folder please find the sqlclconfig.properties file and check if placeholders exist in your setUserOverride.sh file
  10. Build the file using command: 
    gradle clean build -Dartifact_version=10.1.0 -Drelease_version=25_1_0 -Dstage=release

    Note:

    Please do not change the name of the war file generated.
  11. Run the db zip folder generated using sqlcl deployer.
  12. Deploy the service. Maintain the configuration in the **OBX_TM_FIELD_CONFIG_MASTER** table for any fields whose behavior you wish to change.
  13. Maintain Y/N value for VISIBLE, ENABLE, MANDATORY field and put string input for DEFAULT_VALUE
  14. In use case where you want to hide the fields from existing screen, always check whether the field is mandatory or not. If it is mandatory, then it should set before making it hidden on the screen. If not done so service calls make break.
  15. Make sure for the cca for which youre trying to change field behaviour has the commonUtil.applyFieldConfig(context); call in self.bindingsApplied method.