Class: RailsWorkflow::UserOperation
- Defined in:
- app/models/rails_workflow/user_operation.rb
Overview
Default class to describe User operation. It describes two main differences of user operation - that it can’t start automaticaly (only user can start it) and that it can be assigned to any user. This way this class can be used later as base class. There is two examples: UserByGroupOperation - where user groups used to split permissions to complete operations and UserByRoleOperation where user roles used to split permissions to complete operations.
Direct Known Subclasses
Constant Summary
Constants included from Status
Status::CANCELED, Status::DONE, Status::ERROR, Status::IN_PROGRESS, Status::NOT_STARTED, Status::ROLLBACK, Status::SKIPPED, Status::WAITING
Instance Attribute Summary
Attributes inherited from Operation
Instance Method Summary collapse
Methods inherited from Operation
#assigned_to?, #can_be_continued_by?, #can_be_started_by?, #completable?, #completed?, #execute, #instruction, #tag, #waiting?
Instance Method Details
#can_be_assigned?(_user) ⇒ Boolean
19 20 21 |
# File 'app/models/rails_workflow/user_operation.rb', line 19 def can_be_assigned?(_user) true # any user can complete operation end |
#can_start? ⇒ Boolean
15 16 17 |
# File 'app/models/rails_workflow/user_operation.rb', line 15 def can_start? false end |