Task Service
NestJS:8014Core
The Task Service handles task creation, assignment, tracking, and workflow management. It provides comprehensive task lifecycle operations with access control and fuzzy search capabilities.
Key Features
- Task Lifecycle — Create, assign, update, complete, and close tasks
- Assignment Management — Assign tasks to users and groups
- Access Control — Permission-based task visibility
- Fuzzy Search — Levenshtein distance matching for task search
- Attachment Support — Link files and documents to tasks
- Priority Management — Task prioritization and deadline tracking
API Endpoints
GET
/api/taskList tasks with filters and pagination
POST
/api/taskCreate new task
GET
/api/task/:idGet task details
PUT
/api/task/:idUpdate task
POST
/api/task/:id/assignAssign task to user/group
POST
/api/task/:id/completeMark task as completed
GET
/api/task/my-tasksGet tasks assigned to current user
Configuration
| Name | Type | Default | Description |
|---|---|---|---|
| PORT | number | 8014 | Service listening port |
| DB_HOST | string | localhost | MSSQL server host |
| DB_USERNAME | string | - | Database username |
| DB_PASSWORD | string | - | Database password |
| RABBITMQ_URIS | string | - | RabbitMQ connection URIs |
| REDIS_HOST | string | localhost | Redis host |
RabbitMQ Integration
Publishes to:
- Task assignment and completion notification events
Database
Uses tenant-specific MSSQL databases for task storage with Sequelize ORM. Key tables include tasks, task assignments, task history, and task attachments.