Closed timeon closed 5 years ago
I ended up with this:
workflow_spec.states.values.collect(&:events).collect(&:keys).flatten.uniq
All available events: current_state.events All enabled events: current_state.events.map { |k, events| events.select { |e| e.condition_applicable? self } }.flatten.uniq.map(&:name)
current_state.events
current_state.events.map { |k, events| events.select { |e| e.condition_applicable? self } }.flatten.uniq.map(&:name)
I ended up with this:
workflow_spec.states.values.collect(&:events).collect(&:keys).flatten.uniq