Skip to main content

Workflow definition overview

Log in to add to favourites

Properties

NameTypeFormatDescription
idstring-A unique workflow definition identifier.
uuidstringuuidThe workflow definition identifier as a 128 bit GUID.
projectIdstring-The project identifier, e.g. "movieDb". Found in the project overview screen of the management console.
nameobjectlocalized value The friendly name given to the workflow definition.
descriptionobjectlocalized value The description text given to the workflow definition.
statesobject[...]- A collection of states that an entry with the workflow definition may have.
eventGroupobject[...]event group A collection of event groups for events within the states.
isSystemboolean-Indicates whether the workflow definition is predefined and read only (true) or a custom definition (false).
versionobjectversionVersion information about the workflow definition.

Example

This example shows a custom approval workflow definition.

JSON
{
    "uuid": "e7d8611a-88d6-44b3-8910-c894f1d6a42a",
    "id": "CustomEntryApproval",
    "projectId": "website",
    "name": {
        "en-GB": "Custom Approval workflow"
    },
    "description": {
        "en-GB": "A custom workflow for entries with approval"
    },
    "states": [
        {
            "id": "draft",
            "name": {
                "en-GB": "Draft"
            },
            "events": [
                {
                    "id": "submit",
                    "name": {
                        "en-GB": "Send for approval"
                    },
                    "auditText": {
                        "en-GB": "Sent for approval"
                    },
                    "description": {
                        "en-GB": "Send the entry for approval"
                    },
                    "transitionTo": "awaitingApproval",
                    "color": "green",
                    "groupId": "submitRevoke",
                    "uiAction": "navigateToEntryListing",
                    "validate": true,
                    "parameters": [
                        {
                            "id": "message",
                            "name": {
                                "en-GB": "Add an optional message for the approver"
                            },
                            "dataType": "string",
                            "dataFormat": null,
                            "description": {
                                "en-GB": "The message included with the entry submission"
                            },
                            "default": null,
                            "validations": {},
                            "editor": {
                                "id": "multiline",
                                "instructions": {
                                    "en-GB": "Optionally include a message to let an approver understand your changes"
                                },
                                "properties": null
                            }
                        }
                    ]
                }
            ],
            "color": "cobalt",
            "uiEditorView": "default"
        },
        {
            "id": "awaitingApproval",
            "name": {
                "en-GB": "Awaiting approval"
            },
            "events": [
                {
                    "id": "revoke",
                    "name": {
                        "en-GB": "Revoke and edit"
                    },
                    "auditText": {
                        "en-GB": "Revoked"
                    },
                    "description": {
                        "en-GB": "Revoke the entry submission"
                    },
                    "transitionTo": "draft",
                    "color": "white",
                    "groupId": "submitRevoke",
                    "uiAction": "none",
                    "validate": false,
                    "parameters": []
                },
                {
                    "id": "decline",
                    "name": {
                        "en-GB": "Decline"
                    },
                    "auditText": {
                        "en-GB": "Declined"
                    },
                    "description": {
                        "en-GB": "Decline the entry for approval"
                    },
                    "transitionTo": "declined",
                    "color": "red",
                    "groupId": "approveDecline",
                    "uiAction": "navigateToEntryListing",
                    "validate": false,
                    "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"
                    },
                    "auditText": {
                        "en-GB": "Approved"
                    },
                    "description": {
                        "en-GB": "Approve the entry changes for publishing"
                    },
                    "transitionTo": "sysWorkflow",
                    "color": "green",
                    "groupId": "approveDecline",
                    "uiAction": "navigateToEntryListing",
                    "validate": false,
                    "parameters": [],
                    "invokableWhen": [
                        {
                            "field": "isScheduledForPublish()",
                            "equalTo": false
                        }
                    ]
                },
                {
                    "id": "scheduledApprove",
                    "name": {
                        "en-GB": "Approve and schedule"
                    },
                    "auditText": {
                        "en-GB": "Approved and scheduled"
                    },
                    "description": {
                        "en-GB": "Approve the entry changes for publishing"
                    },
                    "transitionTo": "sysWorkflow",
                    "color": "green",
                    "groupId": "approveDecline",
                    "uiAction": "navigateToEntryListing",
                    "validate": false,
                    "parameters": [],
                    "invokableWhen": [
                        {
                            "field": "isScheduledForPublish()",
                            "equalTo": true
                        }
                    ]
                }
            ],
            "color": "yellow",
            "uiEditorView": "previousPublishedVersionCompare",
            "allowUpdates": false
        },
        {
            "id": "declined",
            "name": {
                "en-GB": "Declined"
            },
            "events": [
                {
                    "id": "submit",
                    "name": {
                        "en-GB": "Re-submit"
                    },
                    "auditText": {
                        "en-GB": "Re-submitted for approval"
                    },
                    "description": {
                        "en-GB": "Re-submit the entry for approval"
                    },
                    "transitionTo": "awaitingApproval",
                    "color": "green",
                    "groupId": "submitRevoke",
                    "uiAction": "navigateToEntryListing",
                    "validate": true,
                    "parameters": [
                        {
                            "id": "message",
                            "name": {
                                "en-GB": "Message"
                            },
                            "dataType": "string",
                            "dataFormat": null,
                            "description": {
                                "en-GB": "The message included with the entry re-submission"
                            },
                            "default": null,
                            "validations": {},
                            "editor": {
                                "id": "multiline",
                                "instructions": {
                                    "en-GB": "Include a message to let an approver understand the reasons for the re-submisson"
                                },
                                "properties": null
                            }
                        }
                    ]
                }
            ],
            "color": "red",
            "uiEditorView": "default"
        }
    ],
    "eventGroups": [
        {
            "id": "submitRevoke",
            "name": {
                "en-GB": "Submit / revoke"
            }
        },
        {
            "id": "approveDecline",
            "name": {
                "en-GB": "Approve / decline"
            }
        }
    ],
    "isSystem": true,
    "version": {
        "createdBy": "",
        "created": "0001-01-01T00:00:00",
        "modifiedBy": "",
        "modified": "0001-01-01T00:00:00",
        "publishedBy": null,
        "published": null,
        "versionNo": "0.1"
    }
}

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request