Skip to content

Workflow Designer#

All the logic applied in an automation integration is designed as a set of workflows using the Automation Controller Workflow Designer.

The Designer works with Drag & Drop logic using Pages, Tasks, Links and Converters.

image1

  1. Page List
  2. Task List (Toolbar)
  3. Active Page Workflow designer
  4. Task
  5. Link
  6. Converter

Pages#

The idea behind the Page, is to design each functionality of the integration individually, in order to keep organization and focus during development, update and support steps.

Each page has its own Workflow, however the complete set of pages are loaded at the same time by the Controller when running, so although they are designed separately, they are executed all together.

There is no direct way to link tasks between different pages.

On the right-hand side menu, on the Pages Tab, you can add [1], remove [3] or edit the page [2]. You can edit the page by changing its core json code, this is useful to export and make small patches.

image2

image3

Warning

Pay close attention when patching the Json, because inconsistencies can be introduced and break the workflow.

Task List (Toolbar)#

All the tasks you can use will be displayed here. This list should contain all the system Tasks along with the custom tasks, if any is available.

This list is controlled by the HTML5 GUI config.json file (Please refer to the respective section regarding location and usage). The important section is:

image4

There is a search bar for the available Tasks, which will filter the list with an incremental search mechanism, displaying only the pertinent matches after each character entered into the field.

Active Page Workflow Designer#

This is the active/current working area. All operations regarding the workflow editing will be performed here. The most important/common are:

  • Drag existing Tasks around the working area to have them aligned/sorted in a more pleasant way;
  • New Task instances can be created by using drag/drop from the Task List, located in the right panel;
  • New links can be created, connecting outputs to inputs;
  • Converters can be defined, changed or deleted by using the right button over links;
  • Visible area can be panned, zoomed in/out, etc.

Task#

A task is a set of code, that can be activated, can have inputs, can emit outputs, can have settings, and/or emit Errors and Successes.

The purpose of having tasks is to have atomic sets of business logic that can perform simple, easy to use and understand, and highly configurable actions. The tasks represent code written in javascript/typescript and as such, can be easily created and debugged, even in runtime.

There are a set of standard tasks described in the following sections; however, due to the extensibility capabilities, it is also possible to create custom tasks tailored to your implementation needs.

In the Task's settings section, you can specify name, description, color and fill in specific settings the task may have. If the task is driver-dependent, it will inherit the assigned driver color, but can be overridden by the color defined in the settings.

image5

A link is a connection between an output value of a task and an input value of a task. The link enables passing values between tasks. A link requires matching types between both sides of the connection.

image6

A link is created by joining an output with an input. The same output can be linked with different inputs, and the same output can have values that originate from different inputs.

The link has several visual cues to help a visual identification of exactly which properties or events from a task are being connected:

User action Visual cue
Link hover When the mouse hovers on top of a link, the line that connects the two tasks will be highlighted, as well as the bezel points that allow for the line to be redrawn
link_highlight
Event hover When the mouse hovers on top of a property or event, the line that connects the two tasks will be highlighted in order to help the user understand the relations between the tasks
event_hover
Single Task selection When the task itself is selected, all the links that originate from it will also be selected
task_select
Multiple Task selection When more than one tasks are selected, only the links that both tasks share will be highlighted in order for the user to distinguish between the different relations
multi_task_select

There are several different options that you can choose to display the links between tasks, defined by two system configuration settings:

  • /Cmf/Guis/Configuration/ConnectIoT/WorkflowDrawerDiagram/LinkConnector - defines the type of connector to use in links. Possible options are:
    • normal - default simple connector.
    • smooth - connector interpolated as a bezier curve (default).
    • rounded - connector with rounded edges.
    • jumpover - connector with bridges over link intersections.
  • /Cmf/Guis/Configuration/ConnectIoT/WorkflowDrawerDiagram/LinkRouter - defines the type of router to use in links. Possible options are:
    • normal - default simple router (default).
    • orthogonal - basic orthogonal router.
    • manhattan - smart orthogonal router.
    • metro - smart octolinear router.
Link Connector Example
normal Screenshot showing a network connection setup with a normal routing configuration.
smooth Screenshot showing a link in a web page related to configuring a "wf conn smooth rout normal" metro-smart octolinear router.
rounded Screenshot showing a connection diagram for a wireless network.
jumpover Screenshot showing a link to configure the "Foupmert Setug" settings.

Table: Different Link Connector examples

Link Router Example
normal Screenshot showing a network connection diagram with a normal routing configuration.
orthogonal Screenshot showing a network connection diagram with a normal route and orthogonal routing.
manhattan Screenshot showing a network connection diagram with a normal route between two nodes labeled Manhattan.
metro Screenshot showing a network connection diagram with a normal route and Metro connectivity.

Table: Different Link Router examples

Converter#

Tasks may have inputs and outputs; as such, they may be linked to other tasks. Sometimes, there is not a type match between the output of a task and the desired input of another task, or for some reason it is useful to apply some small business logic to the output of a task.

In order to address this need, converters were created. You can also use multiple converters on a single link, operating the transformations sequentially, in the order they are called.

As with Tasks, due to the extensibility capabilities, it is also possible to create custom converters tailored to your implementation needs.

If a link has a converter, it will appear with a special icon image7.

In order to add/change a converter to a link, right-click the link, choose converters and fill out the pop-up window with the desired parameters.

If removing all converters is the action desired, follow the same action but choose Remove.

image8

image9