Task Node

Estimated Reading Time:  9 minutes

Overview

A static image displaying the Screetask node with it's edit menu open.

The Task node, previously known as the Screen/Task node, represents a task in a workflow. A Task node's function changes depending on the swimlane its placed in. The Task node has three functions:

  • User: For a user-type task, add the Task node to the Authenticated swimlane. A user-type task is a process accessed by your end-user. You can have multiple user-type tasks in a workflow. For example, you might have a series of modules that your end-user needs to fill out for an online reservation. One user-type task might have your end-user enter their contact information. Another might have your end-user pick their reservation dates. A third might have your end-user enter their credit card information.
  • Script: For a script-type task, add the Task node to the Automated swimlane. A script-type task runs automatically on the server in the background and doesn't involve end-user interaction. If the task is successful, the workflow moves to the next node. Script-type tasks run the underlying module using server-side execution.

NOTE  If there's no Error node in the workflow and a script-type task runs into an error in execution, the workflow displays an error.

  • Service: For a service-type task, drag and drop the Task node to the Automated swimlane. Click the node's Edit button and select Service from the Select Task Type drop-down. A service-type task is an automated process that pauses the workflow. To resume, your workflow needs an API (application programming interface) call for the service-type task to continue running on the server. It’s important to note that service-type tasks don’t involve end-user interaction. Service-type tasks run the underlying module using server-side execution.

You'll find the Task node in the list of nodes to the left of the Workflow Builder.

What You'll Learn

In this article, you'll learn about the Task node's settings, how to use them in a workflow, and apply best practices.

Settings Menu Description

Let's explore the node's Settings Menu. This menu displays as a blue menu bar, either above or below the node, when you select the node itself. The Task node has the following settings:

Setting Description

Edit

Depending on which swimlane you place your Task node, you'll see the following:

  • Authenticated swimlane: Clicking Edit takes you to the Edit User Task window. From there, you can configure a range of settings.

  • Automated swimlane: Clicking Edit takes you to the Edit Script Task window or Edit Service Task window—depending on your selection. From there, you can configure a range of settings.

Open

Opens the connected module. This button becomes active and available once you connect a module to the Task node.

Delete

Removes the node from the workflow.

Depending on the swimlane, different task windows display. If editing a user-type task, the window displays as Edit User Task. If editing a script-type task, the window displays as Edit Script Task. If editing a service-type task, the window displays as Edit Service Task.

Edit User Task Window Description

Clicking the Edit button displays the Edit User Task window.

Task Module

Setting

Description

Label

Sets the name of your node. By default, the Label displays as task-1. The label you enter here shows in the navigation bar in Express View. Task node labels should clearly define what to expect on this node's page of the workflow.

NOTE  For Task nodes in the Automated lane, the label does not show in the top navigation in Express View.

Path

The path of the node. By default, the Path displays as task-1.

A path is a unique identifier that other components can reference. As a best practice, name your path with a structure that fits your application.

Screen Type

Select whether to show a static or dynamically-defined module when the workflow proceeds to the Task node. The options are:

  • Static: The Task node always displays the same module.

  • Dynamic: The Task node displays one of several modules, based on data from the submission.

Module

Displays when Screen Type is set to Static.

Select an existing module to associate with the Task node. The drop-down displays any of the following modules:

  • Part of the application the workflow is in.

  • Connected to the application the workflow is in.

  • Shared across the workspace that the workflow is in.

  • Shared across the entire environment.

Create New Module

Displays when Screen Type is set to Static.

Lets you create a new module to associate with the Task node.

Module Title*

Displays when clicking Create New Module.

Enter a title for the new module. The default Module Title references your workflow's name and the Task node's label.

Module Path*

Displays when clicking Create New Module.

Enter a path for the new module. The default Module Path references your workflow's name and the Task node's Label.

Module Type*

When creating a module, you can now determine its module type. Depending on the selected module type, it’ll include preconfigured components and settings:

  • FE Front-End: A Front-End module is a module element built for user interfaces. When creating a Front-End module, the Server-Side Execution setting is set to (OFF) by default, and disabled. Disabling this setting ensures this module type is always accessible in Express View.

  •  O  Other: An Other-type module is for module elements that aren’t considered Front-End or API modules. This module type includes modules used for storing data, rerouting data, and so on. When creating an Other-type module, the Server-Side Execution setting is set to (OFF) by default. With Other-type modules, you can choose to set the Server-Side Execution setting to (ON).

Cancel

Cancels the creation of the module and returns your focus to the Edit User Task window.

Create

Creates the module and returns your focus to the Edit User Task window.

Edit Module

Displays when Screen Type is set to Static, after adding or creating a module to associate with the Task node.

Opens the module associated with the Task node in a new tab.

X (Close)

Closes the Edit window, returning your focus to the pool.

Edit Script/Service Task

The Edit Script or Service task settings display when a Task node is placed in the Automated swimlane. Task nodes acting as a Script or Service Task have the same settings as Edit User Tasks. The only difference are the Action Settings.

A static image displaying the Screen/Task node's Edit Script Task settings.

Setting

Description

Select Task Type

Displays on adding a Task node to the Automated swimlane.

Using this drop-down, you can set the task type as Script or Service.

  • Script: Used for script-type tasks. A script-type task runs automatically on the server in the background. It's important to note that script-type tasks don't involve end-user interaction. If the task succeeds, your workflow automatically moves to the next node. If no Error node exists in the workflow and the task is unsuccessful, the workflow displays an error.

  • Service: Used for service-type tasks. A service-type task is an automated process that pauses the workflow. To resume, your workflow needs an API call for the service-type task to continue running on the server. It's important to note that service-type tasks don't involve end-user interaction.

Actions (User Tasks Only)

Setting

Description

Hide Express Navigation Buttons

Displays on adding a Task node to the Authenticated swimlane.

When set to (ON), the node's default navigation buttons (Back, Next) don't display in Express View.

TIP  Use this setting when creating custom navigation buttons using the Button component. For example, when using the Button component to create a custom Next or Back button. Set this setting to (ON) to avoid seeing two sets of buttons.

NOTE  This setting also overrides the workflow-level Enable Save and Exit Button setting. When Hide Express Navigation Buttons is set to (ON), the Save and Exit buttons do not appear for this node.

By default, this toggle is set to (OFF).

Back Button Label

Displays when adding a Task node to the Authenticated swimlane.

The label applied to the Back button.

By default, the Back button label shows as Previous.

Next Button Label

Displays when adding a Task node to the Authenticated swimlane.

The label applied to the Next button.

By default, the Next button label shows as Next.

Validation

Setting

Description

Save Data on Navigation

Displays when adding a Task node to the Authenticated swimlane.

When set to (ON), data saves to the submission when navigating from the node. When set to OFF, the submission data doesn't save when navigating from the node. The submission is updated, but the submission.data object doesn't change.

By default, the Save Data on Navigation toggle is set to (ON).

Allow Navigation with Validation Errors

Displays when adding a Task node to the Authenticated swimlane.

When set to (ON), your end-user can navigate away from a page that contains validation errors. Your end-user can also save the submission without completing all required fields.

By default, the Allow Navigation with Validation Errors toggle is set to (OFF).

NOTE  This setting is disabled when the Task node is added to a Sub-Process node.

Adding a Task Node

In this use case, the end-user chooses if they want to create a new account or skip the process. Set up a simple workflow using Task nodes to redirect the end-user to a specific Task node based on their response.

Your workflow looks like this when completed:

What You Need

To set up this use case, you need:

NOTE  Every workflow includes a Start node by default. No additional configuration of the Start node is required.

Configure the Task Nodes

Start by adding three Task nodes to your workflow. These nodes all act as user-type tasks.

1. Drag and drop three Task  nodes into the Authenticated swimlane.
2. Select the first Task node and click Edit.
3. In the Label field, enter New Account. The Path field updates with a new path based on the Label field value.
4. From the Module drop-down, enter or select Enablement Lab Task: New Account.
5. Click X (Close).
6. Repeat this process for the other Task nodes using the following information:

Label

Module

Create Account

Enablement Lab Task: Create Account

No Account

Enablement Lab Task: No Account

7. Connect the output port (right) of the Start node to the input port (left) of the New Account  Task node.

NOTE  You'll connect the remaining Task nodes at a later stage.

Configure the Exclusive Gateway Node

1. Drag and drop an Exclusive Gateway node into the Automated swimlane.
2. Connect the output port (right) of the New Account  Task node to the input port (left) of the exclusive-gateway-1  Exclusive Gateway node.

Configure the First Exclusive Gateway Link

Next, set up the logic that decides which path your end-user follows. In the Logic field, you'll enter radioAccount='yes'. This tells the workflow that if the value stored under the radioAccount key is yes, the workflow should follow the Yes path.

1. Connect the output port (right) of the exclusive-gateway-1  Exclusive Gateway node to the input port (left) of the Create Account  Task node.
2. Select the Exclusive Gateway Link and click Edit.
3. In the Label, enter Yes.
4. In the Logic, enter radioAccount='yes'.

A static image displaying the first Exclusive Gateway Link. The Label and Logic fields are highlighted.

5. Click X (Close).

Configure the Second Exclusive Gateway Link

Next, set up the logic of which path to follow if the value under the radioAccount key is no.

1. Connect the output port (right) of the exclusive-gateway-1  Exclusive Gateway node to the input port (left) of the No Account  Task node.
2. Select the Exclusive Gateway Link and click Edit.
3. In the Label, enter No.
4. In the Logic, enter radioAccount='no'.

A static image displaying the second exclusive gateway link, the Label and Logic fields are highlighted.

5. Click X (Close).

Configure the First End Node

1. Drag and drop an End  node into the Authenticated swimlane.
2. Click Edit.
3. In the Label field, enter End-1.
4. Click X (Close).
5. Connect the output port (right) of the Create Account  Task node to the input port (left) of the End-1  End node.

Configure the Second End Node

1. Drag and drop a second End  node into the Authenticated swimlane.
2. Click Edit.
3. In the Label field, enter End-1.
4. Click X (Close).
5. Connect the output port (right) of the No Account  Task node to the input port (left) of the End-2  End node.
6. Click Save....
7. Click Save.

Your workflow looks like this when completed: