Skip to content

ATS-CRM-ACT-013Offer work to a security role and reserve it by claim: Capability Test Specification

Markdown

ATS-CRM-ACT-013

Offer work to a security role and reserve it by claim: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaCRMModuleActivities, Follow-ups and Task WorkRevision3

Read atservices-crm a8d1364freact-console baf6dae3rhythm-v2-docs 18a49edf

Coverage

  • Rule gap: FND-CRM-ACT-059
  • Transition covered
  • Validation covered
  • Permission covered
  • Edge gap: FND-CRM-ACT-059
  • Failure gap: FND-CRM-ACT-059
  • Boundary covered
  • Concurrency covered
  • Invariant gap: FND-CRM-ACT-059
  • Interaction covered

Test Scenarios

15 scenarios proving CAP-CRM-ACT-013; 5 bound to an existing test.

01 Create a role offer without a simultaneous holdervalidationapinegativetest
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.
Data
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#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
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
02 Check role membership on unqueued claimspermissionapinegativetest
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.
Data
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
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
03 Select one role holder in a claim raceconcurrencyapinegativetest
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.
Data
Each run creates and isolates the records it needs.
Bound to
services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#refuses the second holder 409, code task_claimed_by_other
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
04 Reoffer released work and clear reassigned offerstransitionapitest
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.
Data
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#clears the role when the task is given to somebody other than its holder
services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#offers the task again on a release: nobody holds it, the role kept
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
05 Page work offered to the current role holdingsboundaryapitest
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.
Data
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/e2e/tasks.e2e.spec.js#refuses a page longer than 200, 400
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
06 Inspect the role-offer console discovery boundaryinteractionbrowserproposed
Proves
BR-CAP-CRM-ACT-013-09
Preconditions
An unqueued open task is offered to a role the current user holds.
Steps
Read offered work through its API and inspect the available Tasks views.
Expected
The eligible offer appears through the separate API; no offered-to-me view exists on the Tasks screen.
Data
Each run creates and isolates the records it needs.
Source
services-crm:modules/tasks/services/persistence/tasks.ts:listOfferedTasks; react-console:components/console/tasks/definition.tsx
07 Workflow offers can be claimed and reoffered without duplicate creationinteractionapiproposed
Proves
BR-CAP-CRM-ACT-013-04 BR-CAP-CRM-ACT-017-03 BR-CAP-CRM-ACT-012-10
Preconditions
Two users hold the offered role.
Steps
Create through a workflow step, repeat creation, claim as one holder, release and claim as the other.
Expected
One task exists, release retains the candidate role and the second holder receives that same task.
Data
Run-owned records in an isolated workspace; fixed clock for calendar checks.
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; services-crm:modules/tasks/tests/integration/services/workflow-actions/task-service-operations.integration.spec.js#answers the repeat with the same task; services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#leaves the task in its queue, in the place it had: a release is not a re-queue
08 Persist task routing from Unrouted to Offeredtransitionapiproposed
Proves
INV-DOM-CRM-ACT-003-03 INV-DOM-CRM-ACT-003-04 INV-DOM-CRM-ACT-003-05 INV-DOM-CRM-ACT-003-06
Preconditions
Run-owned task routing has Unrouted standing. The role reference has valid syntax without an existence check; creation cannot also name a holder. A changed offer requires unfinished, unlocked work.
Steps
Create an offer or have the workflow service offer work to a role. Read the resulting record and affected projections after commit.
Expected
The resulting task routing has Offered standing. Set the candidate role and clear any existing holder on service reassignment.
Data
Run-owned records in an isolated workspace; fixed clock for calendar checks.
Source
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
09 Persist task routing from Offered to Offered claimedtransitionapiproposed
Proves
INV-DOM-CRM-ACT-003-03 INV-DOM-CRM-ACT-003-04 INV-DOM-CRM-ACT-003-05 INV-DOM-CRM-ACT-003-06
Preconditions
Run-owned task routing has Offered standing. The locked task is unfinished, unlocked and unheld, and Platform confirms current role holding for the user.
Steps
Claim available work offered only to a role. Read the resulting record and affected projections after commit.
Expected
The resulting task routing has Offered claimed standing. Set holder and assignment attribution while retaining the candidate role.
Data
Run-owned records in an isolated workspace; fixed clock for calendar checks.
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
10 Persist task routing from Offered claimed to Offeredtransitionapiproposed
Proves
INV-DOM-CRM-ACT-003-03 INV-DOM-CRM-ACT-003-04 INV-DOM-CRM-ACT-003-05 INV-DOM-CRM-ACT-003-06
Preconditions
Run-owned task routing has Offered claimed standing. The task is unfinished and update-unlocked; release additionally requires a holder.
Steps
Release role-offered work or clear its holder by assignment. Read the resulting record and affected projections after commit.
Expected
The resulting task routing has Offered standing. Clear assignment and retain the candidate role so work is offered again.
Data
Run-owned records in an isolated workspace; fixed clock for calendar checks.
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
11 Persist task routing from Offered claimed to Heldtransitionapiproposed
Proves
INV-DOM-CRM-ACT-003-03 INV-DOM-CRM-ACT-003-04 INV-DOM-CRM-ACT-003-05 INV-DOM-CRM-ACT-003-06
Preconditions
Run-owned task routing has Offered claimed standing. The task is unfinished and updates are unlocked.
Steps
Assign a different user to held role-offered work. Read the resulting record and affected projections after commit.
Expected
The resulting task routing has Held standing. Replace the holder and assignment stamps, clearing the candidate role.
Data
Run-owned records in an isolated workspace; fixed clock for calendar checks.
Source
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
12 Persist task routing from Queued waiting to Queued offered waitingtransitionapiproposed
Proves
INV-DOM-CRM-ACT-003-03 INV-DOM-CRM-ACT-003-04 INV-DOM-CRM-ACT-003-05 INV-DOM-CRM-ACT-003-06
Preconditions
Run-owned task routing has Queued waiting standing. A changed request requires unfinished, unlocked work; an already-satisfied service request returns unchanged.
Steps
Have the workflow service offer queued work to a role. Read the resulting record and affected projections after commit.
Expected
The resulting task routing has Queued offered waiting standing. Clear holder and assignment stamps, set the role and retain queue arrival.
Data
Run-owned records in an isolated workspace; fixed clock for calendar checks.
Source
services-crm:modules/tasks/services/persistence/tasks.ts:offerTask
13 Persist task routing from Queued claimed to Queued offered waitingtransitionapiproposed
Proves
INV-DOM-CRM-ACT-003-03 INV-DOM-CRM-ACT-003-04 INV-DOM-CRM-ACT-003-05 INV-DOM-CRM-ACT-003-06
Preconditions
Run-owned task routing has Queued claimed standing. A changed request requires unfinished, unlocked work; an already-satisfied service request returns unchanged.
Steps
Have the workflow service replace the holder with a role offer. Read the resulting record and affected projections after commit.
Expected
The resulting task routing has Queued offered waiting standing. Clear holder and assignment stamps, set the role and retain queue arrival.
Data
Run-owned records in an isolated workspace; fixed clock for calendar checks.
Source
services-crm:modules/tasks/services/persistence/tasks.ts:offerTask
14 Persist task routing from Queued offered waiting to Queued offered claimedtransitionapiproposed
Proves
INV-DOM-CRM-ACT-003-03 INV-DOM-CRM-ACT-003-04 INV-DOM-CRM-ACT-003-05 INV-DOM-CRM-ACT-003-06
Preconditions
Run-owned task routing has Queued offered waiting standing. A user makes a conditional claim of unfinished, unlocked, unheld work; role holding is not consulted.
Steps
Claim work that has both queue and role routing. Read the resulting record and affected projections after commit.
Expected
The resulting task routing has Queued offered claimed standing. Set the caller as holder and assigner; retain the queue, arrival and role.
Data
Run-owned records in an isolated workspace; fixed clock for calendar checks.
Source
services-crm:modules/tasks/services/persistence/tasks.ts:claimTask
15 Persist task routing from Queued offered claimed to Queued offered waitingtransitionapiproposed
Proves
INV-DOM-CRM-ACT-003-03 INV-DOM-CRM-ACT-003-04 INV-DOM-CRM-ACT-003-05 INV-DOM-CRM-ACT-003-06
Preconditions
Run-owned task routing has Queued offered claimed standing. The task is unfinished, unlocked and held.
Steps
Release held work that retains both routing references. Read the resulting record and affected projections after commit.
Expected
The resulting task routing has Queued offered waiting standing. Clear assignment stamps and holder while keeping queue arrival and candidate role.
Data
Run-owned records in an isolated workspace; fixed clock for calendar checks.
Source
services-crm:modules/tasks/services/persistence/tasks.ts:releaseTask

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.