Skip to main content

Managing Tasks

Adding a task

To add a task to the designer:

  • Select a task in the task navigator.
  • Drag it to the workflow pane.
  • Edit the task parameters.

Editing task

To start editing task settings, double-click on a task block. A dialog with several tabs will pop up.

The main Tab

Main tab contains specific parameters for each task.

tab1

"Start only if" parameter
Lets you define if the task will be executed.

If the result of evaluation is False: Workflow execution will stop.

else: Execute the task.

"Bypass" parameter
Lets you define if the task will be skipped.

If the result of evaluation is False: The task will be executed as usual.

If True: The task will not be executed and the OK port will be triggered .

Logs

Allow workflow to feedback all needed information that could be useful in development mode. Beware this could be time-consuming in production.

logs

It's a good practice to deactivate all logs but message, error, and error context logs from Root node, decreasing the amount of transferred information, and accelerating workflow execution/UI feedback.

Webhooks tab

A Webhook is a POST request sent to a predefined URL during a specific event. It allows you to send feedback information to your information system for example.

To add a new Webhook:

Press the "+ Webhook" button.

add_webhook

Enter the URL you wish to call. Select on which event you want the webhook to be called.

webhook

Callbacks tab

Callbacks are code executed at specific moments.

Callbacks Execution cycle

Callbacks are small piece of code, called at a specific period of time. Here is schema of those different call. tab1

callbacks

On Initialize
Triggered once before task execution. It's a good place to import necessary libs or initialize variables. If you want to have those import available globally for all the workflow tasks, use the Home task /Helper tab instead.

On Success
Triggered if execution is successful.

On Error
Triggered if execution generate an error.

On Max retry
Triggered if execution reach max level of Max Retry (defined in Error tabs).

Errors tab

This tab defines how workflow should behave in case of error.

errors

On Reached
Possible values:

  • Abort Task
    This is the default mode, When max retry is reached, task is terminated, and workflow execution will continue.

  • Abort Workflow
    When max retry is reached, all the workflow tasks will be aborted, including pending transfers.

If skipped
Possible values:

  • Trigger OK Port.
  • Trigger Error Port.

Execution tab

execution

Mode

  • Parent thread; Use this mode if a lot of instances of this task will be performed, and no threaded capabilities are needed. Typically, a task message executed a lot of times could use less resources using "parent thread" mode.

  • New thread; Task execution will be performed inside a new python thread, letting you run several different tasks concurrently. When a task is created inside a new thread, caller (parent) task will wait for end of execution of all his children created in New thread mode.

  • Standalone; Use this mode when you need threading capabilities, but you don't need to wait for the end of task, neither about task result.

Export Context

  • Don't export
    No variable of current context will be cloned. New tasks will have only loop_index, loop_loop_key, loop_value and gc accessible inside context.

  • Duplicate
    Will clone first level variables of current context before assigning it to a new task context. This is the default behavior, and let you access to a copy of parent context inside tasks descendants.

  • Through task key
    Exporting context "Through task key" allow you to access to a single instance of an object inside the descendants of the task. For example, you can declare my_list = [] inside a task "my_task", and add elements from any descendants tasks using my_task. my_list.append(my_object).

This behavior is not possible with duplicate context, as all objects accessible inside context are cloned.

Loop_index, loop_loop_key and loop_value are always cloned.

Task info tab

task_info

Task key
This is the unique key name for the task.

Icon
Icon list can be found there: Bootstrap Icons

Deleting a task

To delete a task, select it and press Delete. All links from and to this task will be deleted.

Linking a task to another

The Different ports

Blue port
The blue port is the input port of every task except for Start task that have no Blue port.

Green port
The green port also known as the OK port is used when a task execution ends without errors.

Red port
The red port is when a task or subtask execution failed.

Yellow port
The yellow port can be the one called for every value of an iterator.

Orange port
The orange port is used for the false value in "If or not" task.