-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add "Outcomes" topic and integrate it into navigation
Created a new "Outcomes" topic focusing on workflow logic in Elsa and integrated it into the Concepts section. Updated related files to include links and references to the new topic for better accessibility and visibility.
- Loading branch information
1 parent
950a579
commit 2ccad9d
Showing
3 changed files
with
73 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE topic | ||
SYSTEM "https://resources.jetbrains.com/writerside/1.0/xhtml-entities.dtd"> | ||
<topic xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/topic.v2.xsd" | ||
title="Outcomes" id="Outcomes"> | ||
|
||
<p> | ||
In Elsa, activities are connected to form a flowchart that defines the logic of the workflow. Each activity can have multiple potential results, which are referred to as <i>outcomes</i>. These outcomes serve as "ports" that dictate the next step in the workflow based on the result of the activity. This powerful mechanism simplifies workflows by eliminating the need for separate decision activities to evaluate an activity's result. | ||
</p> | ||
|
||
<chapter title="What is an Outcome?" id="what-is-an-outcome"> | ||
<p> | ||
An outcome in Elsa is a possible result of an activity's execution. Once an activity completes, the workflow can continue down different paths depending on which outcome was produced. For instance, an approval activity might have two outcomes: "Approved" and "Rejected." By connecting these outcomes directly to other activities in the workflow, users can control the flow without the need for intermediate decision activities. | ||
</p> | ||
</chapter> | ||
|
||
<chapter title="How to Use an Outcome?" id="how-to-use-an-outcome"> | ||
<p> | ||
Outcomes are exposed as "ports" or connectors from one activity to the next. When defining a workflow, you can simply connect an activity's outcome to the next relevant activity in the flowchart. This provides a visual and intuitive way of representing decision logic. | ||
</p> | ||
<p> | ||
For example: | ||
</p> | ||
<list> | ||
<li>A "Send Email" activity might have two outcomes: "Success" and "Failure."</li> | ||
<li>Depending on the outcome, you could connect "Success" to a "Log Activity" and "Failure" to a "Retry" activity.</li> | ||
</list> | ||
</chapter> | ||
|
||
<chapter title="Outcomes in Nested Workflows" id="outcomes-in-nested-workflows"> | ||
<p> | ||
Workflows can be used as activities within other workflows, and they too can define their own outcomes. When creating a workflow that you plan to use as a nested activity inside another workflow, you can define its outcomes to represent different execution paths. This allows parent workflows to continue based on the outcome of the nested workflow, offering modularity and flexibility in complex scenarios. | ||
</p> | ||
</chapter> | ||
|
||
<chapter title="Difference Between an Outcome and an Output" id="difference-between-outcome-and-output"> | ||
<p> | ||
While both <i>outcomes</i> and <i>outputs</i> represent information produced by an activity, they serve different purposes: | ||
</p> | ||
<list> | ||
<li><b>Outputs</b>: These are data or results generated by an activity that can be used later in the workflow. Outputs allow activities to pass values (such as a number, string, or object) to subsequent activities for processing or storage.</li> | ||
<li><b>Outcomes</b>: These define the flow of the workflow itself, determining which path to follow based on how the activity completes. Instead of providing data, outcomes shape the control flow by specifying which activity should run next.</li> | ||
</list> | ||
<p> | ||
For instance, a "Form Submission" activity might have an <i>output</i> containing form data (e.g., the values entered by the user), while its <i>outcome</i> might determine whether to send a confirmation email or display an error message depending on whether the form validation was successful or not. | ||
</p> | ||
</chapter> | ||
|
||
<chapter title="Benefits of Using Outcomes" id="benefits-of-using-outcomes"> | ||
<list> | ||
<li><b>Simplification of Flow Logic</b>: By using outcomes, workflows become more streamlined since there is no need for decision nodes to handle activity results.</li> | ||
<li><b>Visual Clarity</b>: The flowchart clearly shows which path follows from each possible outcome, making it easier to understand at a glance.</li> | ||
<li><b>Modularity</b>: Workflows and activities can be reused more easily when outcomes are well-defined, enabling a flexible and scalable workflow design.</li> | ||
</list> | ||
</chapter> | ||
|
||
<p> | ||
In summary, outcomes in Elsa Workflows provide a simple and effective way to direct the flow of your workflows based on how activities conclude. By distinguishing between outcomes and outputs, users can manage both the logical flow and the data flow in their workflows with clarity and ease. | ||
</p> | ||
</topic> |