Skip to main content
Kinetic Community

3. Building a Basic Task Tree

The Build console provides access to create, import and maintain Task Trees. Once the tree is created, you can also run instances of the tree directly from the dialog. After completing this article there is an activity to create a basic task tree and test Runs and Errors.

 

Creating a Tree

To create your first tree click on the Add New Tree button at the top of the console.

task_tree_new_tree.png

There are three required fields for every tree

Source - defined on the Admin tab normally relates to the application that is calling and getting the results back from the tree

Source Group - categorization of the trees within the Source.

For Request CE it is the combination of the Kapp Slug (normally "catalog") and the Form Slug separated by a greater than sign ( > )

Example: catalog > incident-create

Name - Select from Create, Complete, Update, or Delete

For Request CE, the most common is Complete, followed by Create.

You cannot create a tree with the same Source, Source Group and Name as another tree.

The last field, Process Owner Email, is used for notification if there is an error with a Run on the tree.

Click the Save Tree button to save and open the tree builder.

task_tree_builder_basic.png

Tree Builder

Trees are constructed in this console. Clicking on the Save Tree button automatically opens the builder with the basics seen above.

Bread crumb link can take you back to other consoles.

Trees / Source :: Source Group :: Name

Find Node searches nodes in the current tree and moves focus to them.

Actions drop-down gives you three options for the current tree.

Run - run the tree with an option to include an input string.

task_tree_run_action.png

Clone - Opens the New Tree dialog. You must change the name or you will get a duplicate name error message.

Export - creates an xml file of the current tree for import into another system.

Save button saves current changes to the tree. It is not active unless there are changes. A banner message appears when the save is complete.

Logout takes you completely out of the console to the login dialog.

Search box at the top of the Task List searches only task handlers in available categories.

Active category shows all task handlers used in the current tree

Misconfigured shows any nodes that are not configured correctly (missing or incorrect parameters).

List of available Task Handlers by category is along the right side and can be collapsed if needed.

Nodes

Nodes represent the actions that are taken as a tree processes. Unless they are one of the System Controls, they also represent a Task Handler.

Placing a Node

To add a node to a tree, click and drag from the category to the tree.

Node Description

The front of a node (the smaller rectangle that is visible when you first add a node to a tree) has two visual indicators. If the node is solid orange it is deferred (white is not deferred). If the outline is dashed, it is missing a value for a required parameter (and will also be listed under the Misconfigured category).

Unless marked as Deferred (or some of the System Controls) a node completes as soon as a connector attached to it completes. This triggers the connector(s) going from that node to trigger and process to the next node (unless there is a qualification and then that is checked first).

task_tree_basic_node.png

Labels and IDs

Every node has two names that identify it. The ID of a node is visible on the information/parameter view in the upper right. It is the name of the handler followed by an integer value. This ID is the default label for a node. Click on this value and you can change it to something friendlier. The friendly value must be unique for the tree.

Delete, Connector, Info

Each node has icons attached for a specific purpose. The "x" on the left side delete the node and all associated connectors. The "i" on the right side shows the parameter side of the node (double clicking on the node does the same thing). The "v" on the bottom of the node allows you to drag connectors to other nodes.

Basic Parameters

Nearly every node collects information that is passed to its handler for processing. You can reference results of other nodes or add Ruby code directly for processing.

Connectors

Connector do just that, connect nodes. All connectors go one direction and must have nodes on both ends.

task_tree_connector_basic.png

Labels

Labels on connectors are always a good idea. They are required if you have a qualification.

Types

There are three types of connectors, Complete (default), Update and Create. Update and create are only used with deferred nodes - nodes that don't complete right away.

Parameters

Each node can be configured with parameters similar to a node. The difference is the fact that the parameter needs to resolve to either true or false indicating if the connector should fire and progress to the next node.

Moving Connectors

Both the start and end of each connector can be moved to other nodes. This is helpful when rearranging trees or just testing.