Property description

The workflows property is a set of workflow states that an object goes through during its lifecycle in Dawiso.

Tip

Before creating a workflow, make sure you already defined your workflow states.

Minimal JSON

{
  "key": "",
  "name": "",
  "initStateKey": ""
}
{
  "key": "basic_workflow",
  "name": "Basic workflow",
  "description": "",
  "state": "active",
  "isDefault": false,
  "isEmpty": false,
  "initStateKey": "draft",
  "diagramContentType": "image/png",
  "diagramContent": "iVBORw0KGgoAAAANSUhEUgAACGAAAARmCAIAAAD...",
  "transitions": [
    {
      "name": "Draft",
      "fromStateKey": "approved",
      "toStateKey": "draft",
      "changeThresholdTypeKey": "one_user",
      "userRelationTypes": [
        {
          "key": "core#steward"
        }
      ]
    }
  ]
}

Example taken from the core package.

Nested properties

PropertyDescriptionValuesMandatory
keyUnique key of the asset. Used for referencing in the same package or other packages using packageKey#assetKey.stringYes
nameName of the asset, used as the default EN translation.stringYes
initStateKeyKey of the workflow’s initial workflow state.stringYes
descriptionDescription of the property, displayed as a tooltip.stringNo
diagramContentTypeWorkflow diagram image type, supported options (in MIME format) are: image/png, image/jpeg, image/svg+xmlstringNo
diagramContentWorkflow diagram in Base64 format.stringNo
isDefaultDetermines whether the workflow is always selected by default.booleanNo
isEmptyDetermines whether workflow doesn’t have any workflow states.booleanNo
isSelectableDetermines whether the workflow can be selected by other users.booleanNo
transitionsArray of transitions between workflow states.arrayNo
stateCurrent status of the asset. Supported options are: active (asset is active and visible in the environment), inactive (asset is inactive and hidden, serves as a soft delete), hidden (asset is active but hidden in the environment).stringNo
translationsArray of translation keys and their definitions that determine how the text is displayed in the UI for the specific asset. For more information, see Translations.arrayNo