title: Grails GSP display Service variable where process time is being calculated
body: <p>I'm trying to show on the view a progress of a process that is running within a service. My Controller calls the first service which is sending information to a third party, I'm recording each time this happens by calling the second service that does a calculation to show the percentage of request complete.</p>
  
  <p>I have the value I want updating in the first service but I'm unsure how to update the view with this value. I don't return to the Controller until the job is complete.</p>
  
  <p>first service</p>
  
  <pre><code>    def batch(toCalculate,otherStuffDoneTotal otherData) {
  
          def processPercentage
  
          toCalculate.eachWithIndex(){ data, i -&gt;
  
              def otherMethod = otherMethod1(doStuffHere)
              def progress = secondService.progressCalc(otherStuffDone, otherStuffDoneTotal, processPercentage)
              }
       }
  </code></pre>
  
  <p>second service</p>
  
  <pre><code>    def progressCalc(otherStuffDoneTotal, otherStuffDone, processPercentage) {
  
          def retItems
          def retObjs = [:]
  
          processPercentage = 100 / otherStuffDoneTotal * otherStuffDone
  
          retItems = [processPercentage: processPercentage]
          retObjs.putAll(retItems)
          return(retOjbs)
  
      }
  </code></pre>
  
  <p>How do I get the view to dynamically update the value (progress.progressPercentage) from the first service</p>