Skip to content

Commit

Permalink
Merge pull request #794 from orkes-io/liv-update
Browse files Browse the repository at this point in the history
doc update
  • Loading branch information
RizaFarheen authored Nov 22, 2024
2 parents 635932a + e6a6a0c commit bbda6d1
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 46 deletions.
42 changes: 42 additions & 0 deletions docs/conceptual-guides/workflow-and-task-status.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
slug: "/developer-guides/task-and-workflow-status-in-conductor"
description: "Find out the different workflow and task status in Conductor."
---

# Workflow and Task Status

The workflow and task statuses are crucial to understanding the execution mechanism in Conductor. You can check a workflow execution’s current status and task status [from the Conductor UI](debugging-workflows#searching-and-viewing-workflow-executions) or [using API](/reference-docs/api/workflow/search-workflow-executions).

## Workflow status

Once started, a workflow execution will either be in an ongoing or terminal status.

| Status | Description |
| --------------------------------- | --------------------------------- |
| RUNNING | The workflow is in progress. |
| PAUSED | The workflow is paused by a user or external event, and is waiting for a manual action to resume. |
| COMPLETED | Terminal status where all the tasks in the workflow are completed. |
| TIMED_OUT | Terminal status where one of the workflow tasks has timed out. |
| TERMINATED | Terminal status where an incomplete workflow has been terminated by a user, event, or another workflow. |
| FAILED | Terminal status where the workflow has encountered an error and failed. You can [retry the workflow execution from the failed task](debugging-workflows#recovering-from-failures). |

## Task state transitions

During a workflow execution, each task will go through the state transitions illustrated in the figure below. These states roughly correspond to the nine task statuses in Conductor.

<p align="center"><img src="/content/img/conceptual-guides/workflow_lifecyle-task_states.png" alt="Task state transitions in Conductor." width="100%" height="auto"></img></p>

### Task status
Each task will be in a scheduled, ongoing, or terminal status.

| Status | Description |
| --------------------------------- | --------------------------------- |
| SCHEDULED | The task has been scheduled to be picked up by a worker. |
| IN_PROGRESS | The task is being executed by a worker. |
| SKIPPED | The task is skipped without executing, and the workflow continues to the subsequent tasks. <br/><br/> Occurs if the [Skip Task API](/reference-docs/api/workflow/skip-task-from-workflow) is used during a currently running workflow. |
| TIMED_OUT | The task times out without being completed. <br/><br/> Occurs if the task has been configured with the following timeout parameters in its task definition: <ul><li>timeOutPolicy.</li><li>timeOutSeconds</li><li>pollTimeoutSeconds</li><li>responseTimeoutSeconds</li></ul> |
| CANCELED | The scheduled task has been canceled without being completed because the workflow has been terminated. |
| FAILED | The task failed to complete due to an error, and the workflow can be [retried from the failed task](debugging-workflows#recovering-from-failures). |
| FAILED_WITH_TERMINAL_ERROR | The task failed to complete due to an error and cannot be retried. |
| COMPLETED_WITH_ERRORS | The task encountered some errors but is completed. <br/><br/> Occurs due to a variety of reasons. For example, if a task is set as optional and fails during execution. |
| COMPLETED | The task has been successfully completed without any errors. |
5 changes: 5 additions & 0 deletions docs/developer-guides/building-workflows.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
slug: "/developer-guides/building-workflows"
description: "This guide focuses on the basics of building workflows in Orkes Conductor, including configuring task inputs and outputs, using workers, managing AI and human tasks, failure handling, and more."
---

# Building Workflows

In Conductor, all workflow definitions are stored as JSON. There are three ways to create a Conductor workflow:
Expand Down
30 changes: 0 additions & 30 deletions docs/developer-guides/task-and-workflow-status-in-conductor.md

This file was deleted.

17 changes: 6 additions & 11 deletions docs/developer-guides/using-workers.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,21 @@ python3 -m pip install conductor-python

**For Gradle:**
``` java
implementation 'org.conductoross:conductor-client:4.0.0'
implementation 'io.orkes:orkes-conductor-client:4.0.0'
implementation 'org.conductoross:conductor-client:4.0.1'
implementation 'io.orkes.conductor:orkes-conductor-client:4.0.1'
```

**For Maven:**
``` xml
<dependency>
<groupId>org.conductoross</groupId>
<artifactId>conductor-client</artifactId>
<version>4.0.0</version>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>io.orkes</groupId>
<artifactId>orkes-conductor-client</artifactId>
<version>4.0.0</version>
<version>4.0.1</version>
</dependency>
```

Expand Down Expand Up @@ -385,12 +385,7 @@ For well-defined access controls, your worker application should be kept separat
<p align="center"><img src="/content/img/using-workers/using_workers-application_roles.png" alt="Add worker to application account in Orkes Platform" width="100%" height="auto"></img></p>
2. Get the application access key for your worker project.
1. Under Access Keys, select **Create access key** and store your credentials securely.
2. Set the Key ID and Key Secret in your project environment variables.
``` bash
export CONDUCTOR_SERVER_URL=<SERVER_URL> // eg: https://play.orkes.io/api
export CONDUCTOR_AUTH_KEY=<KEY_ID>
export CONDUCTOR_AUTH_SECRET=<KEY_SECRET>
```
2. Set the Key ID and Key Secret in your project.
3. Grant Execute permission to the application.
1. Under Permissions, select **Add permission**.
2. Select the **Task** tab and then your worker task.
Expand Down Expand Up @@ -469,7 +464,7 @@ Refer to the [Create Workflow Definition](../reference-docs/api/metadata/creatin
### Run workflow

Run the workflow to ensure that your worker has started successfully. If not, return to the previous steps and verify that all details have been entered correctly, such as:
* **Server URL, Key ID, and Key Secret** Added to your environment variables.
* **Server URL, Key ID, and Key Secret**Set in your worker project.
* **Execute permissions**—Added for the worker task in your application account.
* (if applicable) **Domain**—The domain in your code matches the domain used during workflow execution and in the application permissions.

Expand Down
Binary file removed docs/faqs/img/task_states.png
Binary file not shown.
21 changes: 16 additions & 5 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,30 @@ const sidebars = {
id: 'getting-started-orkes-cloud',
className: 'leftMenuHeader',
},
{
type: 'category',
label: 'Conceptual Guides',
link: {
type: 'generated-index',
title: 'Conceptual Guides',
slug: '/category/conceptual-guides',
},
className: 'leftMenuHeader',
items: [
'conceptual-guides/workflow-and-task-status',
]
},
{
type: 'category',
label: 'Developer Guides',
link: {
type: 'generated-index',
title: 'Developer Guides',
slug: '/category/developer-guides',
keywords: ['guides', 'features', 'developer-guides']
},
className: 'leftMenuHeader',
collapsible: true,
collapsed: false,
items: [
{
type: 'category',
Expand Down Expand Up @@ -174,7 +189,6 @@ const sidebars = {
},
className: 'leftMenuHeader',
items: [
'developer-guides/task-and-workflow-status-in-conductor',
'developer-guides/scheduling-workflows',
'developer-guides/sending-signals-to-workflows',
]
Expand Down Expand Up @@ -479,9 +493,6 @@ const sidebars = {
],
},
],
collapsible: true,
collapsed: false,
className: 'leftMenuHeader',
},
{
type: 'category',
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bbda6d1

Please sign in to comment.