Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,26 @@ Feature: PayloadCollection
Tests around the payload collection

@PatientDetails
Scenario: Seed MinIO with patient metadata, and payload collection has details
Scenario: Payload collection will be populated with patient details after receiving a Workflow Request when patient metadata exists
Given I have a clinical workflow Basic_Workflow_1
And I have a bucket in MinIO bucket1
And I have a payload <metadata> in the bucket bucket1 with payload id <payloadId>
When I publish a Workflow Request Message <workflowRequestMessage>
When I publish a Workflow Request Message <workflowRequestMessage> with artifacts <objects> in minio
Then A payload collection is created with patient details <patientTestData>
Then I can see <workflowInstance> Workflow Instance is created
And I can see <workflowInstance> Workflow Instance is created
Examples:
| workflowRequestMessage | metadata | patientTestData | payloadId | workflowInstance |
| Basic_AeTitle_Payload_Collection_Request_1 | full_patient_metadata | Full_Patient | 23b96697-0174-465c-b9cb-368b20a4591d | 1 |
| Basic_Non_Existant_Request | partial_patient_metadata | Partial_Patient | c9c1e0f1-5994-4882-b3d4-9e1009729377 | 0 |
| workflowRequestMessage | objects | patientTestData | workflowInstance |
| Basic_AeTitle_Payload_Collection_Request_1 | full_patient_metadata | Full_Patient | 1 |
| Basic_Non_Existant_Request | partial_patient_metadata | Partial_Patient | 0 |

@PatientDetails
Scenario: Seed MinIO with blank patient data, and payload collection has null details
Scenario: Payload collection will be populated with null patient details after receiving a Workflow Request when patient metadata is blank
Given I have a clinical workflow Basic_Workflow_1
And I have a bucket in MinIO bucket1
And I have a payload null_patient_metadata in the bucket bucket1 with payload id 64a2b260-0379-4614-9f05-ff1279cf9e83
When I publish a Workflow Request Message Basic_AeTitle_Payload_Collection_Request_2
When I publish a Workflow Request Message Basic_AeTitle_Payload_Collection_Request_2 with artifacts null_patient_metadata in minio
Then A payload collection is created with patient details Null_Patient
Then I can see 1 Workflow Instance is created
And I can see 1 Workflow Instance is created

@PatientDetails
Scenario: Seed MinIO with no patient data, and payload collection has null details
Scenario: Payload collection will be populated with null patient details after receiving a Workflow Request when patient metadata is missing
Given I have a clinical workflow Basic_Workflow_1
And I have a bucket in MinIO bucket1
And I have a payload no_patient_metadata in the bucket bucket1 with payload id b91f5559-8ab2-455a-806d-961244ea22af
When I publish a Workflow Request Message Basic_AeTitle_Payload_Collection_Request_3
When I publish a Workflow Request Message Basic_AeTitle_Payload_Collection_Request_3 with artifacts no_patient_metadata in minio
Then A payload collection is created with patient details Null_Patient
Then I can see 1 Workflow Instance is created
And I can see 1 Workflow Instance is created
Original file line number Diff line number Diff line change
Expand Up @@ -19,47 +19,41 @@ Workflow supports Router Tasks
@RouterTasks
Scenario: Routing Task dispatches single plug-in task
Given I have a clinical workflow Routing_Workflow_Single_Destination
And I have a bucket in MinIO bucket1
When I publish a Workflow Request Message Routing_Workflow_Request
When I publish a Workflow Request Message Routing_Workflow_Request with no artifacts
Then I can see 1 Workflow Instance is created
And Task Dispatch events for TaskIds taskdest1 are published

@RouterTasks
Scenario: Routing Task dispatches multiple plug-in tasks
Given I have a clinical workflow Routing_Workflow_Multi_Destination
And I have a bucket in MinIO bucket1
When I publish a Workflow Request Message Routing_Workflow_Request
When I publish a Workflow Request Message Routing_Workflow_Request with no artifacts
Then I can see 1 Workflow Instance is created
And Task Dispatch events for TaskIds taskdest1, taskdest2 are published

@RouterTasks
Scenario: Routing Task dispatches single plug-in task based on conditional statements
Given I have a clinical workflow Routing_Workflow_Single_Destination_Conditional
And I have a bucket in MinIO bucket1
When I publish a Workflow Request Message Routing_Workflow_Request
When I publish a Workflow Request Message Routing_Workflow_Request with no artifacts
Then I can see 1 Workflow Instance is created
And Task Dispatch events for TaskIds taskdest1 are published

@RouterTasks
Scenario: Routing Task dispatches no tasks based on conditional statements
Given I have a clinical workflow Routing_Workflow_No_Destination_Conditional
And I have a bucket in MinIO bucket1
When I publish a Workflow Request Message Routing_Workflow_Request
When I publish a Workflow Request Message Routing_Workflow_Request with no artifacts
Then I can see 1 Workflow Instance is created
And A Task Dispatch event is not published

@RouterTasks
Scenario: Routing Task dispatches additonal plugin task and triggers another router task
Given I have a clinical workflow Routing_Workflow_Multi_Router
And I have a bucket in MinIO bucket1
When I publish a Workflow Request Message Routing_Workflow_Request
When I publish a Workflow Request Message Routing_Workflow_Request with no artifacts
Then I can see 1 Workflow Instance is created
And Task Dispatch events for TaskIds taskdest1, taskdest2, taskdest3 are published

@RouterTasks
Scenario: Routing Task attempts to dispatch task which does not exist in workflow
Given I have a clinical workflow Routing_Workflow_Invalid_Destination
And I have a bucket in MinIO bucket1
When I publish a Workflow Request Message Routing_Workflow_Request
When I publish a Workflow Request Message Routing_Workflow_Request with no artifacts
Then I can see 1 Workflow Instance is created
And A Task Dispatch event is not published
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ New task is dispatched after a Task update message is received.
@TaskUpdate
Scenario: Publish a valid Task Update event which triggers a single new task
Given I have a clinical workflow Multi_Task_Workflow_3
And I have a Workflow Instance WFI_Multi_Task_3
And I have a Workflow Instance WFI_Multi_Task_3 with no artifacts
When I publish a Task Update Message Task_Update_To_Dispatch_Single_Task with status Succeeded
Then 1 Task Dispatch event is published
And Workflow Instance is updated with the new Task
Expand All @@ -29,7 +29,7 @@ Scenario: Publish a valid Task Update event which triggers a single new task
@TaskUpdate
Scenario: Publish a valid Task Update event which triggers multiple new tasks
Given I have a clinical workflow Multi_Task_Workflow_2
And I have a Workflow Instance WFI_Multi_Task_2
And I have a Workflow Instance WFI_Multi_Task_2 with no artifacts
When I publish a Task Update Message Task_Update_Dispatches_Multi_Tasks with status Succeeded
Then 2 Task Dispatch events are published
And Workflow Instance is updated with the new Tasks
Expand All @@ -39,7 +39,7 @@ Scenario: Publish a valid Task Update event which triggers multiple new tasks
@TaskUpdate
Scenario Outline: Publish a valid Task Update event where the Task status is not created
Given I have a clinical workflow Multi_Task_Workflow_1
And I have a Workflow Instance <workflowInstance>
And I have a Workflow Instance <workflowInstance> with no artifacts
When I publish a Task Update Message Task_Update_Dispatches_Single_Task with status Succeeded
Then A Task Dispatch event is not published
Examples:
Expand All @@ -51,68 +51,66 @@ Scenario Outline: Publish a valid Task Update event where the Task status is not
@TaskUpdate
Scenario: Publish a valid Task Update event as failed which does not trigger a new task and updates the workflow status to Failed
Given I have a clinical workflow Multi_Task_Workflow_1
And I have a Workflow Instance WFI_Multi_Task_1
And I have a Workflow Instance WFI_Multi_Task_1 with no artifacts
When I publish a Task Update Message Task_Update_Dispatches_Single_Task with status Failed
Then A Task Dispatch event is not published
And Workflow Instance status is Failed

@TaskDestinationConditions
Scenario: Task destination with condition true, WFI is updated with Task and task dispatch message is published
Given I have a clinical workflow Multi_Task_Workflow_Destination_Single_Condition_True
And I have a Workflow Instance WFI_Task_Destination_Condition_True
And I have a Workflow Instance WFI_Task_Destination_Condition_True with no artifacts
When I publish a Task Update Message Task_Update_Task_Destination_Condition_True with status Succeeded
Then 1 Task Dispatch event is published

@TaskDestinationConditions
Scenario: Task destination with condition false, WFI is not updated with Task and task dispatch message is not published
Given I have a clinical workflow Multi_Task_Workflow_Destination_Single_Condition_False
And I have a Workflow Instance WFI_Task_Destination_Condition_False
And I have a Workflow Instance WFI_Task_Destination_Condition_False with no artifacts
When I publish a Task Update Message Task_Update_Task_Destination_Condition_False with status Succeeded
Then A Task Dispatch event is not published

@TaskDestinationConditions
Scenario: Multiple task destinations with condition true, multiple task dispatch messages sent
Given I have a clinical workflow Multi_Task_Workflow_Multiple_Destination_Single_Condition_True
And I have a Workflow Instance WFI_Task_Multiple_Destination_Condition_True
And I have a Workflow Instance WFI_Task_Multiple_Destination_Condition_True with no artifacts
When I publish a Task Update Message Task_Update_Task_Multiple_Destination_Condition_True with status Succeeded
Then 3 Task Dispatch events are published

@TaskDestinationConditions
Scenario: Multiple task destinations with condition false, no task dispatch messages sent
Given I have a clinical workflow Multi_Task_Workflow_Multiple_Destination_Single_Condition_False
And I have a Workflow Instance WFI_Task_Multiple_Destination_Condition_False
And I have a Workflow Instance WFI_Task_Multiple_Destination_Condition_False with no artifacts
When I publish a Task Update Message Task_Update_Task_Multiple_Destination_Condition_False with status Succeeded
Then A Task Dispatch event is not published

@TaskDestinationConditions
Scenario: Multiple task destinations one with condition true and one with false, 1 task dispatch message published for task which is true
Given I have a clinical workflow Multi_Task_Workflow_Destination_Multiple_Condition_True_And_False
And I have a Workflow Instance WFI_Task_Destination_Condition_True_And_False
And I have a Workflow Instance WFI_Task_Destination_Condition_True_And_False with no artifacts
When I publish a Task Update Message Task_Update_Task_Destination_Condition_True_And_False with status Succeeded
Then 1 Task Dispatch event is published
And The Task Dispatch event is for Task Id b9964b10-acb4-4050-a610-374fdbe2100d

@TaskDestinationConditions
Scenario: Workflow instance status remains created when any task status is either dispatch or accepted
Given I have a clinical workflow Multi_Task_Workflow_Destination_Single_Condition_True
And I have a Workflow Instance WFI_Task_Destination_Condition_True
And I have a Workflow Instance WFI_Task_Destination_Condition_True with no artifacts
When I publish a Task Update Message Task_Update_Task_Destination_Condition_True with status Succeeded
Then 1 Task Dispatch event is published
And Workflow Instance status is Created

@TaskDestinationConditions
Scenario: Workflow instance status is failed when a condition is invalid
Given I have a clinical workflow Multi_Task_Workflow_Task_Destination_Invalid_Condition
And I have a Workflow Instance WFI_Task_Destination_Invalid_Condition
And I have a Workflow Instance WFI_Task_Destination_Invalid_Condition with no artifacts
When I publish a Task Update Message Task_Update_Task_Destination_Invalid_Condition with status Succeeded
Then A Task Dispatch event is not published
And Workflow Instance status is Succeeded

@TaskDestinationConditions
Scenario: Task destination based on Dicom data conditional is successful, and task is completed and marked as succeeded
Given I have a clinical workflow Workflow_Revision_for_bucket_minio
And I have a Workflow Instance Workflow_instance_for_bucket_minio
And I have a bucket in MinIO bucket1
And I have a payload patient_1_lordge in the bucket bucket1 with payload id 5450c3a9-2b19-45b0-8b17-fb10f89d1b2d
When I publish a Task Update Message Task_status_update_for_bucket_minio with status Succeeded
And I have a Workflow Instance Workflow_instance_for_bucket_minio with artifacts patient_1_lordge in minio
When I publish a Task Update Message Task_status_update_for_bucket_minio with artifacts patient_1_lordge in minio
Then I can see the status of the Task is Succeeded
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Update task status in the workflow instance from a Task Update Event
@TaskUpdate
Scenario Outline: Publish a valid Task Update event which updates the Task status
Given I have a clinical workflow Task_Status_Update_Workflow
And I have a Workflow Instance WFI_Task_Status_Update
And I have a Workflow Instance WFI_Task_Status_Update with no artifacts
When I publish a Task Update Message Task_Status_Update with status <taskUpdateStatus>
Then I can see the status of the Task is updated
Examples:
Expand All @@ -32,15 +32,15 @@ Scenario Outline: Publish a valid Task Update event which updates the Task statu
@TaskUpdate
Scenario: Publish a valid Task Update event that where WorkflowInstance does not contain TaskId
Given I have a clinical workflow Task_Status_Update_Workflow
And I have a Workflow Instance WFI_Task_Status_Update
When I publish a Task Update Message Task_Status_Update_TaskId_Not_Found with status Succeeded
And I have a Workflow Instance WFI_Task_Status_Update with no artifacts
When I publish a Task Update Message Task_Status_Update_TaskId_Not_Found with status Succeeded
Then I can see the status of the Task is not updated

@TaskUpdate
Scenario Outline: Publish an invalid Task Update event which does not update the task status
Given I have a clinical workflow Task_Status_Update_Workflow
And I have a Workflow Instance WFI_Task_Status_Update
When I publish a Task Update Message <taskUpdateMessage> with status Succeeded
And I have a Workflow Instance WFI_Task_Status_Update with no artifacts
When I publish a Task Update Message <taskUpdateMessage> with status Succeeded
Then I can see the status of the Task is not updated
Examples:
| taskUpdateMessage |
Expand All @@ -51,7 +51,7 @@ Scenario Outline: Publish an invalid Task Update event which does not update the

@TaskUpdate
Scenario Outline: Publish an valid Task Update event with a status that is invalid for current status
Given I have a Workflow Instance <existingWFI>
Given I have a Workflow Instance <existingWFI> with no artifacts
When I publish a Task Update Message <taskUpdateMessage> with status <taskUpdateStatus>
Then I can see the status of the Task is not updated
Examples:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ API to interact with WorkflowInstances collection
@GetWorkflowInstances
Scenario: Get all workflows instances - multiple
Given I have an endpoint /workflowinstances
And I have a Workflow Instance Existing_WFI_Created
And I have a Workflow Instance Existing_WFI_Dispatched
And I have a Workflow Instance WFI_Multi_Task_Dispatched
And I have a Workflow Instance Existing_WFI_Created with no artifacts
And I have a Workflow Instance Existing_WFI_Dispatched with no artifacts
And I have a Workflow Instance WFI_Multi_Task_Dispatched with no artifacts
When I send a GET request
Then I will get a 200 response
And I can see expected workflow instances are returned

@GetWorkflowInstances
Scenario: Get all workflows instances - single
Given I have an endpoint /workflowinstances
And I have a Workflow Instance Existing_WFI_Created
And I have a Workflow Instance Existing_WFI_Created with no artifacts
When I send a GET request
Then I will get a 200 response
And I can see expected workflow instances are returned
Expand Down Expand Up @@ -82,22 +82,22 @@ Scenario Outline: Invalid pagination returns 400
@GetWorkflowInstances
Scenario: Get all workflows instances by Id
Given I have an endpoint /workflowinstances/bff4cfd0-3af3-4e2b-9f3c-de2a6f2b9569
And I have a Workflow Instance WFI_Static_1
And I have a Workflow Instance WFI_Static_2
And I have a Workflow Instance WFI_Static_1 with no artifacts
And I have a Workflow Instance WFI_Static_2 with no artifacts
When I send a GET request
Then I will get a 200 response
And I can see expected workflow instance is returned

@GetWorkflowInstances
Scenario: Get all workflows instances by Id. Id Not Found
Given I have an endpoint /workflowinstances/bff4cfd0-3af3-4e2b-9f3c-de2a6f2b9575
And I have a Workflow Instance WFI_Static_1
And I have a Workflow Instance WFI_Static_1 with no artifacts
When I send a GET request
Then I will get a 404 response

@GetWorkflowInstances
Scenario: Get all workflows instances by Id. Id Bad Request
Given I have an endpoint /workflowinstances/absfsushs
And I have a Workflow Instance WFI_Static_1
And I have a Workflow Instance WFI_Static_1 with no artifacts
When I send a GET request
Then I will get a 400 response
Loading