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 '
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
| Property | Description | Values | Mandatory |
|---|---|---|---|
key | Unique key of the asset. Used for referencing in the same package or other packages using packageKey#assetKey. | string | Yes |
name | Name of the asset, used as the default EN translation. | string | Yes |
iconKey | Key of the icon used to visually represent the asset. Use predefined icons from Settings > Configuration > Icons, or define custom ones in the icons asset. | string | Yes |
colorKey | Key of the color used to visually represent the asset. Use predefined colors from Settings > Configuration > Colors. For more information, see colors. | string | Yes |
asCommentState | Object with one property, commentRemovable. See asCommentState nested properties. | object | No |
attachmentUserRelationTypeKeys | Array 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 strings | No |
childCreationConditionallyDisabled | Disables creation of child object in this workflow state. Requires the object type feature disable_child_creation_based_on_workflow_state. | boolean | No |
description | Description of the asset. | string | No |
disableMoveBasedOnWorkflowState | Disables moving objects that are in this workflow state. | boolean | No |
state | Current 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). | string | No |
translations | Array 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. | array | No |
userRelationTypeKeys | Array 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 strings | No |
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:
| Property | Description |
|---|---|
userRelationTypeKeys | Array of keys of user relation types allowed to delete the comments. |
commentTypeKeys | Array 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
asCommentStategrants 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.
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 withwritepermissions 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
writepermissions - Be defined under
userRelationTypeKeys
- Have