Data Workflow Component

Overview

Your Unqork applications rely on data to function. But, data by itself doesn't create functionality. Data processing does. Data processing is the collection and manipulation of data to create desired results.

Most components process data in specific ways. For example, the Calculator component makes calculations. And input components can store a string or number. The Data Workflow component has broader functionality. It's an Extract, Transform, Load (ETL) tool that lets you transform, manipulate, and move data. With the Data Workflow component you can process data in almost infinite ways.

Here are just a few of many examples:

  • Display form submission data in an internal dashboard.

  • Convert an end-user's quiz answers into a grade.

  • Transfer data to other components.

  • Isolate an area code from a phone number.

You'll find the Data Workflow component under the Data and Event Processing group at the left of the Module Builder.

What You'll Learn

In this article, you'll learn about the Data Workflow component, its settings, and how to use one in a module.

About the Configuration Window

General

A static image displaying the Data Workflow component's configuration window General settings.

Setting

Description

Canvas Label Text

A Data Workflow component's Canvas Label Text conveys what the component is and what information it displays. You can only see it in the Module Builder canvas.

User-friendly labels make your module more accessible. Keep labels short and descriptive (a word or two) using title case. For longer entries, use sentence case.

Property Name

A Property Name (Property ID) is the unique field ID used by Unqork to track and link your module components.

The Property Name is how the software identifies your component. Using Property Names lets you link components, creating logic-based configurations and API (application programming interface) calls.

Property Names should use camel case (stylized as camelCase) without spaces or punctuation.

Permissions Tab

Select this tab to see the RBAC RBAC (Role-Based Access Control) is a method to control system access for authorized users. The role in RBAC refers to the levels of access employees have to a network. (role-based access control) settings of the component.

Learn About Using Data Workflow

This link takes you to the Unqork In-Platform Help Data Workflow article.

Cancel Button

Cancels any recent configuration changes and returns you to the Module Builder canvas.

Save Button

Saves all settings as configured and returns you to the Module Builder canvas.

Operator List and Canvas Settings

The next thing you'll notice about the Data Workflow component is its canvas. The canvas is where you place and arrange your Data Workflow operators.

Operators are the individual components of your workflow. They let you manipulate large and complex data structures from multiple sources. You'll string together operators to create workflows.

In this section, you can also decide how you want your data to look on the canvas.

A static image displaying the Data Workflow configuration window.

Category

Description

Search

Lets you quickly search for an operator by name.

Frequently Used

Opens a list of operators that you often use. Unqork pulls these operators from various Data Workflow canvas categories for easy access.

I/O

Opens a list of operators in the Input and Output categories. To pull data into your Data Workflow, you'll use an Input operator. And, you'll use the Output operator to output data to a component of your choice.

Gateways

Opens a list of operators that tell your data where to go. From here you can set rules, split up data, create switches, and more.

Table

Opens a list of operators that handle your data within a table (an array of objects). You can aggregate data, create fields, filter, and more.

Array

Opens a list of operators that let you manipulate arrays. Arrays are data structures used to group related elements, like a list of addresses.

Object

Opens a list of operators that let you manipulate objects. Objects are data structures that represent one self-contained entity, like a single address.

Value/String

Opens a list of operators that let you manipulate key/value pairs, including strings, numbers, and Boolean values. The Value/String group also includes operators that let you create simple key/value pairs in the Data Workflow.

Enable Manual Layout

Lets you place operators anywhere on the canvas, rather than having them snap into place. By default, this toggle is set to OFF.

TIP  To learn more about the different operators, search by operator name in our In-Product Help.

Show Table Settings

The canvas gives plenty of space to manipulate your operators. But it can be deceiving when you want to know the order they fire in. Even if you place one operator in front of another on the canvas, it doesn't always mean it triggers first. This is where the Table View is helpful. The Data Workflow Configuration table lists your operators in the order they fire. You’ll reorder operators on the canvas by removing and readding them. Reordering the table rows doesn't affect how your operators look on the canvas, but can change the order they trigger or populate. For example, if one path leads to two outputs (one value and one trigger), the order in which they display in the table is the order they execute.

Setting

Description

Show Table

Clicking this button expands the settings window to show the Inputs, Outputs, and the Data Workflow Configuration tables. Here you'll see all the operators in table form and in the order that they fire.

Inputs Table

Displays every Input operator's property ID, Label, Requirement, and Source that's entered in the Data Workflow canvas. You can also edit these settings from the Inputs Table.

Outputs Table

Displays every Output operator's property ID, Label, and Action entered in the Data Workflow canvas. You can also edit these settings from the Outputs table.

Data Workflow Configuration Table

Displays every other operation on the Data Workflow canvas in the order they fire. From here, you can see each operator's Label and Opt 1-5.

Opt columns represent fields in each operator. For example, in the Clean Keys operator, Opt 1, Opt 2, and Opt 3 represent the Keys, Fill If, and Fill With fields respectively.

Component Options

In this section, you'll decide how your Data Workflow runs and collects data.

Setting

Description

Trigger Type

A drop-down menu that lets you decide how to trigger your Data Workflow.

  • Manual waits for a cue, such as a button-click, before triggering.

  • Watch waits for an action to happen before triggering.

By default, this drop-down is set to Manual.

Disable Execution

If Disable Execution is set to Toggle On Icon (ON), the logic tied to this component does not execute. Use this to keep the component's settings, but disable the operations it performs.

By default, this setting is set to Toggle Off icon (OFF).

Debug

Selecting this checkbox outputs the Inputs and Outputs for each operator. This breaks down each execution, operation, and data stream occurring in the Data Workflow. You can see these in the DevTools Console.

Unit Testing

It's important to make sure all operators work as intended. So, you can run a test of your configuration before finalizing the Data Workflow component. Just enter the data you want to test in the Inputs table, and the results of the test show in the Outputs table. Console operators output to the console when running a unit test. This makes configuring more efficient and is a good way to catch logic errors early.

To get started, click Add Test to create a new test.

Setting

Description

Input Table

Use this table to enter the information you want to test. If you have multiple inputs and want to skip testing certain inputs, just leave the Value column blank.

NOTE  If you set an input as required, then you must enter its value. Only non-required inputs can have a blank Value column.

Input

Automatically populates all components in your Data Workflow synced with an Input operator.

Label

Automatically populates the label of your connected Input component.

Value

Enter example data in this column that you want to test.

NOTE  If you enter a JSON value with a syntax error (such as a missing bracket), the cell turns yellow indicating an error scenario.

JSON

Select this checkbox when you enter a Value that's written in JSON. This can be an object, array, number, or Boolean (true/false) value.

Run Test

Runs the test with the Input values entered.

Run All Tests

Runs all added tests with the Input values entered.

Output Table

This table displays the results of your test.

Output

Automatically populates all components listed in the Calculator's Outputs table.

Label

Automatically populates with the label of your connected Output component.

Expected

Enter the outcome you expect from the test you're running. You can use this to compare the result you expected with the actual result side-by-side.

NOTE  This column is optional. If you decide to leave it blank, the cell turns red when the unit test runs.

Actual

The result from the test you ran.

JSON

Select this checkbox when your result must display in JSON. This can be an array, string, or object.

Refresh Fields

Updates all Input fields to reflect changes on the canvas.

Delete Test

Removes an existing test.

Duplicate

Makes a copy of an existing test.

Close Unit Testing

Collapses the Unit Testing section. When collapsed, the button text changes to "Open Unit Testing." Clicking this button again expands the Unit Testing section.

Adding a Data Workflow Component

What You'll Need

To set up this use case, you'll need the following components:

To set up your Data Workflow, you'll need:

NOTE  These instructions assume that you have an open module saved with a title.

Configure the Data Table Component

First, you'll need a table you can turn into an object. A Data Table component is perfect for this. You'll set up a table with 2 columns: field and value. The values in the field column become the keys in each unique key/value pair. And the values in the value column become the values in each unique key/value pair.

1. Drag and drop a Data Table component onto your canvas.
2. In the Label and Property Name fields, enter dtTable.
3. Complete the Data Table as follows:
  A B

1

field

value

2

incomeAnnual

68000

A static image displaying Data Table values enter into the first and second rows.

4. Click Save.

Configure the Hidden Component

Before you can add your Data Workflow, you need a place to store its output. For that, you'll use a Hidden component.

1. Drag and drop a Hidden component onto your canvas, placing it below your Data Table.
2. In the Property ID and Canvas Label Text fields, enter income .
3. Click Save.

Configure the Data Workflow Component

Next, you'll set up the Data Workflow itself.

1. Drag and drop a Data Workflow component onto your canvas, placing it above your Hidden component.
2. In the Canvas Label Text and Property Name fields, enter dwfData.

A static image displaying the Data Workflow configuration window, the Label and Property Name fields are highlighted.

Configure the Input Operator

The Input operator brings the data from the Data Table component into the Data Workflow.

1. Drag and drop an Input operator onto your Data Workflow canvas.
2. Configure the Input operator's Info window as follows:

Setting

Value

Component

dtData

required

Yes

source

Default

Configure the Table2Object Operator

Next, the Table2Object operator converts the table data structure into an object.

1. Drag and drop a Table2Object operator onto your Data Workflow canvas.
2. Configure the Table2Object operator's Info window as follows:

Setting

Value

Key Column Name

field

Value Column Name

value

3. Connect the output port (right) of the Input operator to the input port (left) of the Table2Object operator.

Configure the Get Operator

Now you'll use a Get operator to pull out the incomeAnnual value from the object.

1. Drag and drop a Get operator onto your Data Workflow canvas.
2. Configure the Get operator's Info window as follows:

Setting

Value

Path

incomeAnnual

3. Connect the output port (right) of the Table2Object operator to the input port (left) of the Get operator.

Configure the Output Operator

Next, let's output the incomeAnnual value to the income Hidden component.

1. Drag and drop an Output operator onto your Data Workflow canvas.
2. Configure the Output operator's Info window as follows:

Setting

Value

Component

income

action

value

3. Connect the output port (right) of the Get operator to the input port (left) of the Output operator.

Configure the Console Operators

Add 3 Console operators at each step of your Data Workflow. The Console operators let you see what's happening to your data in the DevTools Console.

1. Drag and drop three Console operators onto your Data Workflow canvas.
2. Complete the first Console operator's Info window as follows:

Setting

Value

Category

Console

Label

Before Table2Object

3. Connect the output port (right) of the Input operator to the input port (left) of the first Console operator.
4. Complete the second Console operator's Info window as follows:

Setting

Value

Category

Console

Label

After Table2Object

5. Connect the output port (right) of the Table2Object operator to the input port (left) of the second Console operator.
6. Complete the third Console operator's Info window as follows:

Setting

Value

Category

Console

Label

After Get

7. Connect the output port (right) of the Get operator to the input port (left) of the third Console operator.

Your completed Data Workflow looks like this:

A static image displaying the completed Data Workflow configuration.

8. Click Save.

Configure the Button Component

Finally, to trigger the Data Workflow, you'll add a Button component.

The Button component saves and creates a submission with the information on the page. After you customize your button's appearance, ask the end-user for permission to contact them.

1. Drag and drop a Button component onto your canvas, placing it below your Hidden component.
2. In the Property ID A Property ID is the unique field ID used by Unqork to track and link components in your module. field, enter btnRunDWF.
3. In the Label Text Label Text conveys what the input component is and what information it displays. Enter the purpose of the corresponding component or field. field, enter Run DWF.
4. Click Actions.
5. Under Action Type The action performed by the button when selected., select Event.
6. From the On Click field, enter or select dwfData .

A static image displaying the Button component's configuration, the Event Action type and Trigger On Click field are highlighted.

7. Click Save & Close.
8. Save your module.

Now you can test out your Data Workflow. Preview your module in Express View and click Run DWF. Opening the DevTools Console, you can see each step of the Data Workflow's data manipulation:

The Data Workflow converted your Data Table to an object, pulled out a single value, then pushed the value to your Hidden component.

Resources