Skip to content

Commit

Permalink
Merge pull request #155 from orkes-io/NOTASK-add-terminate-workflow
Browse files Browse the repository at this point in the history
Add Terminate Workflow
  • Loading branch information
boney9 authored Sep 30, 2022
2 parents 25bee24 + c1b6e5d commit 6023f4a
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/reference-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ See the left navigation for all of the reference documentation for Netflix Condu
* [Inline Task](/content/docs/reference-docs/system-tasks/inline-task)
* [Kafka Publish Task](/content/docs/reference-docs/system-tasks/kafka-publish-task)
* [Business Rule Task](/content/docs/reference-docs/system-tasks/business-rule)
* [Terminate Workflow Task](/content/docs/reference-docs/system-tasks/terminate-workflow)

## Operator Tasks
* [Switch](/content/docs/reference-docs/switch-task)
Expand Down
43 changes: 43 additions & 0 deletions docs/reference-docs/system-tasks/terminate-workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
sidebar_position: 4
---

# Terminate Workflow Task

```json
"type" : "TERMINATE_WORKFLOW"
```

### Introduction
TERMINATE_WORKFLOW is a task used to terminate one or more workflows using workflow IDs.

### Use Cases
Consider a use case where you want to terminate a long-running workflow (or a set of workflows) from another, unrelated workflow.

### Configuration

#### Input Configuration

| Attribute | Description |
|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| workflowId | Either a workflow ID or a list of workflow IDs. |
| terminationReason | Optional text used to update reason for termination of the workflows being terminated. |

#### Output Configuration
Task output will contain field "terminatedWorkflows" which is a set of workflow IDs corresponding to the workflows that were terminated.

## Example

Sample task

```json
{
"name": "terminate_workflow_example",
"taskReferenceName": "terminate_wfs_1",
"inputParameters": {
"workflowId": ["0ea3b193-7268-4886-aa97-d6ed170de854", "${workflow.input.idProvidedFromWorkflowInput}"],
"terminationReason": "Custom reason for termination"
},
"type": "TERMINATE_WORKFLOW"
}
```
5 changes: 5 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ module.exports = {
type: 'doc',
id: 'reference-docs/wait-task',
label: "Wait Task"
},
{
type: 'doc',
id: 'reference-docs/system-tasks/terminate-workflow',
label: "Terminate Workflow"
}
]
},
Expand Down

0 comments on commit 6023f4a

Please sign in to comment.