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, 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 custom handlers as they find they may want to tweak the actions taken in existing handlers.

Pre-Installed Handlers

These handlers come as system utilities:

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

Loading and Configuring a Handler

You can create custom handlers by modifying an existing handler or loading a handler into the system and configuring it. To load a handler, follow these steps:

  1. From the Space console, select Plugins.
  2. Click Import Handler.
  3. Do one of the following:
    1. Drag and drop the handler .ZIP file into the Handler Import modal or click Browse to search for and select it.
    2. If the handler has a URL address, click by URL and paste the URL into the Handler URL box.
  4. Click Import
  5. Add the following details:
    1. Where that handler will connect, which user it connects to, and so on.
    2. The Task Builder category the handler should be listed 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. You will likely 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


Each handler will 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 with open text elements. If the handler has a list, you must manually select an option from the list, which cannot change in different workflow runs. This is one reason you will not see many lists in handlers.