title: Basic State Machine setup using Stateless
body: <p>I have some fairly simple state needs (for now).  I think I would like to model these using the <a href="http://code.google.com/p/stateless/">Stateless</a> api.  (But I don't really know much about state machines, so I could be wrong.)</p>
  
  <p>But I am getting caught up in the terminology (Specifically <strong>State</strong> and <strong>Trigger</strong>)</p>
  
  <p>Here is an example:  I have an order class.  It is setup with several states.  They are: New, Filled, Shipping, Completed, Cancelled.</p>
  
  <p>A few simple state rules I would like is that these state transitions are allowed:</p>
  
  <ul>
  <li>New (is the default)</li>
  <li>New -> Filled</li>
  <li>New -> Cancelled</li>
  <li>Filled -> Shipping</li>
  <li>Filled -> Cancelled</li>
  <li>Filled -> Shipping </li>
  <li>Shipping -> Complete</li>
  </ul>
  
  <p>So where I am getting tripped up here is what is my "Trigger"?  </p>
  
  <p>Just in case a more specific example is needed,  say I want a method like this:</p>
  
  <pre><code>public bool UpdateOrderStatus(int OrderId, OrderStatusEnum NewOrderStatus)
  </code></pre>
  
  <p>that will return true if the status updated successfully.  How can setup and use Stateless to make this happen?</p>