Handlers

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 systems as well as constructing loops, echoing values, and transforming data. These make up, with the connectors that connect them, 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. This is a one time process that involves

  1. Loading the handler code onto the platform in Space -> Plugins
  2. Setting up the details of
  • Where that handler will connect, what user it connects with, etc.
  • What category it appears in in the task builder.

Note that the configuration details will vary by handler, because the connection info required by a Remedy ARS system, for example, is very different than that required by an Amazon EC2 system.

Also, it can be important to note here, that this configuration needs to be done in each environment. It is very possible (even likely) that you will want each environment (development, test, production) 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. Handlers are dragged from the task list on the right side of the workflow builder onto the tree or routine being built.

emptyv5routines

Clicking the icon at the bottom of Start (or any other node) will allow you to add a handler or routine.

NewHandler

Once a handler is selected, you will be able to configure it, and then it will appear in your tree.

SampleWorkflow

NewEcho

NewEcho2

Parameters

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 drop down field, you must manually select an option from the drop down, and this cannot change in different runs of the workflow. This is one reason you will not see many drop down menus in handlers.

Messages

Handlers also have messages. These can contain parameters and are a primitive way of making a node's information available to the user, eg "Approval Assigned to {Approver Name}", if the system displaying information does not contain a more sophisticated mechanism.

NodeMessages

There are three potential messages: Create, Update, and Complete. Note that Create and Update are only present for nodes that defer.

It is not recommended that the messages functionality be used when leveraging the full Kinetic Platform. It is recommended that messages be created and displayed for the users using the Submission Activity feature instead. This allows for more flexibility and better error handling.