Skip to content

Manage labels

Introduction

Labels are JSON schemas that define how a workflow's input or output JSON must be done. A label can be made of the input schema alone, the output schema alone or both.

By associating a label with a workflow:

  • When validating the workflow structure in the visual editor, the declared input and output of the workflow are checked against the label's schemas of the label and the workflow is considered not valid in case of a mismatch.
  • If the workflow is published as asynchronous, every time the workflow is executed through its API, the actual input and output of the execution are checked against the label's schemas and an error is generated if there is a mismatch.

List labels

To list existing labels:

  • In any dashboard view, select Labels on the left menu. The labels are listed in the left panel. The total number of labels is displayed above the list.

For each label, the name and the number of associated workflows are displayed.

Labels with a padlock icon are associated with workflows and read-only. To make it editable you must disassociate it from the workflows.

  • To filter the list based on the name of the labels, type something in the search box above the list and press Enter: only labels whose names contain what you typed will be displayed.
    To clear the filter, select the "X" icon on the right side of the search box or clear the box and press Enter.
  • To change the sorting of the list:

    • Select the criteria from the drop-down above the list.
    • You can invert the sort order by selecting the icon to the left of the drop-down.

Create a label

To create a label:

  1. In any dashboard view, select Labels on the left menu.
  2. Select the plus icon on the left panel.

In the dialog:

  1. If you like, you can change the label's color in the GUI.
  2. Enter the label's name.
  3. You can enter a description for the label.

When done, select Save.

Edit a label

To edit a label:

  1. In any dashboard view, select Labels on the left menu.
  2. Select the label from the list in the left panel.

The definition of the label is displayed in the central panel while the list of any workflow to which the label is associated is shown in the right panel.

If the label is associated with one or more workflows, it is read only, it cannot be edited. In order to change you must disassociate it from the workflows first.

  • To switch between input and output schema, select the tab with the same name in the central panel.
  • Use the JSON Schema tab to write the schema by hand.
  • Use the Designer tab to define the schema visually (see below).

The changes you do in one tab are automatically reflected in the other.

  • To switch from one tool to another simply select the corresponding tab.
  • To reset the schema, select Reset JSON Schema on ​​the toolbar.
  • To save changes to the schema select Save.

Use the designer

In the Designer tab you define or change the schema visually.

  • If the schema is empty, the designer shows possible types for the root field. They are:

    • Object
    • Array
    • String
    • Number (includes integers and decimals)
    • Integer
    • Boolean

    Choose one to begin defining the schema.

String, number, integer and boolean are terminal types, while object and array are structured: for an object field you have to define its sub-fields and for an array field you have to define the type of its items. Object sub-fields and array items can themselves be terminal or structured, recursively.

  • To change the type of the root field, choose the new type from the drop-down menu in the top right. You can choose multiple types and also null to indicate that the field is nullable.
  • To add a sub-field to an object field, select the plus icon at the bottom of the box of the sub-field.
  • To indicate if a sub-field is required or optional, choose from the first drop-down list to the right of the field name.
  • To change the name of a sub-field, just edit it.
  • To set one or multiple types for a sub-field, choose from the second drop-down list to the right of the field name. In addition you can choose null to indicate that the field can be nullable.
  • To allow any extra sub-fields in the actual JSON, enable Allow additional properties.
  • To delete a sub-field, select Remove property to the right of the sub-field.

For any type except object you can set validations. Validations are:

  • Array:

    • Minimum number of items
    • Maximum number of items
    • Whether or not the array must contain unique values (no repetitions)
  • String:

    • Minimum length
    • Maximum length
    • Pattern match (regular expression)
    • Conformance to a chosen format among the predefined ones, such as email, URI, IPv6 address
    • Enumeration of allowed values
  • Number:

    • Minimum value
    • Maximum value
    • Exclusive minimum value 1
    • Exclusive maximum value 1
    • Number of which the value must be a multiple
    • Enumeration of allowed values
  • Integer: the same as number (see above)

  • Boolean:

    • If the value true is allowed
    • If the value false is allowed

    Note

    At least one of the values ​​must be allowed

If a field has multiple allowed types, its validations are grouped by type.

  • To expand and collapse field details, which include validations and sub-fields, select the expand and the collapse icons to the left of the field name.
  • To toggle the display and editing of descriptions, select Show descriptions on ​​the toolbar. If descriptions are enabled, you can specify a description for the entire schema and one for each field.
  • To clear any validations simply clear the constraint value in the text box in which it appears.

To replace a field with a combination of subschemas, on the type drop-down menu choose Advanced > Use multiple options and one of the possible subschema combinations.
Supported combinations are:

  • any of: it is OK if the JSON property conforms to any of the subschemas.
  • one of: the JSON property must conform to only one of the subschemas, it is not OK if it conforms to multiple subschemas.
  • all of: the property must conform to all subschemas.

 

  • To add a subschema, select Add subschema.
  • To define a subschema, proceed as you would for defining sub-fields or array items (see above).
  • To browse subschemas, use the arrow icons inside the subschema definition panel.
  • To remove a subschema select Remove inside the subschema definition panel.

 

  • To reset a schema, select Reset JSON Schema on ​​the toolbar.
  • To save or discard changes to the schema, select Save or Discard to the right of the Input Schema and Output Schema tabs.

Edit label information

To edit label information, that is the name, the icon color and the description:

  1. In any dashboard view, select Labels on the left menu.
  2. Select the label from the list in the left panel.
  3. Select Edit information on the right panel.
  4. When done making changes, select Save.

Delete a label

To delete a label:

  1. In any dashboard view, select Labels on the left menu.
  2. Select the label from the list in the left panel.
  3. Select Delete label on the right panel.

  1. Exclusive means the specified value is excluded. For example, if it is a minimum, the property's value in the actual JSON must be greater than the specified value, it cannot be equal.