Adds a verification workflow to a resource
Generates a verification resource whose :verifying step runs a :verify
action the application fills in, such as a call to an outside provider. The
action's outcome routes a verification to :verified or :rejected, and
one that fails every attempt moves to :needs_review for a person to
decide. The subject gains has_many :verifications,
has_one :latest_verification and a verified? calculation. When the
subject does not exist, it is created with mix ash.gen.resource first.
Nobody may submit a verification, or decide one in review, until the
application defines who can, in the generated Checks.CanSubmit and
Checks.CanReview modules.
Example
mix ash_workflow.gen.verification MyApp.Accounts.IdentityDocument --max-attempts 5
Options
--module- the verification resource's module name. Defaults to the subject's name withVerificationappended.--domain- the domain for a subject the task creates. Required only when the subject does not exist.--max-attempts- attempts:verifygets before the verification moves to:needs_review. Defaults to3. With1, noretryblock is generated.--transition-log- also generates a transition log for the verification withmix ash_workflow.gen.transition_log. Defaults totrue.