Skip to content

ATS-CRM-ACT-017Create workflow tasks once and repeat actions according to state: Capability Test Specification

Markdown

ATS-CRM-ACT-017

Create workflow tasks once and repeat actions according to state: 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-063
  • Transition gap: FND-CRM-ACT-063
  • Validation covered
  • Permission covered
  • Edge covered
  • Failure covered
  • Boundary gap: FND-CRM-ACT-063
  • Concurrency covered
  • Invariant covered
  • Interaction covered

Test Scenarios

10 scenarios proving CAP-CRM-ACT-017; 8 bound to an existing test.

01 Keep task service access restricted to registered callerspermissionapinegativetest
Proves
BR-CAP-CRM-ACT-017-01
Preconditions
A console context and unknown service principal are available.
Steps
Invoke the task service with each.
Expected
Both are rejected and no task is created.
Data
Each run creates and isolates the records it needs.
Bound to
services-crm:modules/tasks/tests/e2e/tasks-service.e2e.spec.js#answers 403 context_mismatch to a console caller reaching the route over HTTP, whatever its keys
services-crm:modules/tasks/tests/e2e/tasks-service.e2e.spec.js#answers 403 to a principal Rhythm does not know
Source
services-crm:modules/tasks/tests/e2e/tasks-service.e2e.spec.js#answers 403 context_mismatch to a console caller reaching the route over HTTP, whatever its keys
02 Deduplicate a workflow creation stepconcurrencyapinegativetest
Proves
BR-CAP-CRM-ACT-017-03
Preconditions
A workflow step supplies its creation reference.
Steps
Repeat and race creation deliveries.
Expected
One task exists and exactly one delivery reports creation.
Data
Each run creates and isolates the records it needs.
Bound to
services-crm:modules/tasks/tests/e2e/tasks-service.e2e.spec.js#tells exactly one delivery it created the task, and the two losers they did not
Source
services-crm:modules/tasks/tests/integration/services/workflow-actions/task-service-operations.integration.spec.js#answers the repeat with the same task
03 Avoid a second write when the requested state already holdsinvariantapinegativetest
Proves
BR-CAP-CRM-ACT-017-04
Preconditions
Workflow-created tasks cover each supported action.
Steps
Repeat closing, reassignment and due-day actions without intervening changes.
Expected
The second delivery preserves the record and version.
Data
Each run creates and isolates the records it needs.
Bound to
services-crm:modules/tasks/tests/integration/services/persistence/tasks.workflow-actions.integration.spec.js#answers a completed task as it is, writing nothing, when asked again idempotently
services-crm:modules/tasks/tests/e2e/tasks-service.e2e.spec.js#bumped each task once per change and never on a repeat
Source
services-crm:modules/tasks/tests/integration/services/workflow-actions/task-service-operations.integration.spec.js#answers the repeat with the task as it is, writing nothing
04 Return specific refusals for inapplicable workflow actionsfailureapinegativetest
Proves
BR-CAP-CRM-ACT-017-05
Preconditions
Tasks are completed, cancelled or fully locked.
Steps
Attempt incompatible closure, reassignment and redating.
Expected
The service returns the relevant problem codes without changing them.
Data
Each run creates and isolates the records it needs.
Bound to
services-crm:modules/tasks/tests/integration/services/workflow-actions/task-service-operations.integration.spec.js#refuses to cancel a task a person completed (409 task_closed_otherwise), leaving it completed
services-crm:modules/tasks/tests/integration/services/workflow-actions/task-service-operations.integration.spec.js#refuses to complete a task locked against updates (409 task_locked), leaving it open
Source
services-crm:modules/tasks/tests/integration/services/workflow-actions/task-service-operations.integration.spec.js#names the refusal to complete a cancelled task task_closed_otherwise
05 Require agreement between task addressing formsvalidationapinegativetest
Proves
BR-CAP-CRM-ACT-017-06
Preconditions
Two tasks have distinct workflow creation references.
Steps
Address one by task reference and the other by creation reference, then use an unknown creation reference.
Expected
Disagreement fails without writes and the unknown creation is Not Found.
Data
Each run creates and isolates the records it needs.
Bound to
services-crm:modules/tasks/tests/integration/services/workflow-actions/task-service-operations.integration.spec.js#refuses an id and a run that name two different tasks (400), and changes neither
services-crm:modules/tasks/tests/e2e/tasks-service.e2e.spec.js#answers 400 for an operation that names no task
Source
services-crm:modules/tasks/tests/integration/services/workflow-actions/task-service-operations.integration.spec.js#refuses an id and a run that name two different tasks (400), and changes neither
06 Reject duplicate holder specificationsvalidationapinegativetest
Proves
BR-CAP-CRM-ACT-017-07
Preconditions
Service creation supports either holder form.
Steps
Provide both holder forms in one create.
Expected
The API rejects the ambiguous holder request.
Data
Each run creates and isolates the records it needs.
Bound to
services-crm:modules/tasks/tests/e2e/tasks-service.e2e.spec.js#refuses a create naming its holder twice, assignee and assignee_user_id, 400
Source
services-crm:modules/tasks/tests/e2e/tasks-service.e2e.spec.js#refuses a create naming its holder twice, assignee and assignee_user_id, 400
07 Require a complete cross-application subjectvalidationapinegativetest
Proves
BR-CAP-CRM-ACT-017-09
Preconditions
Subject fixtures cover valid and malformed record-kind combinations.
Steps
Create tasks with one half missing, malformed values and a complete pair.
Expected
Incomplete or malformed subjects fail and the complete pair is retained.
Data
Each run creates and isolates the records it needs.
Bound to
services-crm:modules/tasks/tests/integration/services/persistence/tasks.workflow-actions.integration.spec.js#refuses an object with no record, naming the record, and writes nothing
services-crm:modules/tasks/tests/integration/db/tasks.table.integration.spec.js#refuses an object id outside the grammar of a canonical object id
Source
services-crm:modules/tasks/tests/integration/services/persistence/tasks.workflow-actions.integration.spec.js#refuses an object with no record, naming the record, and writes nothing
08 Attribute workflow writes to the service principalinvariantapitest
Proves
BR-CAP-CRM-ACT-017-10
Preconditions
A registered service acts with an originating user.
Steps
Create and complete work.
Expected
Record stamps identify the service rather than the originating user.
Data
Each run creates and isolates the records it needs.
Bound to
services-crm:modules/tasks/tests/integration/services/workflow-actions/task-service-operations.integration.spec.js#creates the task the action asked for, with the service principal as its creator and assigner
Source
services-crm:modules/tasks/tests/integration/services/workflow-actions/task-service-operations.integration.spec.js#creates the task the action asked for, with the service principal as its creator and assigner
09 A workflow task retains context through merge and access checksinteractionapiproposed
Proves
BR-CAP-CRM-ACT-017-03 BR-CAP-CRM-ACT-013-02 BR-CAP-CRM-ACT-018-07 BR-CAP-CRM-ACT-019-02
Preconditions
A registered service creates a role-offered task concerning a duplicate contact.
Steps
Repeat creation, merge the contact into a survivor, claim as a holder and attempt to read the task from another workspace.
Expected
One task follows the survivor, an eligible holder claims it, and the foreign workspace receives absence.
Data
Run-owned records in an isolated workspace; fixed clock for calendar checks.
Source
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.role-claim.integration.spec.js#is refused 403 with the code task_claim_not_role_holder, and the task stays offered; react-console:acceptance/crm/playwright/journeys/cross-application/CRM-ACC-0720.spec.ts#CRM-ACC-0720; services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#is left exactly as the other tenant had it, every refusal above having written nothing
10 Reevaluate an action after an intervening changeedgeapiproposed
Proves
BR-CAP-CRM-ACT-017-12
Preconditions
A workflow command has completed a task.
Steps
Reopen as a person, repeat the prior completion command and inspect the new version and closing stamps.
Expected
The repeat evaluates the current open state and completes it again; no action-delivery ledger suppresses it.
Data
Run-owned records in an isolated workspace; fixed clock for calendar checks.
Source
services-crm:modules/tasks/services/workflow-actions/task-service-operations.ts:runTaskServiceOperation

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.