Adds a review workflow to a resource
Generates a review resource that runs the review workflow for the subject
resource, and a decision resource with one row per review round. A
reviewer approves, rejects or requests changes, and the requester
resubmits after changes are requested. The subject gains
has_many :reviews, has_one :latest_review and a review_approved?
calculation. When the subject does not exist, it is created with
mix ash.gen.resource first.
Nobody may request or review until the application defines who can, in
the generated Checks.CanRequest and Checks.CanReview modules.
Example
mix ash_workflow.gen.review MyApp.Content.Article --reviewer MyApp.Accounts.User --overdue-after 3d
Options
--reviewer- required. The actor resource. Decisions and the requester belong to it.--module- the review resource's module name. Defaults to the subject's name withReviewappended.--domain- the domain for a subject the task creates. Required only when the subject does not exist.--overdue-after- moves a review the reviewer has not decided to:overduethis long after it was last submitted, given as30m,12h,2dor2w. A duration under a minute needsAshWorkflow.Scheduler.Precise. Without it, no:overduestep is generated.--transition-log- also generates a transition log for the review withmix ash_workflow.gen.transition_log. Defaults totrue.