Challenge Overview
CHALLENGE OBJECTIVES
This challenge will implement one Processor/API, which will watch a shared network directory for files it needs to process as part of a workflow.
PROJECT BACKGROUND
Wellmark is a health insurance company which has run dozens of projects already on Topcoder.
The objective of this project is to build Outbound Mail Processor/API for their Customer Interaction Management division.
Tech Stack
- Typescript
- Nodejs 12
- NestJs
- MongoDB 4+
Individual Requirement
-
Create API (major)
The API receives POST /job from external service. It saves the request as Pending Job in DB and returns response with guid in body and 200.
Sample request body is attached in the forum.
Database info, such as host, port, db name etc, should be configurable from environment variables.
-
Create the processor (major)
The processor will monitor a network directory. Once it finds a new file, it will place the file into COMPDB, which is another component we will build (see requirement 3). The internal time for scanning should be configurable.
-
Create COMPDB (major)
COMPDB is a component inside processor. COMPDB should support asynchronous processing, retry, error handling. We should be able to configure
- PROCESSING_ATTEMPTS_MAX : an upper limit as to how many times the job processor will attempt to complete each task.
- TASK_PROCESSING_SPAN_MINUTES: how many minutes need to elapse from “last processing time” where the job processor will consider executing the tasks in a job
- PENDING_TTL_MINUTES: The number of minutes a MPJ can be in a “pending” state before being marked as orphaned
Once COMPDB receives the file, it will follow a workflow. The workflow includes uploading PDF to another system, fire one event and clean up. A detail document is shared in the forum.
In this challenge, we will only implement CIM Intake Channel MSG Input. The implementation for the workflow should consider that there will be more tasks in the future. So the implementation should abstract some concepts like Task to support it.
For all environment variables, their names should be prefixed with WM_OMP_ (Wellmark Outbound Mail Processor)
Important notes:
- No unit tests are required
- Both API and process belong to one application. When we start API, the processor also starts.
- The code structure is very important in this challenge, there should be different abstractions such as COMPDB and processor. If all code is together without proper structure, it's considered as major requirements not fullfilled.
Final Submission Guidelines
Please submit the zip file containing the following:
- New Outbound Mail API/processor codebase, including README
- the README file will describe the following:
- Prerequisites
- Instructions on how to configure the API/processor
- Instructions on how to run the code locally
- Instructions on how to verify