Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel6
outlinefalse
typeflat
separatorpipe
printabletrue

...

Excerpt
namecodeeditor_schema
cdmc_codeeditor_createnewworkflowtemplatecode.png

The JSON code editor includes

  • color coding to distinguish property names, values, and different data types

  • autocomplete feature for workflow properties and values

  • dropdown selectors for available property names, including workflow triggers, workflow parameters, states, transitions, and approvals

cdmc_codeeditor_trigger_eventname_schema_onchangestate_highlighted.png
  • a search tool accessed by the keyboard shortcut CMD+F

Info

The visual editor can also be used to create or edit workflows without the need to add or edit code directly. Changes in one editor are automatically updated when the workflow is viewed in the other.

...

Excerpt
namecodeeditor_use_extract

If you are familiar with JSON, you can use the Comala Document Management code editor to edit an existing workflow or create your own.

cdmc_codeeditor_customworkflow.png

Color coding is used to distinguish property names, values, and different data types in the workflow template JSON code:

  • workflow property names in grey

  • property and array string, meta, and regex values in blue

  • boolean values, true or false, in red orange

  • numbers and operators are in green

Data is represented within data or name pairs of curly braces { } and square brackets [ ]. Highlight one of the braces or brackets, and the paired brace or bracket is highlighted.

cdmc_codeeditor_highlightedbrace_pair_statedefinition.png

When editing in the code editor, adding "" displays JSON schema options to help add workflow properties, values, and data.

cdmc_codeeditor_triggers_selected_initialschema_object.png
Info

To activate the JSON schema prompt, click within the "" .

JSON schema is then displayed for the selected workflow object to help add further properties and values.

For example, the value options for the event for a workflow trigger to listen for.

cdmc_codeeditor_trigger_eventname_schema_onchangestate_highlighted.png
Info

Scroll with the mouse in the JSON schema box to view additional options. Click the keyboard’s Arrow keys to move up or down and select an option.

...

The actions also have a JSON schema dropdown to support the addition of the code.

...

...

Search help

The code editor validates any changes and displays a syntax error if a JSON code error is found.

...

An error item is also added to the point in the code where an error has been identifiedincludes a search tool.

  • type CMD+F to display the search help

...

Added search strings found in the code are highlighted. You can filter the search to match case, regexp, and word. A Replace option is also available.

Code validation

At the moment of typing, the code editor validates and highlights JSON syntax errors.

...

This is usually displayed at the point in the code where you add the required elements for a workflow property, such as a trigger.

The

...

dialog box also displays a Syntax error found error message.

...

A complete validation of the JSON as a valid workflow is not done until the save button is clicked. If there are errors, the edited workflow cannot be saved, and an error message is displayed

If you toggle into the visual editor, the JSON template with a syntax code error is not saved.

Examples

...