Service Layer high complexity backend
2
Dependencies
1
Dependents
1
Entities
0
Integrations

Description

Orchestrates the creation of multiple proxy activity records from a single bulk submission. Iterates over the selected mentor list, creates individual activity records for each, and aggregates success/failure results for user feedback.

Feature: Coordinator Proxy Registration for Contacts

bulk-registration-orchestrator

Summaries

The Bulk Registration Orchestrator delivers significant operational efficiency for coordinators managing large cohorts of peer mentors. Without bulk registration, coordinators must submit individual activity records for every mentor — a time-consuming process prone to partial completion when interrupted. This component enables a single submission to create compliant activity records for an entire group simultaneously. Its partial failure handling ensures that a single mentor's registration problem does not erase successful submissions for the rest of the group, protecting data integrity and coordinator trust in the system — a direct driver of adoption and reporting completeness.

The Bulk Registration Orchestrator is the highest-complexity backend component in the proxy registration feature, with two critical upstream dependencies: proxy-registration-service and proxy-activity-repository. Its fan-out pattern introduces non-trivial testing requirements: full success, partial failure, full failure, retry, and batch cancellation scenarios must all be validated. Timeline risk is moderate-to-high — the partial failure handling requires careful design to avoid race conditions or inconsistent batch state. Allocate extra QA cycles for load testing with realistic mentor group sizes (10–50+ mentors per batch) before release, as throughput under concurrent submissions is a key acceptance criterion.

The Bulk Registration Orchestrator executes in the backend context and fans out a single BulkRegistrationRequest into individual proxy activity records via proxy-registration-service. It exposes four interfaces: submitBulkRegistration initiates the batch, getBulkSubmissionStatus allows polling by batchId, retryFailedItems reruns only failed mentor records without duplicating successful ones, and cancelBatch halts in-progress submissions. Critical implementation constraint: partial failures must NOT trigger rollback of successful records — each mentor's registration is an independent unit of work. Aggregate per-mentor status into the batch result object.

Batch state must be persisted to proxy-activity-repository so status queries survive server restarts. Design the orchestrator as an idempotent, resumable workflow so retries are safe under at-least-once delivery semantics.

Responsibilities

  • Fan out single bulk request into per-mentor activity records
  • Handle partial failures gracefully without rolling back successful records
  • Aggregate and return per-mentor submission status

Interfaces

submitBulkRegistration(BulkRegistrationRequest request)
getBulkSubmissionStatus(String batchId)
retryFailedItems(String batchId)
cancelBatch(String batchId)

Relationships

Dependencies (2)

Components this component depends on

Dependents (1)

Components that depend on this component

Related Data Entities (1)

Data entities managed by this component

API Contract

View full contract →
REST /api/v1/bulk-registrations 7 endpoints
GET /api/v1/bulk-registrations List all bulk registration batches
GET /api/v1/bulk-registrations/:batch_id Get bulk submission status and item details
POST /api/v1/bulk-registrations Submit a bulk proxy registration batch
PUT /api/v1/bulk-registrations/:batch_id Update batch metadata (e.g. cancel or re-label)
DELETE /api/v1/bulk-registrations/:batch_id Delete a bulk registration batch record
POST /api/v1/bulk-registrations/:batch_id/retry Retry all failed items in a batch
+1 more