---
id: JNY-CRM-ACT-005
title: Offer a workflow review to a role and close it through the task service
feature: FEAT-CRM-ACT-05
product_area: crm
module: activities-tasks
revision: 2
status: draft
product_intent: proposed
implementation_evidence: partially-observed
supersedes: []
source_sha:
  services-crm: a8d1364f1dd44b723bb5f9acba12f983e9ec8d69
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
actor: ACT-CRM-007
goal: Create one review task and let an eligible unqueued role holder reserve it.
capabilities:
  - CAP-CRM-ACT-017
  - CAP-CRM-ACT-013
  - CAP-CRM-ACT-011
screens: []
steps:
  - 'n': 1
    surface: runTaskServiceOperation
    action: >-
      Request an unassigned review task for the reviewer role and
      submission-stage subject.
    capability: CAP-CRM-ACT-017
    expected: 'The task is Open, offered to the role and attributed to the service.'
    provenance: test
    source: >-
      services-crm:modules/tasks/tests/e2e/tasks-service.e2e.spec.js#creates the
      task offered to the role, held by nobody
  - 'n': 2
    surface: runTaskServiceOperation
    action: Deliver the same creation request again.
    capability: CAP-CRM-ACT-017
    expected: The existing task is returned without another creation.
    provenance: test
    source: >-
      services-crm:modules/tasks/tests/integration/services/workflow-actions/task-service-operations.integration.spec.js#answers
      the second delivery with the task the first created, saying it did not
      create it
  - 'n': 3
    surface: listOfferedTasks
    action: Request the work offered to the reviewer’s roles.
    capability: CAP-CRM-ACT-013
    expected: The eligible review appears in the returned page.
    provenance: test
    source: >-
      services-crm:modules/tasks/tests/e2e/tasks-service.e2e.spec.js#lists the
      task among those offered to the holder
  - 'n': 4
    surface: claimTask
    action: Claim the review as a role holder.
    capability: CAP-CRM-ACT-013
    expected: The claimant becomes holder and the candidate role remains.
    provenance: test
    source: >-
      services-crm:modules/tasks/tests/e2e/tasks-service.e2e.spec.js#lets the
      holder claim it through the console
  - 'n': 5
    surface: runTaskServiceOperation
    action: Deliver completion twice after recording the review.
    capability: CAP-CRM-ACT-017
    expected: The unchanged repeat preserves a single service-attributed completion.
    provenance: test
    source: >-
      services-crm:modules/tasks/tests/e2e/tasks-service.e2e.spec.js#completes
      the task, stamped by the service, and answers the repeat with the same
      task
alternates:
  - from_step: 4
    condition: A different reviewer wins the claim.
    path: The later claim returns a winner-specific conflict.
    outcome: The first claimant retains the task.
    provenance: test
    source: >-
      services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#refuses the second
      holder 409, code task_claimed_by_other
failures:
  - from_step: 4
    condition: The claimant does not hold the candidate role.
    path: The claim returns Forbidden.
    outcome: The task remains offered and unassigned.
    provenance: test
    source: >-
      services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#refuses a user who
      does not hold the role 403, code task_claim_not_role_holder
  - from_step: 5
    condition: The task was cancelled before completion delivery.
    path: CRM returns incompatible-closure refusal.
    outcome: CRM preserves cancellation; executor handling remains outside this scope.
    provenance: test
    source: >-
      services-crm:modules/tasks/tests/e2e/tasks-service.e2e.spec.js#answers
      complete of a cancelled task 409 task_closed_otherwise
    note: >-
      The assertion covers CRM’s refusal only; the external executor’s result
      remains unexamined.
rules_in_play:
  - BR-CAP-CRM-ACT-017-01
  - BR-CAP-CRM-ACT-017-03
  - BR-CAP-CRM-ACT-017-04
  - BR-CAP-CRM-ACT-017-05
  - BR-CAP-CRM-ACT-013-01
  - BR-CAP-CRM-ACT-013-02
  - BR-CAP-CRM-ACT-013-03
  - BR-CAP-CRM-ACT-013-07
assertions:
  - id: AS-JNY-CRM-ACT-005-01
    statement: Repeated creation delivery retains one task for the workflow origin.
    provenance: test
    source: >-
      services-crm:modules/tasks/tests/e2e/tasks-service.e2e.spec.js#answers
      every delivery 200 with the one task
  - id: AS-JNY-CRM-ACT-005-02
    statement: >-
      An unqueued role-offer claimant must hold the candidate role under
      Platform evaluation.
    provenance: test
    source: >-
      services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#gives the task to
      the first holder to claim it, keeping the role
  - id: AS-JNY-CRM-ACT-005-03
    statement: Completion attribution identifies the workflow service.
    provenance: test
    source: >-
      services-crm:modules/tasks/tests/e2e/tasks-service.e2e.spec.js#completes
      the task, stamped by the service, and answers the repeat with the same
      task
e2e_policy: optional
e2e_reason: >-
  The examined path uses service and task APIs with existing API proof; no
  offered-work console view exists for a browser path yet.
evidence:
  - >-
    Pinned service evidence is identified by each journey step, alternate,
    failure and assertion.
---

# Offer a workflow review to a role and close it through the task service

## Story

An application process asks CRM to create review work for a security role. Repeated creation delivery recovers the same task. A reviewer lists eligible offers and reserves the review before a colleague’s competing claim. Once the review is recorded, the process requests completion. CRM handles an unchanged repeat without writing again, while conflicting task state produces a refusal for the external executor to handle.
