# Scripts with visualization feature

# Sequential flow designer basics

The **Scripts** configuration allows you to execute Python code with the option of using a visual representation, as shown in the screenshot below:

[![sequential 1.png](https://docs.zequenze.com/uploads/images/gallery/2026-02/DXtlAPPBfMMgmSFm-tmpnaseoha8.png)](https://docs.zequenze.com/uploads/images/gallery/2023-09/QyiP7v9dSx0H3vOO-sequential-1.png)

## Interface Components

The sequential flow designer consists of four main components:

### Toolbox
Contains all available steps that can be added to your flow. Simply drag and drop steps from the toolbox into the steps diagram to build your sequence.

### Control Bar
Provides viewport and editing controls:
- Reset viewport
- Zoom in or zoom out
- Undo or redo changes
- Delete the selected step

### Steps Diagram
Displays the flow of steps to be executed in sequence. Click on any step to view and modify its settings in the Step Editor panel.

### Step Editor
Shows the configuration settings for the currently selected step. This panel updates dynamically based on which step you have selected in the diagram.

# Available steps for management scripts in task elements

## Set Value in Objects

[![step1.png](https://docs.zequenze.com/uploads/images/gallery/2026-02/4v7yZ2Sdmp4GO0md-tmpw6hgoij3.png)](https://docs.zequenze.com/uploads/images/gallery/2023-09/CA2eMzaMz9PLD30J-step1.png)

This step allows you to assign different types of values to three available object types within your management scripts.

[![step1-form.png](https://docs.zequenze.com/uploads/images/gallery/2026-02/zjAKDFIHAwLfppDK-tmpil70are7.png)](https://docs.zequenze.com/uploads/images/gallery/2023-09/KrqdiRJjgDBEPbXp-step1-form.png)

### Available Objects

[![step1 dict_type.png](https://docs.zequenze.com/uploads/images/gallery/2026-02/SB4ir27rWkEhMVLS-tmp5o912i57.png)](https://docs.zequenze.com/uploads/images/gallery/2023-09/0vrcX7MHSWeOfMKu-step1-dict-type.png)

The three available objects where you can set values are:
- **data** - For storing and manipulating data values
- **settings** - For configuration and settings parameters
- **context** - For contextual information and workflow variables

### Value Types

[![step1-value type.png](https://docs.zequenze.com/uploads/images/gallery/2026-02/PWNOuUv4779lVJ2l-tmpsyzyc97z.png)](https://docs.zequenze.com/uploads/images/gallery/2023-09/PfNyoMVkdZI7VKb3-step1-value-type.png)

You can set values using different data types and sources depending on your requirements.

### Examples

#### Example 1: Setting a Value in the Settings Object

Setting the `uplink_rx_bytes` parameter in the settings object using information stored in the data object:

[![step1exam1.png](https://docs.zequenze.com/uploads/images/gallery/2026-02/Pr2lYjEjNUpkV2ZW-tmpfehj7pkn.png)](https://docs.zequenze.com/uploads/images/gallery/2023-09/bZHkfyrsZz9llfZb-step1exam1.png)

The above configuration generates the following code:

```python
settings['uplink_rx_bytes'] = round(int(data.get('uplink_rx_bytes_val', '0')) * 0.000000001, 3)
```

#### Example 2: Adding an Email Destination to the Context Object

Adding an email destination to the context object:

[![step1exa2.png](https://docs.zequenze.com/uploads/images/gallery/2026-02/EQ3pRhgoFMVz0pmQ-tmpg2nr5jz5.png)](https://docs.zequenze.com/uploads/images/gallery/2023-09/N1RLhGutlGA31tI0-step1exa2.png)

The above configuration generates the following code:

```python
context['email_destination'] = 'user@mail.com'
```

## Set Last Configuration in Object

[![step2.png](https://docs.zequenze.com/uploads/images/gallery/2026-02/eAhn8HGAUefbScJG-tmp3mu70guv.png)](https://docs.zequenze.com/uploads/images/gallery/2023-09/yua29f3E8nFEflrp-step2.png)

This step allows you to retrieve the last configuration and assign it to one of the available objects. This is useful when you need to access or reference previously saved configuration data within your management scripts.

### Examples

#### Example: Setting Last Configuration in the Context Object

Setting the last configuration in the context object inside the `automation_custom_output` key:

[![step2exa1.png](https://docs.zequenze.com/uploads/images/gallery/2026-02/QOQ5k3YcsUmQa4hK-tmpwcw0nhkm.png)](https://docs.zequenze.com/uploads/images/gallery/2023-09/z7033ScjQcjelm1v-step2exa1.png)

The above configuration generates the following code:

```python
context['automation_custom_output'] = config.get_last_config()
```

# Available steps table

## Overview

FLUX provides three types of scripts, each with specific available steps for workflow automation. This page details all available steps and their properties for each script type.

---

## Management Script Steps

The `management_script` supports the following steps:

### Set Value in Objects

Stores different types of values in one of three available objects using a typed key.

**Properties:**

| Property Name | Type | Label | Options |
|--------------|------|-------|---------|
| dictionary name | str | Object Name | Results, Context, Settings |
| key name | str | Name of key | — |
| value type | — | Type of value | str, number, none, expression |
| value | — | — | — |

### Set SSH Key Pair in Context

Retrieves an SSH key pair and stores it in one of the defined objects using a custom key.

**Properties:**

| Property Name | Type | Label | Options |
|--------------|------|-------|---------|
| privKeyKey | — | — | — |
| pubKeyKey | — | — | — |

### Set Last Configuration

Retrieves the element's last configuration and stores it in one of the available objects using a custom key.

**Properties:**

| Property Name | Type | Label | Options |
|--------------|------|-------|---------|
| dictionary name | str | — | Results, Context, Settings |
| key name | str | — | — |

---

## Processing Script Steps

The `processing_script` supports the following steps:

### Set Value in Objects

Stores different types of values in one of three available objects using a typed key.

**Properties:**

| Property Name | Type | Label | Options |
|--------------|------|-------|---------|
| dictionary name | str | Object Name | Results, Context, Settings |
| key name | str | Name of key | — |
| value type | — | Type of value | str, number, none, expression |
| value | — | — | — |

### Set Last Configuration

Retrieves the element's last configuration and stores it in one of the available objects using a custom key.

**Properties:**

| Property Name | Type | Label | Options |
|--------------|------|-------|---------|
| dictionary name | — | — | — |
| key name | — | — | — |

### Set Variable on Element Config

Sets an attribute in the element configuration object.

**Properties:**

| Property Name | Type | Label | Options |
|--------------|------|-------|---------|
| key name | — | — | — |
| value type | — | — | — |
| value | — | — | — |

### If Condition Simple for Numbers

Checks a simple condition with a numeric variable. Examples: `if a=b`, `if a >= b`, `if a < 12`

**Properties:**

| Property Name | Type | Label | Options |
|--------------|------|-------|---------|
| variable to evaluate | — | — | — |
| operator | — | — | — |
| value | — | — | — |

### If Condition Simple for Strings

Checks a simple condition with a string variable. Examples: `if a.startswith('device_')`, `if a in b`, `if s.endswith(':')`

**Properties:**

| Property Name | Type | Label | Options |
|--------------|------|-------|---------|
| variable to evaluate | — | — | — |
| operator | — | — | — |
| value | — | — | — |

### If Condition Advanced

Evaluates Python conditions. Examples: `if context['host'] == "0.0.0.0.0"`, `if not data.get('apt_upgradable.table')`

**Properties:**

| Property Name | Type | Label | Options |
|--------------|------|-------|---------|
| condition | — | — | — |

### Pause

Executes a `time.sleep(time)` operation.

**Properties:**

| Property Name | Type | Label | Options |
|--------------|------|-------|---------|
| time | — | — | — |

### Pause with Log

Executes a sleep operation with logging.

**Properties:**

| Property Name | Type | Label | Options |
|--------------|------|-------|---------|
| time | — | — | — |

### Update Element Credentials

Reads SSH credentials from context and updates them in the element.

**Properties:**

| Property Name | Type | Label | Options |
|--------------|------|-------|---------|
| privKeyKey | — | — | — |
| pubKeyKey | — | — | — |

### Wait for Connect

Waits for a specified time until the connection against the element executes correctly.

**Properties:**

| Property Name | Type | Label | Options |
|--------------|------|-------|---------|
| timeout | — | — | — |
| retry | — | — | — |
| sleep | — | — | — |

### Set Variable Value

**Note:** To be documented.

**Properties:**

| Property Name | Type | Label | Options |
|--------------|------|-------|---------|
| variable_name | — | — | — |
| value_type | — | — | — |
| value | — | — | — |

---

## Execution Script Steps

The Flow `execution_script` includes all steps from the Processing Script, plus the following additional steps:

### Filter Flow Elements

Applies a function to filter the given elements, with support for in-place modification or returning a new list.

**Properties:**

| Property Name | Type | Label | Options |
|--------------|------|-------|---------|
| elements | list | List of elements | elements, ... |
| filter_function | function | Function to filter elements | — |
| inplace | bool | Replace or return | True, False |

### Task Execution

Runs a specific task on given elements. If the flow containing the task is serial, the elements parameter is not required.

**Properties:**

| Property Name | Type | Label | Options |
|--------------|------|-------|---------|
| short_name | str | Task short name | — |
| elements | list | List of elements to run the task | elements, ... |
| retry_attempts | int | Retry attempts | — |
| retry_delay | int | Retry delay | — |

### Flow Execution

Runs a specific flow on given elements.

**Properties:**

| Property Name | Type | Label | Options |
|--------------|------|-------|---------|
| short_name | str | Flow short name | — |
| elements | list | List of elements to run the flow | elements, ... |
| retry_attempts | int | Retry attempts | — |
| retry_delay | int | Retry delay | — |