{"action":"created","comment":{"url":"https://api.github.com/repos/wagtail/rfcs/pulls/comments/346263527","pull_request_review_id":316889066,"id":346263527,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM0NjI2MzUyNw==","diff_hunk":"@@ -0,0 +1,168 @@\n+# RFC 45: Workflow\n+\n+* RFC: 45\n+* Authors: Karl Hobley\n+* Created: 2019-11-12\n+* Last Modified: 2019-11-12\n+\n+## Abstract\n+\n+This RFC proposes how we can implement multi-stage configurable workflow in Wagtail core.\n+\n+## Overview\n+\n+### Workflows\n+\n+Workflows are configured in Wagtail by an administrator. Each workflow has a name and a list of tasks arranged in a sequence.\n+\n+Workflows are triggered when a user clicks the \"Submit for Review\" action in the page editor. This action creates a \"workflow state\" object and begins the first task in the workflow.\n+\n+The workflow that gets used depends on the position of the page in the tree. Wagtail finds the workflow to use from the closest ancestor page that has a workflow associated with it. Out of the box, the \"Root\" page in Wagtail has the \"Default\" workflow linked with it, so pages use this workflow if none of their ancestor pages has overridden it.\n+\n+The \"Submit for Review\" button is not shown when there isn't a workflow configured.\n+\n+### Tasks\n+\n+Tasks represent the checks that must pass for a page to be published. Each task has a name, a type, and some additional configuration dependant on the chosen type.\n+\n+Tasks are defined separately to workflows, allowing workflows to share tasks.\n+\n+Tasks are \"triggered\" when the previous task completes successfully, or when it's the first task in the workflow. Triggering a task creates a \"task state\" object and executes any trigger actions that the task type has defined (For example, send an email).\n+\n+The \"task state\" object tracks the current progress for completing a task; these are associated with a workflow state and a page revision. Depending on the task type, The \"task state\" may be an instance of TaskState or an instance of a custom model that inherits TaskState.\n+\n+If the page is changed while a review is taking place, the existing \"task state\" objects will no longer be valid because they are associated with the previous revision. A new set of task state objects are created, and the review starts again at the first task.","path":"text/045-workflow.md","position":34,"original_position":34,"commit_id":"79d69928cd85a3e684d39aeb5e2b75194fe38cb5","original_commit_id":"50d35f6124a21d915329e3467765f150480c5ee4","user":{"login":"kaedroho","id":1093808,"node_id":"MDQ6VXNlcjEwOTM4MDg=","avatar_url":"https://avatars1.githubusercontent.com/u/1093808?v=4","gravatar_id":"","url":"https://api.github.com/users/kaedroho","html_url":"https://github.com/kaedroho","followers_url":"https://api.github.com/users/kaedroho/followers","following_url":"https://api.github.com/users/kaedroho/following{/other_user}","gists_url":"https://api.github.com/users/kaedroho/gists{/gist_id}","starred_url":"https://api.github.com/users/kaedroho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaedroho/subscriptions","organizations_url":"https://api.github.com/users/kaedroho/orgs","repos_url":"https://api.github.com/users/kaedroho/repos","events_url":"https://api.github.com/users/kaedroho/events{/privacy}","received_events_url":"https://api.github.com/users/kaedroho/received_events","type":"User","site_admin":false},"body":"Yep, this is correct. I'll mention this in the RFC","created_at":"2019-11-14T11:35:28Z","updated_at":"2019-11-14T11:35:28Z","html_url":"https://github.com/wagtail/rfcs/pull/45#discussion_r346263527","pull_request_url":"https://api.github.com/repos/wagtail/rfcs/pulls/45","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/wagtail/rfcs/pulls/comments/346263527"},"html":{"href":"https://github.com/wagtail/rfcs/pull/45#discussion_r346263527"},"pull_request":{"href":"https://api.github.com/repos/wagtail/rfcs/pulls/45"}},"in_reply_to_id":345321939},"pull_request":{"url":"https://api.github.com/repos/wagtail/rfcs/pulls/45","id":339961190,"node_id":"MDExOlB1bGxSZXF1ZXN0MzM5OTYxMTkw","html_url":"https://github.com/wagtail/rfcs/pull/45","diff_url":"https://github.com/wagtail/rfcs/pull/45.diff","patch_url":"https://github.com/wagtail/rfcs/pull/45.patch","issue_url":"https://api.github.com/repos/wagtail/rfcs/issues/45","number":45,"state":"open","locked":false,"title":"RFC 45: Workflow","user":{"login":"kaedroho","id":1093808,"node_id":"MDQ6VXNlcjEwOTM4MDg=","avatar_url":"https://avatars1.githubusercontent.com/u/1093808?v=4","gravatar_id":"","url":"https://api.github.com/users/kaedroho","html_url":"https://github.com/kaedroho","followers_url":"https://api.github.com/users/kaedroho/followers","following_url":"https://api.github.com/users/kaedroho/following{/other_user}","gists_url":"https://api.github.com/users/kaedroho/gists{/gist_id}","starred_url":"https://api.github.com/users/kaedroho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaedroho/subscriptions","organizations_url":"https://api.github.com/users/kaedroho/orgs","repos_url":"https://api.github.com/users/kaedroho/repos","events_url":"https://api.github.com/users/kaedroho/events{/privacy}","received_events_url":"https://api.github.com/users/kaedroho/received_events","type":"User","site_admin":false},"body":"[Rendered](https://github.com/wagtail/rfcs/blob/workflow/text/045-workflow.md)","created_at":"2019-11-12T15:17:13Z","updated_at":"2019-11-14T11:35:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dca7b883295368253b3564f22040018157275288","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1633468996,"node_id":"MDU6TGFiZWwxNjMzNDY4OTk2","url":"https://api.github.com/repos/wagtail/rfcs/labels/2:Accepted","name":"2:Accepted","color":"0052cc","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/wagtail/rfcs/pulls/45/commits","review_comments_url":"https://api.github.com/repos/wagtail/rfcs/pulls/45/comments","review_comment_url":"https://api.github.com/repos/wagtail/rfcs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wagtail/rfcs/issues/45/comments","statuses_url":"https://api.github.com/repos/wagtail/rfcs/statuses/79d69928cd85a3e684d39aeb5e2b75194fe38cb5","head":{"label":"wagtail:workflow","ref":"workflow","sha":"79d69928cd85a3e684d39aeb5e2b75194fe38cb5","user":{"login":"wagtail","id":23708009,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNzA4MDA5","avatar_url":"https://avatars3.githubusercontent.com/u/23708009?v=4","gravatar_id":"","url":"https://api.github.com/users/wagtail","html_url":"https://github.com/wagtail","followers_url":"https://api.github.com/users/wagtail/followers","following_url":"https://api.github.com/users/wagtail/following{/other_user}","gists_url":"https://api.github.com/users/wagtail/gists{/gist_id}","starred_url":"https://api.github.com/users/wagtail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wagtail/subscriptions","organizations_url":"https://api.github.com/users/wagtail/orgs","repos_url":"https://api.github.com/users/wagtail/repos","events_url":"https://api.github.com/users/wagtail/events{/privacy}","received_events_url":"https://api.github.com/users/wagtail/received_events","type":"Organization","site_admin":false},"repo":{"id":40007822,"node_id":"MDEwOlJlcG9zaXRvcnk0MDAwNzgyMg==","name":"rfcs","full_name":"wagtail/rfcs","private":false,"owner":{"login":"wagtail","id":23708009,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNzA4MDA5","avatar_url":"https://avatars3.githubusercontent.com/u/23708009?v=4","gravatar_id":"","url":"https://api.github.com/users/wagtail","html_url":"https://github.com/wagtail","followers_url":"https://api.github.com/users/wagtail/followers","following_url":"https://api.github.com/users/wagtail/following{/other_user}","gists_url":"https://api.github.com/users/wagtail/gists{/gist_id}","starred_url":"https://api.github.com/users/wagtail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wagtail/subscriptions","organizations_url":"https://api.github.com/users/wagtail/orgs","repos_url":"https://api.github.com/users/wagtail/repos","events_url":"https://api.github.com/users/wagtail/events{/privacy}","received_events_url":"https://api.github.com/users/wagtail/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/wagtail/rfcs","description":"Wagtail RFCs","fork":false,"url":"https://api.github.com/repos/wagtail/rfcs","forks_url":"https://api.github.com/repos/wagtail/rfcs/forks","keys_url":"https://api.github.com/repos/wagtail/rfcs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wagtail/rfcs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wagtail/rfcs/teams","hooks_url":"https://api.github.com/repos/wagtail/rfcs/hooks","issue_events_url":"https://api.github.com/repos/wagtail/rfcs/issues/events{/number}","events_url":"https://api.github.com/repos/wagtail/rfcs/events","assignees_url":"https://api.github.com/repos/wagtail/rfcs/assignees{/user}","branches_url":"https://api.github.com/repos/wagtail/rfcs/branches{/branch}","tags_url":"https://api.github.com/repos/wagtail/rfcs/tags","blobs_url":"https://api.github.com/repos/wagtail/rfcs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wagtail/rfcs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wagtail/rfcs/git/refs{/sha}","trees_url":"https://api.github.com/repos/wagtail/rfcs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wagtail/rfcs/statuses/{sha}","languages_url":"https://api.github.com/repos/wagtail/rfcs/languages","stargazers_url":"https://api.github.com/repos/wagtail/rfcs/stargazers","contributors_url":"https://api.github.com/repos/wagtail/rfcs/contributors","subscribers_url":"https://api.github.com/repos/wagtail/rfcs/subscribers","subscription_url":"https://api.github.com/repos/wagtail/rfcs/subscription","commits_url":"https://api.github.com/repos/wagtail/rfcs/commits{/sha}","git_commits_url":"https://api.github.com/repos/wagtail/rfcs/git/commits{/sha}","comments_url":"https://api.github.com/repos/wagtail/rfcs/comments{/number}","issue_comment_url":"https://api.github.com/repos/wagtail/rfcs/issues/comments{/number}","contents_url":"https://api.github.com/repos/wagtail/rfcs/contents/{+path}","compare_url":"https://api.github.com/repos/wagtail/rfcs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wagtail/rfcs/merges","archive_url":"https://api.github.com/repos/wagtail/rfcs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wagtail/rfcs/downloads","issues_url":"https://api.github.com/repos/wagtail/rfcs/issues{/number}","pulls_url":"https://api.github.com/repos/wagtail/rfcs/pulls{/number}","milestones_url":"https://api.github.com/repos/wagtail/rfcs/milestones{/number}","notifications_url":"https://api.github.com/repos/wagtail/rfcs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wagtail/rfcs/labels{/name}","releases_url":"https://api.github.com/repos/wagtail/rfcs/releases{/id}","deployments_url":"https://api.github.com/repos/wagtail/rfcs/deployments","created_at":"2015-07-31T13:58:46Z","updated_at":"2019-05-04T13:42:04Z","pushed_at":"2019-11-14T11:30:39Z","git_url":"git://github.com/wagtail/rfcs.git","ssh_url":"git@github.com:wagtail/rfcs.git","clone_url":"https://github.com/wagtail/rfcs.git","svn_url":"https://github.com/wagtail/rfcs","homepage":"","size":2501,"stargazers_count":16,"watchers_count":16,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":20,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":18,"open_issues":20,"watchers":16,"default_branch":"master"}},"base":{"label":"wagtail:master","ref":"master","sha":"3837a543132221cc121093d36438bd84d1d589c0","user":{"login":"wagtail","id":23708009,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNzA4MDA5","avatar_url":"https://avatars3.githubusercontent.com/u/23708009?v=4","gravatar_id":"","url":"https://api.github.com/users/wagtail","html_url":"https://github.com/wagtail","followers_url":"https://api.github.com/users/wagtail/followers","following_url":"https://api.github.com/users/wagtail/following{/other_user}","gists_url":"https://api.github.com/users/wagtail/gists{/gist_id}","starred_url":"https://api.github.com/users/wagtail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wagtail/subscriptions","organizations_url":"https://api.github.com/users/wagtail/orgs","repos_url":"https://api.github.com/users/wagtail/repos","events_url":"https://api.github.com/users/wagtail/events{/privacy}","received_events_url":"https://api.github.com/users/wagtail/received_events","type":"Organization","site_admin":false},"repo":{"id":40007822,"node_id":"MDEwOlJlcG9zaXRvcnk0MDAwNzgyMg==","name":"rfcs","full_name":"wagtail/rfcs","private":false,"owner":{"login":"wagtail","id":23708009,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNzA4MDA5","avatar_url":"https://avatars3.githubusercontent.com/u/23708009?v=4","gravatar_id":"","url":"https://api.github.com/users/wagtail","html_url":"https://github.com/wagtail","followers_url":"https://api.github.com/users/wagtail/followers","following_url":"https://api.github.com/users/wagtail/following{/other_user}","gists_url":"https://api.github.com/users/wagtail/gists{/gist_id}","starred_url":"https://api.github.com/users/wagtail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wagtail/subscriptions","organizations_url":"https://api.github.com/users/wagtail/orgs","repos_url":"https://api.github.com/users/wagtail/repos","events_url":"https://api.github.com/users/wagtail/events{/privacy}","received_events_url":"https://api.github.com/users/wagtail/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/wagtail/rfcs","description":"Wagtail RFCs","fork":false,"url":"https://api.github.com/repos/wagtail/rfcs","forks_url":"https://api.github.com/repos/wagtail/rfcs/forks","keys_url":"https://api.github.com/repos/wagtail/rfcs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wagtail/rfcs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wagtail/rfcs/teams","hooks_url":"https://api.github.com/repos/wagtail/rfcs/hooks","issue_events_url":"https://api.github.com/repos/wagtail/rfcs/issues/events{/number}","events_url":"https://api.github.com/repos/wagtail/rfcs/events","assignees_url":"https://api.github.com/repos/wagtail/rfcs/assignees{/user}","branches_url":"https://api.github.com/repos/wagtail/rfcs/branches{/branch}","tags_url":"https://api.github.com/repos/wagtail/rfcs/tags","blobs_url":"https://api.github.com/repos/wagtail/rfcs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wagtail/rfcs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wagtail/rfcs/git/refs{/sha}","trees_url":"https://api.github.com/repos/wagtail/rfcs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wagtail/rfcs/statuses/{sha}","languages_url":"https://api.github.com/repos/wagtail/rfcs/languages","stargazers_url":"https://api.github.com/repos/wagtail/rfcs/stargazers","contributors_url":"https://api.github.com/repos/wagtail/rfcs/contributors","subscribers_url":"https://api.github.com/repos/wagtail/rfcs/subscribers","subscription_url":"https://api.github.com/repos/wagtail/rfcs/subscription","commits_url":"https://api.github.com/repos/wagtail/rfcs/commits{/sha}","git_commits_url":"https://api.github.com/repos/wagtail/rfcs/git/commits{/sha}","comments_url":"https://api.github.com/repos/wagtail/rfcs/comments{/number}","issue_comment_url":"https://api.github.com/repos/wagtail/rfcs/issues/comments{/number}","contents_url":"https://api.github.com/repos/wagtail/rfcs/contents/{+path}","compare_url":"https://api.github.com/repos/wagtail/rfcs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wagtail/rfcs/merges","archive_url":"https://api.github.com/repos/wagtail/rfcs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wagtail/rfcs/downloads","issues_url":"https://api.github.com/repos/wagtail/rfcs/issues{/number}","pulls_url":"https://api.github.com/repos/wagtail/rfcs/pulls{/number}","milestones_url":"https://api.github.com/repos/wagtail/rfcs/milestones{/number}","notifications_url":"https://api.github.com/repos/wagtail/rfcs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wagtail/rfcs/labels{/name}","releases_url":"https://api.github.com/repos/wagtail/rfcs/releases{/id}","deployments_url":"https://api.github.com/repos/wagtail/rfcs/deployments","created_at":"2015-07-31T13:58:46Z","updated_at":"2019-05-04T13:42:04Z","pushed_at":"2019-11-14T11:30:39Z","git_url":"git://github.com/wagtail/rfcs.git","ssh_url":"git@github.com:wagtail/rfcs.git","clone_url":"https://github.com/wagtail/rfcs.git","svn_url":"https://github.com/wagtail/rfcs","homepage":"","size":2501,"stargazers_count":16,"watchers_count":16,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":20,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":18,"open_issues":20,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wagtail/rfcs/pulls/45"},"html":{"href":"https://github.com/wagtail/rfcs/pull/45"},"issue":{"href":"https://api.github.com/repos/wagtail/rfcs/issues/45"},"comments":{"href":"https://api.github.com/repos/wagtail/rfcs/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/wagtail/rfcs/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/wagtail/rfcs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wagtail/rfcs/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/wagtail/rfcs/statuses/79d69928cd85a3e684d39aeb5e2b75194fe38cb5"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"kaedroho"}}