Skip to content

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

Markdown

ATS-CRM-ACT-017

Create workflow tasks once and repeat actions according to state: Acceptance Test Set

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-CRM-ACT-017

KindAcceptance test setProduct areaCRMModuleActivities, Follow-ups and Task WorkRevision2

Read atservices-crm a8d1364freact-console baf6dae3

Test Scenarios

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

01 Keep task service access restricted to registered callersapinegativetest
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 stepapinegativetest
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 holdsapinegativetest
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 actionsapinegativetest
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 formsapinegativetest
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 specificationsapinegativetest
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 subjectapinegativetest
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 principalapitest
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

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.