Extending workflows with pro-code

Handlers are the components that execute portions of code and can be used by workflow builders to build whatever processes they wish.

Handlers are the snippets of code that perform all the actions in the workflows. These perform all of the CRUD (Create-Retrieve-Update-Delete) actions to any system as well as constructing loops, echoing values, and transforming data. Handlers and the connectors that connect them make up the body of all of the workflows.

Workflow developers work with handlers extensively. Very experienced workflow developers often learn to create their own handlers, as they find they may want to tweak the actions taken in existing handlers.

Pre-Installed Handlers

There are only a few handlers that come as system utilities:

  • Join
  • Junction
  • Echo
  • Loop Head
  • Loop Tail
  • Create Trigger
  • Defer
  • No Operation
  • Wait

Loading and Configuring a Handler

All other handlers must be either configured or loaded onto the system and then configured. Loading a handler is a one-time process made up of the following steps:

  1. Loading the handler code in Space > Plugins
  2. Setting up the following details:
    1. Where that handler will connect, which user it connects to, and so on
    2. Which category in Task Builder the handler should appear in

Note: Configuration details will vary by handler due to system differences. For example, the connection info required by a Remedy ARS system is very different than that required by an Amazon EC2 system.

Configuration needs to be done in each environment. It is possible (even likely) that you will want your development, test, or production environments to connect to different environment systems for data and workflows.

Using Handlers

Once the handler is configured, it can be used in any number of trees and routines. Complete the following steps to add a handler to a workflow or routine:

  1. Click the plus sign at the bottom of the node where you want to add a handler or routine.
Workflow starting node
  1. Select a handler from the list.
Adding a new handler to a node
  1. Enter the details for the handler and click Finish The handler is then displayed in the workflow tree.
Example of an Echo handler's settings Example of an Echo handler in a workflow Example of an Echo handler's input


Note that each handler is going to create nodes with different parameters because the parameters are the inputs needed by the code run by that handler. Text, items from the preconfigured values list, and Ruby code can be used in parameters that have open text elements. If the handler has a list, you must manually select an option from the list, and this cannot change in different runs of the workflow. This is one reason you will not see many lists in handlers.