Property description

The workflowStates asset creates workflow states which are used to build object workflows.

Ownership

A workflow state can be defined in one package only. When a package defines a state that another package already owns, the install fails with an error naming the owning package (“Workflow state '' is defined in package ''. Defining it in package '' is forbidden; reference it instead.”). To use such a state in a workflow, reference it instead of defining it.

Minimal JSON

{
    "key": "",
    "name": "",
    "iconKey": "",
    "colorKey": ""
}
{
    "key": "approved",
    "name": "Approved",
    "description": "",
    "state": "active",
    "iconKey": "approved",
    "colorKey": "approved",
    "childCreationConditionallyDisabled": false
}

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
iconKeyKey of the icon used to visually represent the asset. Use predefined icons from Settings > Configuration > Icons, or define custom ones in the icons asset.stringYes
colorKeyKey of the color used to visually represent the asset. Use predefined colors from Settings > Configuration > Colors. For more information, see colors.stringYes
asCommentStateObject with one property, commentRemovable. See asCommentState nested properties.objectNo
attachmentUserRelationTypeKeysArray of user relation types allowed to make changes (adding, deleting, editing) to attachments when the object is in a certain workflow state. See supported attachmentUserRelationTypeKeys values.array of stringsNo
childCreationConditionallyDisabledDisables creation of child object in this workflow state. Requires the object type feature disable_child_creation_based_on_workflow_state.booleanNo
descriptionDescription of the asset.stringNo
disableMoveBasedOnWorkflowStateDisables moving objects that are in this workflow state.booleanNo
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
userRelationTypeKeysArray of keys of user relation types (= “workflow roles” like steward or business owner) allowed to edit an object in the current workflow state. If not specified, then all users can change the object in the current workflow state.array of stringsNo

asCommentState nested properties

The asCommentState property commentRemovable lets chosen user roles delete other users’ comments while the comment is in this workflow state. It is an array of entries with two properties:

PropertyDescription
userRelationTypeKeysArray of keys of user relation types allowed to delete the comments.
commentTypeKeysArray of comment type keys whose comments can be deleted. Use the form #comment or #issue.
"asCommentState": {
    "commentRemovable": [
        {
            "userRelationTypeKeys": ["core#steward"],
            "commentTypeKeys": ["#comment"]
        }
    ]
}
  • Each entry applies to every combination of its roles and comment types.
  • An empty array or a missing asCommentState grants nothing.
  • The role is checked on the commented object. Roles held through group membership count.
  • It grants delete only, never edit. Delete rights of the comment author, administrators and space administrators do not change.
Warning

core#comment is not a valid comment type key and fails validation. In a patch package, a reference-mode entry (without action) ignores asCommentState with a warning; use "action": "update" together with name, iconKey, and colorKey.

Supported attachmentUserRelationTypeKeys values

The attachmentUserRelationTypeKeys supports the following values:

  • NULL: When this property is not used, anyone with write permissions can make edits to attachments in this workflow state.
  • core_steward: Only admins and space admins can make edits to attachments.
  • user_role: Admins, space admins, and the specified user role(s) can make edits to attachments. The user role(s) must:
    • Have write permissions
    • Be defined under userRelationTypeKeys