我有 2 个事件:
event :event1, after: :event2! do
transitions to: :state2, from: :state1, guard: proc {some func}
transitions to: :state3, from: :state1
end
event :event2 do
transitions to: :state3, from: state2, guard: proc {some func}
end
如何在回调后仅在 event1 中设置第一次转换?(我不能将第二次转换替换为其他事件)
我试过了
event :event1 do
transitions to: :state2, from: :state1, after: :event2!, guard: proc {some func}
transitions to: :state3, from: :state1
end
但它不起作用