Service Layer medium complexity mobilebackend
1
Dependencies
0
Dependents
2
Entities
0
Integrations

Description

Converts the 'way forward' entries from a submitted report into trackable coordinator follow-up items. Persists each entry as a separate follow-up record linked to the parent report and notifies the coordinator's task queue.

Feature: Structured Post-Session Report

way-forward-task-service

Summaries

The Way Forward Task Service directly translates field report commitments into accountable, trackable coordinator actions — closing the gap between what fieldworkers promise and what leadership can verify was followed up on. By automatically converting report submissions into discrete task records and surfacing them in coordinator queues, the organisation reduces the risk of dropped commitments, improves accountability across the workforce, and demonstrates operational diligence to stakeholders. This directly supports compliance, audit readiness, and client trust.

This service sits at the critical handoff between report submission and coordinator workflow, making it a dependency for any feature that involves post-submission task management. Development is medium complexity, requiring coordination between the mobile client, backend persistence layer, and the coordinator queue notification system. Testing must cover edge cases such as empty way-forward lists, partial submission failures, and coordinator queue delivery guarantees. Any delay in the way-forward-item-repository integration will block end-to-end testing of the submission flow.

The Way Forward Task Service operates across both mobile and backend execution contexts, meaning it must handle offline-tolerant record creation on mobile and authoritative persistence on the backend. It consumes the way-forward-item-repository for durable storage and exposes four primary interfaces: createFollowUpItems (bulk record creation from report entries), getFollowUpItems (report-scoped retrieval), markItemResolved (state transition), and getCoordinatorQueue (workload aggregation per coordinator). Ensure idempotency on createFollowUpItems to handle retry scenarios from mobile clients on flaky connections.

Responsibilities

  • Transform way-forward entries into coordinator follow-up task records
  • Persist follow-up items linked to the submitted report
  • Signal coordinator workload system of new tasks

Interfaces

createFollowUpItems(reportId, wayForwardEntries)
getFollowUpItems(reportId)
markItemResolved(itemId)
getCoordinatorQueue(coordinatorId)

Relationships

Dependencies (1)

Components this component depends on

Related Data Entities (2)

Data entities managed by this component

API Contract

View full contract →
REST /api/v1/way-forward-tasks 7 endpoints
GET /api/v1/way-forward-tasks List all way-forward task entries
GET /api/v1/way-forward-tasks/:id Get a specific way-forward task
POST /api/v1/way-forward-tasks Create follow-up tasks from a way-forward entry list
PUT /api/v1/way-forward-tasks/:id Update a way-forward task (description, assignment, due date)
DELETE /api/v1/way-forward-tasks/:id Delete a way-forward task
POST /api/v1/way-forward-tasks/:id/resolve Mark a way-forward task as resolved
+1 more