Best Practices Validator Utility

Table pf Content

  1. Objective

  2. Overview

  3. Steps for Execution

  4. Example Configuration Settings for Each Domain

  5. Conclusion

  6. FAQ’s


Objective

Key objectives of this document: is to Automate process to validate if best practice has been applied or not.


Overview

The Best Practices Validator Utility is a tool designed to help ensure things are done the right way in various operations, such as handling files, managing FTP connections, naming things properly, and processing transactions.

Here's how it works in simple terms:

  1. Uses Configuration Files: The tool uses setup files that define how things should be done.

  2. Checks These Setups: It checks these setups by using an API (a way for programs to talk to each other).

  3. Records Results in Excel: The results of these checks are saved in an Excel file, making it easy for you to see what’s correct and what needs fixing.

In short, the utility helps keep everything organized and in line with best practices by automatically checking setups and providing easy-to-read results..


Steps for Execution

1. Download the Best Practices Validator Utility

  • Access the Best Practices Utility from the following link: Download Best Practices Utility.

  • Extract the BestPractices.zip file. The extracted folder will contain the following components:

    • Configuration.properties: The main configuration file for setting up the environment.

    • Activity-aliases-names.properties: A properties file containing activity alias names.

    • BestPracticeUtility.jar: The Java archive file for running the utility.


2. Configure the Properties File

Modify the configuration.properties file to set the necessary parameters:

  • Customer Information:

CUSTOMER_NAME: Set the name of the customer (e.g., Adeptia). USERNAME: The username for authentication (e.g., admin). PASSWORD: The password for authentication (e.g., indigo1). DOMAIN: The URL or IP of the domain (e.g., http://localhost).

Note : Inside the properties file, there are four utility conditions that need to be modified as per our requirements. Below are the details:


3. Configure File Event Validation Settings

The utility will validate the configuration of file events and log for any discrepancies.

Note: If a user wants to validate the File Events, they need to modify the following settings according to their validation requirements.

  • Open configuration.properties and configure the following options:

RUN_FOR_FILE_EVENT_VALIDATION: TRUE - Whether to run the utility for file event validation otherwise False. RECEIVER_EMAIL_IDS: TRUE - Indicates if receiver email IDs are required for events. TRIGGER_IN_SEQUENCE: TRUE - Indicates if events should trigger in sequence. EVENT_EXPIRY_DATE_TIME:  Specifies the expiry date for events (format: MM/DD/YYYY). EVENT_START_DATE_TIME:  Specifies the start date for events (format: MM/DD/YYYY). CHECK_MODIFIED: TRUE - Whether to enable CHECK_MODIFIED for events. POLLING_FREQUENCY:   The minimum polling frequency in seconds. STABLE_TIME:   The stable time in seconds. PROCESS_DUPLICATE_FILE: FALSE - Whether to process duplicate files for events. INCLUDE_DEFAULTER:TRUE - This  can be TRUE or FALSE default value is TRUE, TRUE will include all the events.

4. Configure FTP Event Validation Settings

The ftpEventBestPractice utility checks FTP event settings against specific rules, retrieves current settings via an API, compares them, and logs any differences in an Excel sheet, using color-coding to highlight them. FTP event configuration adheres to best practices by configuring the following:

     Note :  If a user wants to validate the FTP Events, they need to modify the following settings according to their validation requirements.

FTP Event Validation Settings:

RUN_FOR_FTP_EVENT_VALIDATION: TRUE - Whether to run the utility for FTP event validation. RECEIVER_EMAIL_IDS: TRUE - Indicates if receiver email IDs are required for FTP events. TRIGGER_IN_SEQUENCE: TRUE - Indicates if FTP events should trigger in sequence. EVENT_EXPIRY_DATE_TIME:  Specifies the expiry date for FTP events (format: MM-DD-YYYY). EVENT_START_DATE_TIME:  Specifies the start date for FTP events (format: MM-DD-YYYY). RUN_INITIAL_LOAD: FALSE - Whether to enable initial load check for FTP events. POLLING_FREQUENCY: 600 - The minimum polling frequency in seconds for FTP events. STABLE_TIME: 120 - The stable time in seconds for FTP events. PROCESS_DUPLICATE_FILE: FALSE - Whether to process duplicate files for FTP events. INCLUDE_DEFAULTER:TRUE -This  can be TRUE or FALSE default value is TRUE, TRUE will include all the events.

5. Naming Convention Validation

The namingConventionValidator utility checks if entity names and their dependencies follow set rules, logs any issues in an Excel sheet, and skips certain entities based on the provided settings.

The activity-aliases-names.properties file maps descriptive service names to their corresponding codes or abbreviations. This mapping helps in configuration management, validation, and data processing by providing a standardized way to reference different services and components.


6. Transaction Validation Settings

The transactionBestPractices utility retrieves transaction data from an API, checks if certain attributes (logging level, repository action, and log retention action) conform to best practices as defined in the provided properties file, and logs discrepancies in an Excel sheet. It includes utility methods for validation, date comparison, time string comparison, and Excel cell formatting to aid in the processing and documentation of the transactions.

Transaction Validation Settings:

 Save the properties file.


7. Execute the Best Practices Validator Utility

  • Open Command Prompt and navigate to the folder where the BestPracticeUtility.jar file is located.

  • Run the following command:

    Copy code

    java -jar BestPracticeUtility.jar

    Ensure that Java is installed and the path to Java is correctly set in your system's environment variables. Alternatively, you can navigate to the Java bin folder and execute the command from there.


8. Optional: Execute from Adeptia's JRE Bin Folder

For users who are running Adeptia, you can execute the utility from the JRE bin folder for optimized performance. Use the following command:

Copy code

D:\adeptia\AdeptiaConnect-3.7\ConnectServer\jre\bin

Run the utility from this location to ensure compatibility with the system's environment.


9. Review Validation Results

Upon completion, the utility will generate an Excel report containing the validation results. This file will be located in the folder where the utility was executed. The report will provide a detailed breakdown of any validation errors or warnings, allowing for corrective actions.


Example Configuration Settings for Each Domain

File Event Validation:

  • RUN_FOR_FILE_EVENT_VALIDATION: TRUE

  • EVENT_START_DATE_TIME: 08/01/2023

  • EVENT_EXPIRY_DATE_TIME: 08/31/2023

FTP Event Validation:

  • RUN_FOR_FTP_EVENT_VALIDATION: TRUE

  • POLLING_FREQUENCY: 600

  • STABLE_TIME: 120

Naming Convention Validation:

  • RUN_FOR_NAMING_CONVENTION: TRUE

  • EXCLUDED_ENTITIES: EDISchema

Transaction Validation:

  • RUN_FOR_TRANSACTION_VALIDATION: TRUE

  • loggingLevel: ERROR


Conclusion

By following the steps outlined in this document, users can efficiently execute the Best Practices Validator Utility to ensure that their system configurations conform to the required standards. The tool provides a comprehensive validation mechanism, ensuring that file events, FTP events, naming conventions, and transactions are set up correctly for optimal system performance.

Â