A workflow with requires and when.
Approval
submit waits until title and body are present. approve waits until two approvals are recorded and the author is someone other than the requester. reject waits for a reason.
app approvals "Approvals" {}
entity Article {
title: text
body: longtext
approvals: number
author: text
requester: text
reason: text
workflow {
initial Draft
states Draft, Review, Approved, Rejected
terminal Approved, Rejected
submit: Draft -> Review requires title, body
approve: Review -> Approved when approvals >= 2 and author != requester
reject: Review -> Rejected requires reason
}
}