As the Pulse workflow system is based on RESTful API interactions, extension services can be used to expand the capabilities of workflows beyond the common tasks predefined in Pulse.

The current suite of workflow extensions cater for the following tasks:

  • Execute SQL queries / commands on Pulse databases
  • Run JavaScript code defined in a workflow task
  • Call external web APIs
  • Trigger other workflows
  • Generate PDFs and Excel files

These workflow extensions can be used in conjunction with common Pulse workflow tasks such as notifications and authorisations to deliver highly tailored solutions.

This guide will list two of the most commonly used workflow extensions: SQL Tasks and Code Tasks.

Note: the extensions listed below need to be configured by a Pulse administrator or consultant. For more information on other extensions and capabilities please contact support.

SQL Task

Endpoint: https://wfactionservices.pulsesoftware.com/sql [POST]

We can now execute custom SQL queries or commands in any part of a workflow sequence. The results of these queries can be injected back into the workflow for the sake of decision making, for use in other actions or to update data in Pulse.

To setup a SQL Task, the task parameters should look like the following. The apikey attribute is the workflow API key set in the organisations app config settings.

If the task in this workflow is executed, it'll run the query against the specified database, then pass the result back into the workflow. The resulting data in the workflow would look like the following:

The result could then be referenced elsewhere in the workflow using a condition such as:

Additionally, it can be used as a placeholder in other tasks such as a notification.

Code Task

Endpoint: https://wfactionservices.pulsesoftware.com/runcode [POST]

Dymanic code (JavaScript) can be used to process data passed into a workflow and inject the result back to the same workflow for use by other tasks or conditions. This task could be used to:

  1. Perform calculations on fields entered from a form / record
  2. Implement decisions based on form / record data
  3. Format data, concatenation strings, manipulate arrays of data

Code tasks can be used in conjunction with other workflow tasks as well as share the data passed in from other tasks.

To setup a Code Task, the task parameters should look like the following. The apikey attribute is the workflow API key set in the organisations app config settings.

The above task simply returns a new string from a field referenced in the form which triggered the workflow.

Upon form submission, the resulting workflow data record would look like the following:

The code result (code_result) can then be referenced in subsequent conditions or tasks as needed.