title: Grails - Do Services have access to session?
body: <p>Do Grails <code>Service</code>s by default have access to the session object? As in being able to do:</p>
  
  <pre><code>session.putSomeValueNeededLater
  </code></pre>
  
  <p>I am asking because I have the need to store a variable as a result of one service method that another service method(in the same service) might need later and I am trying to avoid doing this via a global variable in the service because I have a feeling that is considered bad design. So I thought the session might be an alternative approach. Thanks.</p>
  
  <p><strong>Edit:</strong> In my service I have this situation:</p>
  
  <pre><code>masterMethod() {
      call method1()
      call method2()
      //Check if either method 1 or 2 set some variable that indicates whether method 3 needs to be called.
      if (condition == true) { call method3 } // Is it a good idea to store the condition in the session?
  
  }
  
  method 1() { //if some condition, masterMethod() needs to call method 3. Where to store this? In session? }
  method 2() { //if some condition, masterMethod() needs to call method 3. Where to store this? In session? }
  method 3() {...}
  </code></pre>