Creating a Workflow

Aunsight users can easily create new workflows through the workflows workspace in the Aunsight Web interface. This article describes the process of creating a new workflow and the options that users may wish to specify when they create one.

Basic Steps

To create a new workflow, log in to the Web interface and select the context you wish to work in through the context selector. From that context's dashboard, click the "Workflows" icon (workflow icon) in the palette on the right.

Workflows Workspace

In the workflows workspace, click the plus icon (new icon) to open a new workspace dialog.

New workflow dialog

At its most basic, a user only needs to specify a name and scroll down through the options to the bottom of the form and click the "Create" button (create buttons) In most cases, however, users may wish to specify other options. The remainder of this article discusses options users may wish to specify when creating a workflow.

Setting Workflow Options

Description

The description field is a text field that will be used to generate the workflow's description text. Though the field accepts only plain text, it will render markdown formatted content as rich text. The description field can be edited at any time after the workflow is created.

Tagging

Aunsight workflows can be labeled and grouped by tags that allow users to easily identify groups of related objects (dataflows, workflows, datasets, etc.) that are used together. Tags can be changed at any time by editing them via the details tab in the workflows workspace.

Dev Mode

Dev mode tags are used by solutions architects to describe specific stages for workflows and other Aunsight objects. For example, a DEV tag usually means the creator of this workflow did so as part of a solution development process, whereas the PROD tag signifies a workflow is part of an ongoing production data solution delivered to data consumers. Use of these tags for specific purposes is arbitrary, but teams should be consistent in their use of Dev tag nomenclature.

Solutions

Solutions are custom tags denoting that a workflow relates to a particular data solution. For example, the workflows that store the input and outputs for a predictive model that forecasts retail sales would both be tagged for the "Retail Sales Forecast" solution. Datasets may also be tagged for more than one solution. For example, a workflow that contains a company's customer mailing list might be used for multiple data solutions and can be tagged for each of these.

Custom Tags

In addition to the standard tags, Aunsight workflows can also be free-form tagged by adding keywords as a comma separated list of tags (32 character limit per tag).

Specify a Token

Workflows require permissions to run. Rather than requiring a member to enter their credentials every time, members can create a token and use it to run the Workflow. Tokens help to avoid exposing a member's credentials and can be easily revoked without affecting their creator's access permissions. Tokens can also be created with expiration conditions, such as a limited number of uses, or expiration after a certain date.

Specify Scheduling Options

Scheduling is an essential feature of automating any workflow, and Aunsight accomplishes this through its Chronos service which manages scheduled jobs.

To schedule a workflow to be run automatically by the Chronos service, users specify a Crontab string to be watched by Chronos. Crontab strings provide a syntax for scheduling recurring jobs based on five fields: Minute, Hour, Day, Month, and Day of Week. Users specify a numerical value for each of these five, or leave them unspecified by writing an asterisk.

For example, the following Crontab string will run a job every Monday at 2:00am:

0 2 * * 1

The following example will run a job on the first and fifteenth day of every month at 12:00 noon:

0 12 1,15 * *

For further explanation of the Crontab format, see the Crontab Guru website.

Specify Notifications

Notifications allows the specified users to receive emails when workflow jobs are run successfully or experience a failure. This can be useful if a user wants to receive a reminder when a workflow is finished or would like to be alerted as soon as the job fails so that they can take action to debug and re-run a critical workflow.

To specify a notification, click "Add notification type" which will bring up options for specifying the kind of notification to send.

workflow notifications interface

  • Method: Currently, only email notifications are supported.
  • State: Send a notification if the workflow job fails or succeeds.
  • Members: A drop-down list of members of the workflow's context to which you wish to send a message.
  • Roles: Send a message to all members with a specified role.

To add more than one notification, click the plus icon (plus icon) and repeat the process above until all desired notifications have been added.