Skip to content

Commit

Permalink
fix: details accordion
Browse files Browse the repository at this point in the history
  • Loading branch information
gulam159 committed Feb 4, 2025
1 parent b38da77 commit 7b18678
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 14 deletions.
1 change: 1 addition & 0 deletions docs/developer-guides/error-handling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ To configure tasks that never timeout, set `timeOutSeconds` and `pollTimeoutSeco

<details>
<summary>Poll timeout</summary>

In the figure below, task T1 isn’t polled by the worker within 60 seconds, so Conductor marks it as `TIMED_OUT`.

<p align="center">
Expand Down
34 changes: 27 additions & 7 deletions docs/developer-guides/task-to-domain.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ description: "Learn how to route tasks to different sets of workers using the co

# Routing Tasks (Task-to-domain)

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

In Conductor, tasks are executed by workers, and the Conductor server manages task distribution through a task queue. The **task-to-domain** feature allows tasks to be routed to specific sets of workers based on domain labels. This gives you finer control over task execution, enabling you to assign tasks to workers with specific capabilities, permissions, or configurations.

Expand All @@ -17,13 +17,25 @@ Task-to-domain is a concept that allows you to route task executions to a specif

To better understand the concept of routing tasks, consider an example task, `send_email`. By default, the task queue distributes this task to all available workers, as shown:

<p align="center"><img src="/content/img/task-routing.png" alt="Task distribution by default" width="90%"
height="auto"/></p>
<p align="center">
<img
src="/content/img/task-routing.png"
alt="Task distribution by default"
width="90%"
height="auto"
/>
</p>

To route this task to a specific group of workers, you can assign it a domain when triggering the workflow. The task is then routed only to workers configured for that domain.

<p align="center"><img src="/content/img/task-routing-domains.png" alt="Task distribution via dedicated domains" width="90%"
height="auto"/></p>
<p align="center">
<img
src="/content/img/task-routing-domains.png"
alt="Task distribution via dedicated domains"
width="90%"
height="auto"
/>
</p>

Here, the `send_email` task has two additional sets of worker instances that listen to specific domain-based tasks. For example, all the tasks triggered with domain `dedicated_for_app_x` are sent to the workers configured with domain `dedicated_for_app_x`.

Expand Down Expand Up @@ -235,7 +247,14 @@ For running a workflow from the Conductor UI, define the following task-to-domai
}
```
<p align="center"><img src="/content/img/task-to-domain.png" alt="Task To Domain mapping while invoking workflows" width="100%" height="auto"></img></p>
<p align="center">
<img
src="/content/img/task-to-domain.png"
alt="Task To Domain mapping while invoking workflows"
width="100%"
height="auto"
></img>
</p>
</TabItem>
</Tabs>
Expand Down Expand Up @@ -295,6 +314,7 @@ In this configuration,

<details>
<summary>Using fallback domain</summary>

In this example, we’ll assume the `taskToDomain` mapping is as follows:

```json
Expand Down
21 changes: 17 additions & 4 deletions docs/reference-docs/operators/dynamic-fork.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ slug: "/reference-docs/operators/dynamic-fork"
description: "The Dynamic Fork task is used to run tasks in parallel, with the number of forks determined at run-time. "
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

# Dynamic Fork

Expand Down Expand Up @@ -204,7 +204,12 @@ forkTaskName and forkTaskInputs will take precedence even if dynamicForkTasksPar
- `forkTaskName` and `forkTaskInputs` for all other task types.
3. Select the Join task and configure its settings to complete the fork/join operations.

<p><img src="/content/img/Task-References/dynamic_fork_task_reference.png" alt="Screenshot of Dynamic Fork Task in Orkes Conductor"/></p>
<p>
<img
src="/content/img/Task-References/dynamic_fork_task_reference.png"
alt="Screenshot of Dynamic Fork Task in Orkes Conductor"
/>
</p>

</TabItem>
</Tabs>
Expand Down Expand Up @@ -364,7 +369,14 @@ During execution, Conductor will insert an additional parameter called `index` i
}
```

<p align="center"><img src="/content/img/Task-References/dynamic_fork_task-fruit_example_input_UI.png" alt="UI screenshot of one input instance for the Dynamic Fork task at run-time" width="70%" height="auto"/></p>
<p align="center">
<img
src="/content/img/Task-References/dynamic_fork_task-fruit_example_input_UI.png"
alt="UI screenshot of one input instance for the Dynamic Fork task at run-time"
width="70%"
height="auto"
/>
</p>

If simple values are used in `forkTaskInputs`, such as `"fruits" = ["apple", "orange", "kiwi"]`, Conductor will set each array element in a parameter called `input`, like so:

Expand Down Expand Up @@ -425,6 +437,7 @@ The parameter `method` has a default value of GET and need not be specified if t

<details>
<summary>Running the same task — Sub Workflow task</summary>

In this example, the dynamic fork runs Sub Workflow tasks in parallel.

```json
Expand Down
1 change: 1 addition & 0 deletions docs/reference-docs/operators/human.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ Here are some examples for using the Human task.

<details>
<summary>Expense approval</summary>

In this example, an expense approval workflow contains two Human tasks, one for approval by the HR department and another for approval by the Finance department. Since the approval process is the same for both rounds, the same user form template can be re-used across both Human tasks.

The expense name and amount are passed into read-only form fields for the user to view and approve. If the expense has been approved by HR, it will proceed to the next stage of approval. Otherwise, the workflow will terminate. Once the expense has been approved by Finance, a notification workflow will be triggered.
Expand Down
16 changes: 13 additions & 3 deletions docs/reference-docs/system-tasks/inline.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ slug: "/reference-docs/system-tasks/inline"
description: "The Inline task enables the execution of essential logic during workflow runtime by evaluating a JavaScript expression."
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

# Inline

Expand Down Expand Up @@ -55,14 +55,24 @@ The Inline task will return the following parameters.
2. In **Script params**, add the parameters that will be evaluated in the expression.
3. Enter the expression to be evaluated in the **Code** section. The JSON definition offers a concise string representation of the script, whereas the UI representation typically incorporates formatted indentation and line breaks to enhance user readability.

<center><p><img src="/content/img/ui-guide-inline-task.png" alt="Adding wait task" width="80%" height="auto"/></p></center>
<center>
<p>
<img
src="/content/img/ui-guide-inline-task.png"
alt="Adding wait task"
width="80%"
height="auto"
/>
</p>
</center>

## Examples

Here are some examples for using the Inline task.

<details>
<summary>Using the Inline task in a workflow</summary>

An Inline task can be used for simple scripting logic that does not require a dedicated custom worker. In this example workflow, the Inline task is used to reverse a string based on the user input.

```javascript
Expand Down

0 comments on commit 7b18678

Please sign in to comment.