diff --git a/config.toml b/config.toml index 34dcca0..bea4c89 100644 --- a/config.toml +++ b/config.toml @@ -80,6 +80,12 @@ hasChildren = true url = "core-concept/satellite/http-api" weight = 5 + [[menu.main]] + parent = "Core concepts" + name = "Action" + url = "core-concept/satellite/action" + weight = 6 + [[menu.main]] weight = 3 name = "Features" diff --git a/content/core-concept/satellite/action/index.en.md b/content/core-concept/satellite/action/index.en.md new file mode 100644 index 0000000..cfa9689 --- /dev/null +++ b/content/core-concept/satellite/action/index.en.md @@ -0,0 +1,132 @@ +--- +title: "Action" +date: 2023-07-06T15:06:20+02:00 +draft: false +weight: 4 +--- + +{{< feature-state for_mw_version="0.1" state="alpha" >}} + +- [What is it for?](#what-is-it-for) +- [Installation](#installation) +- [Basic Usage](#basic-usage) +- [Advanced Usage](#advanced-usage) + - [Using expressions](#using-expressions) + - [Adding logger](#adding-logger) + - [Adding state](#adding-state) + +--- + +> An action is a process that enables a task to be carried out before, during or at the end of the execution of a workflow. +> For example, an action can be used to retrieve or upload files to an SFTP server. + +## What is it for? + +This package provides a process capable of executing actions. + +## Installation + +```shell +composer require php-etl/action +``` + +## Basic usage + +At present, actions can only be used within a workflow. It is therefore not currently possible to launch an action on its own. + +```yaml +workflow: + jobs: + - action: # ... +``` + +We've made sure that you can use your own actions. + +You need to implement the `Kiboko\Contract\Action\Interface` and in the `execute` method, you simply write your script. + +```php + As you can see, actions are only able to manage the logs and states of their processes, +> but cannot deal with rejects that are contrary to pipelines.