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
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 values in blue

  • boolean values, true or false, in red

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.

A workflow trigger has multiple parameters; a JSON schema dropdown is displayed to help you add these and complete the property definition.

...

States, transitions, and approvals

The code editor also provides a JSON schema dropdown to

  • add a workflow state and its attributes, including colour, description, expiry due date and whether the state is an initial or final state in the workflow

...

  • add state transitions

...

  • add an approval

...

Workflow parameters

The code editor provides a JSON schema dropdown to add workflow parameters.

...

Workflow triggers

The code editor provides JSON schema dropdowns to create and add a workflow trigger. Dropdowns are provided for each of the events, conditions, and actions properties of the trigger.

  • event

...

  • conditions

...

  • actions

...

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

...

Code validation

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 identified.

...

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 code editor does not allow you to save a template with a validation error, and when you toggle into the visual editor, the JSON template with a code error is not saved.

Examples

Child pages (Children Display)
allChildrentrue

...