-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Ready for review.
Showing
7 changed files
with
98 additions
and
1 deletion.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,37 @@ | ||
# Workflow Execution and Data Flow | ||
|
||
::: info | ||
[Learn the difference between Plugins and Workflows in Caido.](https://developer.caido.io/concepts/backend/workflow.html) | ||
::: | ||
|
||
The order of Workflow operation can be split into two concepts: | ||
|
||
## Workflow Execution | ||
|
||
A Workflow processes Nodes in sequential order: | ||
|
||
1. Beginning at the root of the Node tree with either a "Start" or "Intercept" Node. | ||
2. Every subsequent node in the chain is processed in order. The execution may take the path of another branch based on conditionals. | ||
3. The Workflow ends either when it reaches an explicit "End" Node or when no more Nodes are available in the chain. | ||
|
||
<img alt="Register command SDK." src="/_images/execution_flow.png" center/> | ||
|
||
## Workflow Data Flow | ||
|
||
Each Node in a Workflow has an input and output data type. | ||
|
||
::: info | ||
The `Choice` and `Code` types are just variations of `String`. | ||
::: | ||
|
||
With this typed data system, even though Nodes are processed sequentially, you do not need a direct line between two Nodes in order to pass data from one to another. Instead, data can be referenced using dot notation of a Node's alias and it's output alias: | ||
|
||
``` | ||
[node_alias].[output_alias] | ||
``` | ||
|
||
::: tip | ||
You can view the data type by clicking on a Node and viewing the value within the parenthesis next to the name of the object. | ||
::: | ||
|
||
<img alt="Register command SDK." src="/_images/data_flow.png" center/> |
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,52 @@ | ||
# Workflow Data Types | ||
|
||
Nodes are defined by various different input and output data types. | ||
|
||
When referencing a Node's data for use in another, the types must be compatible with each other. | ||
|
||
## Data Type Conversions | ||
|
||
Data can be shared across Nodes as long as the types are `Exact` (expected) or are `Compatible` based on the following conversions: | ||
|
||
::: tip | ||
You can view the data type by clicking on a Node and viewing the value within the parenthesis. This will be above the reference data dropdown menu. | ||
|
||
::: | ||
|
||
### String | ||
|
||
::: info | ||
The `Choice` and `Code` are not types in of themselves but rather just specializations of `String`. | ||
::: | ||
|
||
Strings are compatible with: | ||
|
||
- **Bytes**: String (UTF-8 with lossy conversion, invalid characters are replaced with `�`). | ||
- **Bool**: String (converts to `"true"` or `"false"`). | ||
- **Integer**: String (base-10 decimal encoding). | ||
|
||
### Bytes | ||
|
||
Bytes are compatible with: | ||
|
||
- **String**: Bytes (UTF-8 encoding). | ||
- **Bool**: String (converts to `"true"` or `"false"` in bytes). | ||
- **Integer**: String (converts to string representation in bytes). | ||
|
||
### Bool | ||
|
||
Booleans are compatible with: | ||
|
||
- **Integer**: Bool(`true` if integer is not zero - otherwise `false`). | ||
- **Bytes/String**: Bool(`true` for "true", "on", "yes", and "1" - otherwise false). | ||
|
||
### Integer | ||
|
||
Integers are compatible with: | ||
|
||
- **Bool**: Integer(`true` if integer !=0 - otherwise `false`). | ||
- **Bytes/String**: Integer(parseIt ("0x123", "10", "#0b0", "0o123", "-123"), lossy string conversion for bytes). | ||
|
||
### Request & Responses | ||
|
||
There is no conversion besides their own. |