Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 17 Next »

  1. Create a Solution DB and Tables

  2. Design Process flow

  3. Create REST Provider End-point

  4. Publish the Provider (REST URL) at UI

1. Design Solution DB

Overview

In this use case, data is stored in the Solution DB. The data retrieval involves writing a joining query to fetch the necessary information from the backend. The query will be based on the attributes required for the UI, such as File Phase, Error Description, Total Record Count, Unique Record Count, Duplicate Record Count, and File Status.

Database Structure

The tables in the Solution DB should be structured to efficiently support these queries. Here is an example schema:

image-20240621-074745.pngimage-20240621-074823.pngimage-20240621-074900.png
  1. Creating a Solution Database using the following query:

 file_name_details

CREATE TABLE `file_name_details` (

  `ID` int NOT NULL AUTO_INCREMENT,

  `FILE_QUEUE_ID` int NOT NULL,

  `LOCATION_TYPE` varchar(50) NOT NULL,

  `FILE_TYPE` varchar(50) NOT NULL,

  `FILE_PATH` varchar(500) NOT NULL,

  `FILE_NAME` varchar(400) DEFAULT NULL,

  `CREATED_BY` varchar(50) NOT NULL,

  `CREATED_DATE` datetime NOT NULL,

  `LAST_MODIFIED_BY` varchar(50) NOT NULL,

  `LAST_MODIFIED_DATE` datetime NOT NULL,

  PRIMARY KEY (`ID`),

  UNIQUE KEY `UC_FILE_ATT` (`FILE_QUEUE_ID`,`FILE_NAME`,`FILE_TYPE`,`LOCATION_TYPE`),

  CONSTRAINT `file_name_details_ibfk_1` FOREIGN KEY (`FILE_QUEUE_ID`) REFERENCES `file_queue` (`ID`)

) ENGINE=InnoDB AUTO_INCREMENT=7676 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

 error_code

CREATE TABLE `error_code` (

  `ID` int NOT NULL AUTO_INCREMENT,

  `ERROR_CODE` varchar(10) NOT NULL,

  `ERROR_MESSAGE` varchar(255) NOT NULL,

  `PHASE_ID` varchar(10) NOT NULL,

  PRIMARY KEY (`ID`),

  UNIQUE KEY `UC_ERROR_CD` (`ERROR_CODE`),

  KEY `PHASE_ID` (`PHASE_ID`),

  CONSTRAINT `error_code_ibfk_1` FOREIGN KEY (`PHASE_ID`) REFERENCES `phase` (`ID`)

) ENGINE=InnoDB AUTO_INCREMENT=104 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

 application_data

CREATE TABLE `application_data` (

  `ID` int NOT NULL AUTO_INCREMENT,

  `FILE_QUEUE_ID` int NOT NULL,

  `APPLICATION_TYPE` varchar(50) DEFAULT NULL,

  `RECORD_STATUS` varchar(50) DEFAULT NULL,

  `ERROR_MESSAGE` varchar(2000) DEFAULT NULL,

  `WARNING_MESSAGE` varchar(2000) DEFAULT NULL,

  `SSN` varchar(20) DEFAULT NULL,

  `EMPLOYEE_ID` varchar(20) DEFAULT NULL,

  `EMPLOYEE_FIRST_NAME` varchar(200) DEFAULT NULL,

  `EMPLOYEE_LAST_NAME` varchar(200) DEFAULT NULL,

  `COVERAGE_ID` varchar(50) DEFAULT NULL,

  `PRODUCT_TYPE_CODE` varchar(50) DEFAULT NULL,

  `GROUP_POLICY_NUMBER` varchar(50) DEFAULT NULL,

  `BENEFIT_PLAN_IDENTIFIER` varchar(50) DEFAULT NULL,

  `CREATED_BY` varchar(50) NOT NULL,

  `CREATED_DATE` datetime NOT NULL,

  `LAST_MODIFIED_BY` varchar(50) NOT NULL,

  `LAST_MODIFIED_DATE` datetime NOT NULL,

  `BENEFIT_CLASS_IDENTIFIER` varchar(50) DEFAULT NULL,

  `MASTER_AGREEMENT_NUMBER` varchar(50) DEFAULT NULL,

  `EMPLOYEE_MIDDLE_NAME` varchar(50) DEFAULT NULL,

  `EMPLOYEE_SUFFIX_CODE` varchar(50) DEFAULT NULL,

  `EMPLOYEE_BIRTH_DATE` varchar(50) DEFAULT NULL,

  `EMPLOYEE_GENDER_CODE` varchar(50) DEFAULT NULL,

  `EMPLOYEE_MARITAL_STATUS_CODE` varchar(50) DEFAULT NULL,

  `EMPLOYEE_HOME_PHONE` varchar(50) DEFAULT NULL,

  `EMPLOYEE_EMAIL` varchar(50) DEFAULT NULL,

  `EMPLOYEE_ALTERNATE_EMAIL` varchar(50) DEFAULT NULL,

  `EMPLOYEE_MAILING_ADDRESS_FIRST_LINE_ADDRESS` varchar(100) DEFAULT NULL,

  `EMPLOYEE_MAILING_ADDRESS_THIRD_LINE_ADDRESS` varchar(100) DEFAULT NULL,

  `EMPLOYEE_MAILING_ADDRESS_CITY_NAME` varchar(50) DEFAULT NULL,

  `EMPLOYEE_MAILING_ADDRESS_STATE_PROVINCE_CODE` varchar(50) DEFAULT NULL,

  `EMPLOYEE_MAILING_ADDRESS_POSTAL_CODE` varchar(50) DEFAULT NULL,

  `EMPLOYEE_MAILING_ADDRESS_COUNTRY_CODE` varchar(50) DEFAULT NULL,

  `EMPLOYEE_IDENTIFIER` varchar(50) DEFAULT NULL,

  `EMPLOYEE_TOBACCO_USECODE` varchar(50) DEFAULT NULL,

  `EMPLOYEE_WORK_ADDRESS_STATE_PROVINCE_CODE` varchar(50) DEFAULT NULL,

  `EMPLOYMENT_INFORMATION_EMPLOYMENT_STATUS_CODE` varchar(50) DEFAULT NULL,

  `EMPLOYMENT_INFORMATION_EMPLOYMENT_TYPE_CODE` varchar(50) DEFAULT NULL,

  `EMPLOYMENT_INFORMATION_ORIGINAL_HIRE_DATE` varchar(50) DEFAULT NULL,

  `EMPLOYMENT_INFORMATION_MOST_RECENT_HIRE_DATE` varchar(50) DEFAULT NULL,

  `EMPLOYMENT_INFORMATION_ADJUSTED_SERVICE_DATE` varchar(50) DEFAULT NULL,

  `EMPLOYMENT_INFORMATION_TERMINATION_DATE` varchar(50) DEFAULT NULL,

  `EMPLOYMENT_INFORMATION_JOB_TITLE_TEXT` varchar(50) DEFAULT NULL,

  `EMPLOYMENT_INFORMATION_OCCUPATION_TEXT` varchar(400) DEFAULT NULL,

  `EMPLOYMENT_INFORMATION_PAYROLL_FREQUENCY_QUANTITY` varchar(50) DEFAULT NULL,

  `EMPLOYMENT_INFORMATION_EXEMPT_CODE` varchar(50) DEFAULT NULL,

  `EMPLOYMENT_INFORMATION_UNION_INDICATOR` varchar(50) DEFAULT NULL,

  `EMPLOYMENT_INFORMATION_WORK_LOCATION_TEXT` varchar(50) DEFAULT NULL,

  `EMPLOYMENT_INFORMATION_WORK_STATE_CODE` varchar(50) DEFAULT NULL,

  `COVERAGE_BENEFIT_SUBCLASS_IDENTIFIER` varchar(50) DEFAULT NULL,

  `COVERAGE_COVERAGERIDER_RIDEROPTION_IDENTIFIER` varchar(50) DEFAULT NULL,

  `COVERAGE_BILL_GROUP_IDENTIFIER` varchar(50) DEFAULT NULL,

  `COVERAGE_BILL_SUB_GROUP_IDENTIFIER` varchar(50) DEFAULT NULL,

  `COVERAGE_TIER_CODE` varchar(50) DEFAULT NULL,

  `COVERAGE_EFFECTIVE_DATE` varchar(50) DEFAULT NULL,

  `COVERAGE_TERMINATION_DATE` varchar(50) DEFAULT NULL,

  `COVERAGE_BENEFIT_AMOUNT` varchar(50) DEFAULT NULL,

  `DEPENDENT_TOBACCO_USECODE` varchar(50) DEFAULT NULL,

  `DEPENDENT_FIRST_NAME` varchar(50) DEFAULT NULL,

  `DEPENDENT_LAST_NAME` varchar(50) DEFAULT NULL,

  `DEPENDENT_BIRTH_DATE` varchar(50) DEFAULT NULL,

  `DEPENDENT_GENDER_CODE` varchar(50) DEFAULT NULL,

  `DEPENDENT_RELATIONSHIP_TYPE_CODE` varchar(50) DEFAULT NULL,

  `DEPENDENT_BENEFIT_AMOUNT` varchar(50) DEFAULT NULL,

  `EVENT_DATE` varchar(50) DEFAULT NULL,

  `EVENT_TYPE_REASON_CODE` varchar(50) DEFAULT NULL,

  `EVENT_TYPE_CODE` varchar(50) DEFAULT NULL,

  `EMPLOYEE_POSITION` varchar(50) DEFAULT NULL,

  `POLICY_PRODUCTID_CLASS_POSITION` varchar(50) DEFAULT NULL,

  PRIMARY KEY (`ID`),

  KEY `idx_file_queue_id` (`FILE_QUEUE_ID`),

  CONSTRAINT `fk_grade_id` FOREIGN KEY (`FILE_QUEUE_ID`) REFERENCES `file_queue` (`ID`)

) ENGINE=InnoDB AUTO_INCREMENT=426019 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

 phase

CREATE TABLE `phase` (

  `ID` varchar(10) NOT NULL,

  `PHASE_NAME` varchar(50) NOT NULL,

  `CREATED_BY` varchar(50) NOT NULL,

  `CREATED_DATE` datetime NOT NULL,

  `LAST_MODIFIED_BY` varchar(50) NOT NULL,

  `LAST_MODIFIED_DATE` datetime NOT NULL,

  PRIMARY KEY (`ID`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

 solution_configuration

CREATE TABLE `solution_configuration` (

  `ID` int NOT NULL AUTO_INCREMENT,

  `CATEGORY` varchar(50) NOT NULL,

  `PROPERTY_NAME` varchar(50) NOT NULL,

  `PROPERTY_DEFAULT` varchar(50) DEFAULT NULL,

  `PROPERTY_VALUE` varchar(50) DEFAULT NULL,

  `PROPERTY_ORDER` int DEFAULT NULL,

  `ACTIVE_FLAG` varchar(10) NOT NULL,

  `CREATED_BY` varchar(50) NOT NULL,

  `CREATED_DATE` datetime NOT NULL,

  `LAST_MODIFIED_BY` varchar(50) NOT NULL,

  `LAST_MODIFIED_DATE` datetime NOT NULL,

  `TRANSACTION_NAME` varchar(50) DEFAULT NULL,

  PRIMARY KEY (`ID`)

) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

 transaction_run_history

CREATE TABLE `transaction_run_history` (

  `ID` bigint NOT NULL AUTO_INCREMENT,

  `transactionId` varchar(100) NOT NULL,

  `transactionType` varchar(500) DEFAULT NULL,

  `transactionName` varchar(500) DEFAULT NULL,

  `partner` varchar(400) DEFAULT NULL,

  `inputFile` varchar(500) DEFAULT NULL,

  `inputFilePath` varchar(500) DEFAULT NULL,

  `sourceSystemOutputFile` varchar(500) DEFAULT NULL,

  `sourceSystemOutputFilePath` varchar(500) DEFAULT NULL,

  `adeptiaOutputFile` varchar(500) DEFAULT NULL,

  `adeptiaOutputFilePath` varchar(500) DEFAULT NULL,

  `deltaReportFile` varchar(500) DEFAULT NULL,

  `deltaReportFilePath` varchar(500) DEFAULT NULL,

  `status` varchar(100) DEFAULT NULL,

  `executedBy` varchar(500) DEFAULT NULL,

  `executionDate` varchar(50) DEFAULT NULL,

  `submittedBy` varchar(100) DEFAULT NULL,

  `matchPercent` varchar(50) DEFAULT NULL,

  `processInstanceID` varchar(50) DEFAULT NULL,

  PRIMARY KEY (`ID`)

) ENGINE=InnoDB AUTO_INCREMENT=1705672808620 DEFAULT CHARSET=latin1;

2. Design Process flow

Overview

When the file queue page is accessed, the backend server performs specific steps to ensure that all relevant file queue data is accurately retrieved and displayed on the front end. There are three primary flows, each with a distinct purpose. Once designed, these flows need to be published for the REST provider.

Process Overview

When the file queue page is accessed, the backend server performs the following steps to ensure that all relevant file queue data is accurately retrieved and displayed on the front end. Here are three flows working and each flow has a purpose.

image-20240620-115215.png

Once the flow has been designed, it needs to be published for the REST provider.

image-20240621-060942.png

a. Default Flow: Retrieve All File Information

Process Steps

Step 1: Receive Request

  • Action: The backend server receives a request from the frontend to access the file queue page.

  • Trigger: Initiates the process of retrieving necessary file queue data.

Step 2: Query the Database

  • Action: The backend server queries the database to retrieve all relevant information.

  • Data Retrieved: File Phase, Error Descriptions, Total Record Count, Unique Record Count, Duplicate Record Count, File Status.

Step 3: Send Data to Frontend

  • Action: The backend sends the retrieved data to the front end.

  • Outcome: The frontend displays the data, providing users with a comprehensive view of the file queue status and details.

image-20240620-113900.png

Process flow activity:

  1. Source Activity - The source comprises a database. It is necessary to create DbInfo and DbLayout to be invoked in the source activity

image-20240621-071343.png

To efficiently retrieve attributes from multiple tables and display relevant information on the user interface, you must utilize the EDIT Query option. Additionally, you implement conditions to filter the data as needed.

image-20240621-073355.png

Table Name: SQL Query

SELECT FQ.ID,FQ.PARTNER_NAME,FQ.TRANSACTION_TYPE,FQ.FILE_REF_ID,FQ.PHASE,FQ.OVERALL_STATUS,FQ.ERROR_CODE,FQ.INCOMING_FILE_DATE,FQ.TOTAL_RECORDS,FQ.DUPLICATE_RECORDS,FQ.UNIQUE_RECORDS,FQ.GROUP_ID,FQ.V3_GROUP_ID,FQ.V3_PHASE,FQ.V3_STATUS,FQ.V3_TOTAL_RECORDS,FQ.V3_GOOD_RECORDS,FQ.V3_ERROR_RECORDS,FQ.V3_PASS_PERCENTAGE,FQ.V3_ERROR_MESSAGE,FQ.CORE_PHASE,FQ.CORE_STATUS,FQ.CORE_TOTAL_RECORDS,FQ.CORE_GOOD_RECORDS,FQ.CORE_ERROR_RECORDS,FQ.CORE_PASS_PERCENTAGE,FQ.CORE_ERROR_MESSAGE,FQ.CREATED_BY,FQ.LAST_MODIFIED_BY,FQ.LAST_MODIFIED_DATE,FND.FILE_NAME,FND.CREATED_DATE,ER.ERROR_MESSAGE,FQ.TRANSACTION_NAME FROM file_queue FQ LEFT JOIN file_name_details FND on FND.FILE_QUEUE_ID=FQ.ID LEFT JOIN error_code ER on FQ.ERROR_CODE=ER.ERROR_CODE

Where Clauses:

WHERE FND.FILE_TYPE='INPUT_FILE' and DATE_SUB(NOW(), INTERVAL 30 DAY) < FND.CREATED_DATE ORDER BY FQ.ID DESC

  1. Target Layout - The JSON schema for the source data (database) will be designed to be utilized in the RESTful API for the user interface. JSON is selected for its compatibility with RESTful APIs.

image-20240621-072506.png

  1. Mapping - You are required to load the database schema and the target schema (JSON) to finalize the mapping process.

image-20240621-072358.png
  1. Context Target -The target will be ContextTarget to store data in the flow for the REST provider.

image-20240621-072858.png

b.Search Flow: Search by Filename & Transaction Id

This flow process is for searching specific file information within the system. It enables how the user initiates the search, the interactions between the front end and back end, and the final display of the filtered results to the user.

image-20240620-115506.png

Process Overview

The search process for file information involves several key steps, starting from user initiation to the final display of search results. The following sections detail each step in the process.

Process Steps

Step 1: User Initiates Search

  • Action: The user initiates a search for specific file information.

  • Interface: The search is conducted using a search bar or input field on the file queue page or a dedicated search interface.

image-20240620-120055.png

Step 2: Frontend Sends Request

  • Action: The frontend application captures the user's search query.

  • Request: The search query is encapsulated in a request and sent to the backend server for processing.

  • Data Sent: The request typically includes the search term(s) and any additional filters or parameters specified by the user.

Step 3: Backend Searches File Queue Data

  • Action: Upon receiving the request, the backend server initiates a search operation.

  • Database Query: The backend performs a query on the file queue data, searching for records that match the search query.

  • Search Criteria: The search operation may include matching filenames, dates, statuses, or other relevant metadata associated with the files.

Step 4: Backend Returns Filtered Results

  • Action: The backend processes the query results and filters out the relevant records.

  • Response: The filtered search results are then encapsulated in a response.

  • Data Returned: The response includes all relevant records that match the search criteria, formatted for easy consumption by the front end.

Step 5: Frontend Displays Results

  • Action: The front end receives the response from the backend.

  • Display: The filtered search results are displayed to the user clearly and organized.

  • User Interface: The results can be displayed in a list, table, or any other suitable format, allowing the user to browse and analyze the information easily.

c. Advanced Process Flow - Filtering Records by (Start Date & End Date)

image-20240621-055057.png

Overview

This Process flow is used for advanced search in which a user can filter records based on their start date and end date using the Advanced Search functionality. This includes the interactions between the frontend and backend systems to accomplish this task.

Process Steps

1. Date Range Selection

  • User Action:

    • The user selects a date range or enters specific dates to filter records by the created date.

  • UI Elements:

    • Date pickers for selecting the start and end dates.

    • A button to submit the filter request.

2. Request Submission

  • Frontend Action:

    • The frontend constructs a request with the selected date range like Start Date & End Date

image-20240621-060333.png

3. Date Filter

  • Backend Action:

    • The backend processes the request by filtering the file queue data based on the provided date range.

    • Implementation:

      • The backend queries the database to retrieve records where the createdDate falls within the startDate and endDate.

4. Response Handling

  • Backend Action:

    • The backend returns the filtered results to the front end.

5. Display Results

  • Frontend Action:

    • The front end processes the response and displays the filtered results to the user.

  • UI Elements:

    • A table view to present the filtered file records.

    • The results section updates dynamically upon receiving the response.

image-20240621-060201.png

3. Create REST Provider End-point

Overview

A REST (Representational State Transfer) Provider is a service that offers resources and functionalities over HTTP(S) using standard REST principles. It enables clients to interact with the service through predefined APIs, facilitating the integration and communication between different systems.

In this particular use case, the process flow is shared by developing a REST provider that will eventually be integrated with the user interface.image-20240621-061858.png

Follow the steps below to create a REST Provider:

  1. Click Configure > WEB SERVICES > REST Provider.

  2. Click Create REST Provider

  3. In Create REST Provider window, type the name and description of the new Web Service Provider service in the Name and Description fields respectively.

image-20240621-062337.png
  1. Type API Version, for example, your API version can be 1

  2. Type the resource end path URL in the Resource End Path field. The URL can be static or dynamic. Static URL example:  /get/FileQueueDetails 

  3. Select the process flow name to trigger with the web service from the Process Flow Name field.

    1. Set parameterName attribute of the context source should be restRequest

      1. searchQuery - To enable the Advanced Search option

      2. start_date - Advanced search criteria

      3. end_date - Advanced search criteria

      4. start - Pagination control in the user interface

The above variables need to be bound in the user interface to process requests from the user.

Select the process flow name to trigger with the web service from the Process Flow Name field.

image-20240621-064010.png
  1. To add methods to your activity, click Add Method and do the following.

    1. In this use case, you need to select GET as the method type.

image-20240621-063007.png
  1. Select the Response Schema (For example, we are opting for the schema that has been utilized in the process flow as the target schema

image-20240621-064545.png
  1. Save it.

4. Publish the Provider (REST URL) at UI

Once the above steps have been completed, it is necessary to link the REST provider URL with the user interface (UI) to present the data on the UI

  • No labels