Skip to main content
Browse Documentation
HTTP - Management

Workflow definition state

Created by c.neale, last modified by j.moore on 17 Dec 2020

A state that an entry can be assigned to as part of its life cycle.

Properties

NameData typeData formatDescription
idstringAn identifier for the state, which must be unique within the workflow
nameobjectlocalized valueThe friendly name given to the state.
entryActionsobject[...]actionActions to be performed on the entry when it enters the current state.
eventsobject[...]eventA collection of events that can occur to an entry in this state.
colorstringcolorThe color to be displayed in the Contensis UI for the state.
uiEditorViewstringui editor viewThe view used by the Contensis UI to display the entry when it is in this state.

Example

This example shows a workflow state.

{
    "id": "awaitingApproval",
    "name": {
        "en-GB": "Awaiting approval"
    },
    "entryActions": [],
    "events": [{
            "id": "revoke",
            "name": {
                "en-GB": "Revoke and edit"
            },
            "description": {
                "en-GB": "Revoke the entry submission"
            },
            "transitionTo": "draft",
            "exitActions": [],
            "color": "blue",
            "groupId": "submitRevoke",
            "uiAction": "none",
            "parameters": []
        }, {
            "id": "decline",
            "name": {
                "en-GB": "Decline"
            },
            "description": {
                "en-GB": "Decline the entry for approval"
            },
            "transitionTo": "declined",
            "exitActions": [],
            "color": "red",
            "groupId": "approveDecline",
            "uiAction": "navigateToEntryListing",
            "parameters": [{
                    "id": "message",
                    "name": {
                        "en-GB": "Add a message to explain to the author why this content is being declined"
                    },
                    "dataType": "string",
                    "dataFormat": null,
                    "description": {
                        "en-GB": "The decline reason"
                    },
                    "default": null,
                    "validations": {
                        "required": {
                            "message": {
                                "en-GB": "The decline reason is required"
                            }
                        }
                    },
                    "editor": {
                        "id": "multiline",
                        "instructions": {
                            "en-GB": "Include a message to let an approver know your changes"
                        },
                        "properties": null
                    }
                }
            ]
        }, {
            "id": "approve",
            "name": {
                "en-GB": "Approve"
            },
            "description": {
                "en-GB": "Approve the entry changes for publishing"
            },
            "transitionTo": "versionComplete",
            "exitActions": [{
                    "invokeAction": "publishEntry"
                }
            ],
            "color": "green",
            "groupId": "approveDecline",
            "uiAction": "navigateToEntryListing",
            "parameters": []
        }, {
            "id": "sysDelete",
            "name": {},
            "description": {},
            "transitionTo": null,
            "exitActions": null,
            "color": "blue",
            "groupId": "delete",
            "uiAction": "none",
            "parameters": []
        }
    ],
    "color": "yellow",
    "uiEditorView": "previousPublishedVersionCompare"
}