Hi,
you simply need to use "Fsm.Event()" function to exit your state.
look at the various existing actions to see how it's implemented, for example "BoolTest"
The key is to process your logic in "OnUpdate()" function, and simply fire your event when ready.
But it's true, you should design your logic within a fsm and a series of states, not necessarly within one action, but it's totally possible, and likely make sense in your case.
bye,
Jean