title: Return to the caller state?
body: <p>I am using C#'s stateless state-machine, but I've had this issue in the past with other state-machine implementation. The question is mostly theoretical, though I can add some dummy code if asked for.</p>
  
  <p>I have a situation which I am quite unsure how to solve. Lets say you have 2 states (walk and run), and they both can transition to a 3rd state (jump). Once the 3rd state is done, I wish to go back to the caller state. In a way, I'd have to be able to influence the callee trigger, but this is only passed on to <code>OnEntry</code> and the likes, not the state itself.</p>
  
  <p>Using <code>EntryFrom</code> doesn't seem to work, because there is no way to influence the "jump" state itself, only the <code>OnEntry</code> function.
  Using <code>PermitDynamic</code> doesn't seem to work either, because once in the "jump" state, I have no idea where I came from.</p>
  
  <p>I could have 2 jump states (jumpfromrun, jumpfromwalk) with a single <code>OnEntry</code> function, to minimize some duplicate code. This is what I currently use.</p>
  
  <p>I could save the previous state in an external variable and pass that to my state update. I do not wish to do this (at all).</p>
  
  <p>Is there a known technique or way to deal with this sort of problem? Having a shared state, that should transition back to the caller?
  Thank you!</p>