Class: Wf::Case
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Wf::Case
- Defined in:
- app/models/wf/case.rb
Instance Method Summary collapse
Instance Method Details
#can_fire?(transition) ⇒ Boolean
35 36 37 38 39 40 |
# File 'app/models/wf/case.rb', line 35 def can_fire?(transition) ins = transition.arcs.in.to_a return false if ins.blank? ins.all? { |arc| arc.place.tokens.where(case: self).where(state: :free).exists? } end |
#name ⇒ Object
42 43 44 |
# File 'app/models/wf/case.rb', line 42 def name "Case->#{id}" end |