---
id: ATS-CRM-ACT-013
scope: CAP-CRM-ACT-013
product_area: crm
module: activities-tasks
revision: 2
status: proposed
approved_by: null
approved_at: null
source_sha:
  services-crm: a8d1364f1dd44b723bb5f9acba12f983e9ec8d69
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
scenarios:
  - id: ATS-CRM-ACT-013-01
    title: Create a role offer without a simultaneous holder
    level: api
    proves:
      - BR-CAP-CRM-ACT-013-01
    preconditions: A role has eligible users.
    steps: >-
      Create offers by custom reference and built-in key, then include both a
      holder and role.
    expected: Valid offers remain unassigned and the combined assignment fails.
    negative: true
    data_needs: Each run creates and isolates the records it needs.
    bound_to:
      - >-
        services-crm:modules/tasks/tests/integration/services/persistence/tasks.role-claim.integration.spec.js#stores
        the role as the candidate role and leaves the task held by nobody
      - >-
        services-crm:modules/tasks/tests/integration/services/persistence/tasks.role-claim.integration.spec.js#stores
        a built-in role by its key
      - >-
        services-crm:modules/tasks/tests/integration/services/persistence/tasks.role-claim.integration.spec.js#refuses
        a create naming both an assignee and a role, naming the field, and
        writes nothing
      - >-
        services-crm:modules/tasks/tests/integration/db/tasks.table.integration.spec.js#refuses
        a task created both assigned to a person and offered to a role
    provenance: test
    source: >-
      services-crm:modules/tasks/tests/integration/services/persistence/tasks.role-claim.integration.spec.js#stores
      the role as the candidate role and leaves the task held by nobody
  - id: ATS-CRM-ACT-013-02
    title: Check role membership on unqueued claims
    level: api
    proves:
      - BR-CAP-CRM-ACT-013-02
    preconditions: An offered task and a non-holder are available.
    steps: Attempt a non-holder claim and a built-in-role holder claim.
    expected: The non-holder is forbidden while the eligible holder succeeds.
    negative: true
    data_needs: Each run creates and isolates the records it needs.
    bound_to:
      - >-
        services-crm:modules/tasks/tests/integration/services/persistence/tasks.role-claim.integration.spec.js#is
        refused 403 with the code task_claim_not_role_holder, and the task stays
        offered
      - >-
        services-crm:modules/tasks/tests/integration/services/persistence/tasks.role-claim.integration.spec.js#claims
        it: the key is resolved to the role, which the holder holds at the
        customer’s scope
      - >-
        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
    provenance: test
    source: >-
      services-crm:modules/tasks/tests/integration/services/persistence/tasks.role-claim.integration.spec.js#is
      refused 403 with the code task_claim_not_role_holder, and the task stays
      offered
  - id: ATS-CRM-ACT-013-03
    title: Select one role holder in a claim race
    level: api
    proves:
      - BR-CAP-CRM-ACT-013-03
    preconditions: Three users hold the candidate role.
    steps: Claim concurrently.
    expected: >-
      One user receives assignment and the others receive winner-specific
      conflicts.
    negative: true
    data_needs: Each run creates and isolates the records it needs.
    bound_to:
      - >-
        services-crm:modules/tasks/tests/integration/services/persistence/tasks.concurrency.integration.spec.js#refuses
        the other two 409 with the code task_claimed_by_other
      - >-
        services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#refuses the
        second holder 409, code task_claimed_by_other
    provenance: test
    source: >-
      services-crm:modules/tasks/tests/integration/services/persistence/tasks.concurrency.integration.spec.js#refuses
      the other two 409 with the code task_claimed_by_other
  - id: ATS-CRM-ACT-013-04
    title: Reoffer released work and clear reassigned offers
    level: api
    proves:
      - BR-CAP-CRM-ACT-013-04
      - BR-CAP-CRM-ACT-013-05
    preconditions: A claimed task retains its candidate role.
    steps: Release it and assign a different holder.
    expected: Release preserves the offer and different-holder assignment clears it.
    negative: false
    data_needs: Each run creates and isolates the records it needs.
    bound_to:
      - >-
        services-crm:modules/tasks/tests/integration/services/persistence/tasks.role-claim.integration.spec.js#keeps
        the candidate role, so the task is offered again
      - >-
        services-crm:modules/tasks/tests/integration/services/persistence/tasks.role-claim.integration.spec.js#clears
        the role when the task is given to somebody other than its holder
      - >-
        services-crm:modules/tasks/tests/integration/services/persistence/tasks.role-claim.integration.spec.js#keeps
        the role when the claimed task is handed back
      - >-
        services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#offers the task
        again on a release: nobody holds it, the role kept
    provenance: test
    source: >-
      services-crm:modules/tasks/tests/integration/services/persistence/tasks.role-claim.integration.spec.js#keeps
      the candidate role, so the task is offered again
  - id: ATS-CRM-ACT-013-05
    title: Page work offered to the current role holdings
    level: api
    proves:
      - BR-CAP-CRM-ACT-013-07
    preconditions: Some role offers are unassigned and one has been claimed.
    steps: 'Read and paginate offered work, then request an excessive page.'
    expected: Eligible unclaimed tasks appear oldest first and pages above 200 fail.
    negative: false
    data_needs: Each run creates and isolates the records it needs.
    bound_to:
      - >-
        services-crm:modules/tasks/tests/integration/services/persistence/tasks.queries.integration.spec.js#answers
        the three tasks offered to the user’s roles, oldest first, then by id
      - >-
        services-crm:modules/tasks/tests/integration/services/persistence/tasks.queries.integration.spec.js#answers
        a page at most as long as the limit, with where it ended
      - >-
        services-crm:modules/tasks/tests/integration/services/persistence/tasks.queries.integration.spec.js#answers
        an empty page for a user who holds no role
      - >-
        services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#refuses a page
        longer than 200, 400
    provenance: test
    source: >-
      services-crm:modules/tasks/tests/integration/services/persistence/tasks.queries.integration.spec.js#answers
      the three tasks offered to the user’s roles, oldest first, then by id
  - id: ATS-CRM-ACT-013-06
    title: Expose role offers in a future console view
    level: browser
    proves:
      - BR-CAP-CRM-ACT-013-09
    preconditions: The signed-in user holds the role named by an offered task.
    steps: Open Tasks and inspect offered-work access.
    expected: >-
      The proposed contract provides an offered-to-me view; that view is not
      implemented.
    negative: false
    data_needs: Each run creates and isolates the records it needs.
    bound_to: []
    provenance: proposed
    source: FND-CRM-ACT-010
evidence:
  - >-
    Pinned service assertions and proposed proof cases are identified in the
    scenario sources and bindings.
  - >-
    Pinned console assertions and proposed proof cases are identified in the
    scenario sources and bindings.
---

# Offer work to a security role and reserve it by claim: Acceptance Test Set

## Coverage

Bound scenarios identify existing assertions; unbound scenarios remain proposed proof. Static inspection does not establish a passing execution.

| Rule | Proof Scenario Or Gap |
|---|---|
| `BR-CAP-CRM-ACT-013-01` | `ATS-CRM-ACT-013-01` |
| `BR-CAP-CRM-ACT-013-02` | `ATS-CRM-ACT-013-02` |
| `BR-CAP-CRM-ACT-013-03` | `ATS-CRM-ACT-013-03` |
| `BR-CAP-CRM-ACT-013-04` | `ATS-CRM-ACT-013-04` |
| `BR-CAP-CRM-ACT-013-05` | `ATS-CRM-ACT-013-04` |
| `BR-CAP-CRM-ACT-013-07` | `ATS-CRM-ACT-013-05` |
| `BR-CAP-CRM-ACT-013-09` | `ATS-CRM-ACT-013-06` |
| `BR-CAP-CRM-ACT-013-10` | no scenario: `FND-CRM-ACT-028` |
| `BR-CAP-CRM-ACT-013-11` | no scenario: `FND-CRM-ACT-028` |
| `BR-CAP-CRM-ACT-013-12` | no scenario: `FND-CRM-ACT-028` |
