title: How to call a specific method of a tasklet
body: <p>In a job context there are an 'method' parameter so a could call directly an tasklet method as said in the documentation "If the tasklet is specified as a bean definition, then a method can be specified and a POJO will be adapted to the Tasklet interface. The method suggested should have the same arguments as Tasklet.execute (or a subset), and have a compatible return type (boolean, void or RepeatStatus)." I declared a bean   </p>
  
  <pre><code>    &lt;step id="carregaStep" next="iniciaStep"&gt;
          &lt;tasklet ref="atividadesTasklet" method="carregaAtividades"/&gt;
      &lt;/step&gt;
  </code></pre>
  
  <p>I declared a bean that extends Tasklet and I implement an method:</p>
  
  <pre><code>public RepeatStatus carregaAtividades(StepContribution contribution, ChunkContext chunkContext) throws Exception 
  </code></pre>
  
  <p>But this method is not called. </p>
  
  <p>I try to search an exemplo of use in google, but it's dificult since 'method' in a common word and google cannot search pontuation, like a search for "method=" and "tasklet". Someone could give me an example of use of a method of tasklet?</p>
  
  <pre><code>&lt;bean id="atividadesTasklet" class="br.mypackage.AtividadesTasklet" scope="step" /&gt;
  
  
  
  public class AtividadesTasklet implements Tasklet{
  
      public RepeatStatus carregarAtividades(StepContribution contribution, ChunkContext chunkContext) throws Exception {
          return RepeatStatus.FINISHED;   
      }
  
  
      @Override
      public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
          return RepeatStatus.FINISHED;
      }   
  }
  
  
      &lt;step id="carregaAtividadesStep" &gt;
          &lt;tasklet ref="atividadesTasklet" method="carregarAtividades"&gt;
  
          &lt;/tasklet&gt;
      &lt;/step&gt;
  </code></pre>