title: Spring State Machine - Attaching static data to states
body: <p>With spring state machine, we have states and events. I could not find any documentation on whether it is possible to attach static data to a state during configuration.</p>
  
  <p>For example, if there are the states S1 and S2</p>
  
  <pre><code>public void configure(StateMachineStateConfigurer&lt;String, String&gt; states) throws Exception  {
      states.withStates()
                  .initial("INIT")
                  .end("END")
                  .state("S1", null, exitAction())
                  .state("S2", entryAction());
  }
  </code></pre>
  
  <p>If we could attach static data during the above configuration (like a java Map for example), it could be useful in the actions that are triggered (like entryAction and exitAction above)</p>
  
  <p>I don't know if it is possible to do somehow. </p>