---
id: WF-PFM-TNL-017
title: Contribute an application's records to a workspace export
trigger: Supply application-owned dataset batches to an export coordinator.
product_area: platform
module: tenant-lifecycle
revision: 1
status: draft
design_intent: proposed
origin: services-platform:docs/proposals/tenant-data-export/20-risks-tradeoffs-decisions.md#D-02 (decided as recommended)
implementation_evidence: partially-observed
inference: []
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  services-crm: a8d1364f1dd44b723bb5f9acba12f983e9ec8d69
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
  services-committees: 36129c24daeaadcdb339218c38cdeaff9861359d
  services-membership: 5994c270e8a37a30f848e99ba5b5ee6b87c08893
  services-submissions: 64236c19be89579ef5897aad7de3925ed3ce03bf
  services-websites: 5fc6823c69d5e6f208c21dba8c0eb3132f8bdc4c
  services-marketing: d071a159fe9782bb71ff246d5c67d5bbfe07fbfa
implements:
- CAP-PFM-TNL-010
moves: []
crosses:
- SVC-PFM-TNL-crm-tenant-lifecycle
- SVC-PFM-TNL-commerce-tenant-lifecycle
- SVC-PFM-TNL-membership-tenant-lifecycle
- SVC-PFM-TNL-submissions-tenant-lifecycle
idempotency: The caller supplies continuation; repeating the cursor can rewrite a deterministic staged part. Coordinator
  recovery remains outside the observed lifecycle paths.
concurrency: Dataset batch iteration belongs to the coordinator. Application function reservations differ, so a
  universal single-invocation guarantee is unsupported.
hops:
- n: 1
  actor_or_service: Workspace export coordinator (outside this module)
  action: Request the next declared dataset batch with workspace, run, cursor and staging context.
  anchor: services-platform:docs/proposals/tenant-data-export/07-coverage-registry.md#§3
  seam: sync
  on_failure: Coordinator behavior is documented outside the observed lifecycle caller.
  left_inconsistent: No coordinator execution is established by this module.
  observer: Operation response and service logs.
  provenance: documented
  source: services-platform:docs/proposals/tenant-data-export/20-risks-tradeoffs-decisions.md#D-02
- n: 2
  actor_or_service: Application lifecycle function (export)
  action: Validate the dataset request and participant-specific staging constraints.
  anchor: services-crm:modules/tenant-lifecycle/services/lifecycle/tenant-lifecycle-operations.ts:runExport
  seam: sync
  on_failure: Reject invalid input before dataset streaming.
  left_inconsistent: No new part is expected from refused validation.
  observer: Operation response and service logs.
  provenance: observed
  source: services-crm:modules/tenant-lifecycle/services/lifecycle/tenant-lifecycle-operations.ts
- n: 3
  actor_or_service: Application lifecycle function (export)
  action: Stream scoped dataset rows to staging and return the part and continuation.
  anchor: services-crm:modules/tenant-lifecycle/services/export/dataset-exports.ts
  seam: sync
  on_failure: Return export failure to the caller without a database mutation.
  left_inconsistent: A staged part can exist without the coordinator recording its result.
  observer: Operation response and service logs.
  provenance: observed
  source: services-crm:modules/tenant-lifecycle/services/export/export-staging.ts
branches:
- Committees and Marketing export nothing; Websites changes remain outside Platform’s enabled integration.
waits: []
evidence:
- 'services-crm, services-commerce, services-membership, services-submissions at their pinned commits: modules/tenant-lifecycle/services/export*/**;
  participant export classifications.'
- 'services-platform at ad3f6a65: docs/proposals/tenant-data-export/20-risks-tradeoffs-decisions.md (no Platform
  caller of the export operation found in modules/tenants).'
controls: [TC-AVL-001, TC-AVL-004, TC-AVL-005, TC-AZ-001, TC-AZ-002, TC-AZ-003, TC-AZ-004, TC-CRY-001, TC-CRY-002, TC-CRY-003, TC-CRY-004, TC-DAT-001, TC-DAT-002, TC-DAT-003, TC-DAT-005, TC-IAM-001, TC-IAM-002, TC-IAM-004, TC-IAM-005, TC-IAM-006, TC-LOG-001, TC-LOG-004, TC-LOG-005, TC-PI-001, TC-PI-002, TC-PI-003, TC-PI-004, TC-PI-005, TC-PRV-001, TC-PRV-002, TC-SEC-001, TC-SEC-002, TC-SEC-003, TC-SEC-004, TC-TEN-001, TC-TEN-002, TC-TEN-003, TC-VEN-001, TC-VEN-002, TC-VEN-003]
---

# Contribute An Application'S Records To A Workspace Export

## What It Does

Supply application-owned dataset batches to an export coordinator. The caller supplies continuation; repeating the cursor can rewrite a deterministic staged part. Coordinator recovery remains outside the observed lifecycle paths.

## The Flow

```mermaid
sequenceDiagram
  autonumber
  participant Exp as Export coordinator
  participant Fn as Application lifecycle function
  participant Stage as Export staging
  loop each dataset until no cursor
    Exp->>Fn: export (dataset, staging prefix, cursor, batch)
    Fn->>Fn: validate whole
    Fn->>Stage: one part of the dataset, withheld classes omitted
    Fn-->>Exp: part and next cursor
  end
```

## When Something Fails

Coordinator behavior is documented outside the observed lifecycle caller. No coordinator execution is established by this module. Reject invalid input before dataset streaming. No new part is expected from refused validation. Return export failure to the caller without a database mutation. A staged part can exist without the coordinator recording its result.

## Open Design Questions

No lifecycle caller establishes the coordinator’s execution. Contribution ownership remains an open planning choice, and excluded applications limit export coverage.
