Class: Example::Signup::SignupWorkflow

Inherits:
Object
  • Object
show all
Includes:
Workflows
Defined in:
lib/example/signup/signup_workflow.rb

Overview

Examples:

signup_wf = Example::Signup::SignupWorkflow.new(
  create_user:  { name: 'Harry Potter', dob: '31-07-1980' },
  notify_user:  {},
  notify_admin: { admin: Example::Signup::Models::Admin.get }
)

signup_wf.run
signup_wf.status -> [:ok, :ok, :fail]
signup_wf.output -> ["Harry Potter is successfully created.", "Harry Potter is notified", "Admin is notified"]
signup_wf.state  -> Models::User.new(name: 'Harry Potter', ...)

Constant Summary

Constants included from Workflows

Workflows::VERSION

Method Summary

Methods included from Workflows

included, #initialize, #output, #run, #state, #status