title: Spring Batch : Field or property 'stepExecutionContext' cannot be found
body: <p>I have the following spring batch job configuration. There is a single reader which then passes details to a composite writer which has two specific writers. Both writers share a common parent and need to use the same JobId for the INSERT operations they execute.</p>
  
  <pre><code>&lt;bean id="job" parent="simpleJob"&gt;
      &lt;property name="steps"&gt;
          &lt;list&gt;
              &lt;bean parent="simpleStep"&gt;
                  &lt;property name="itemReader" ref="policyReader"/&gt;    
                  &lt;property name="itemWriter" ref="stagingCompositeWriter"/&gt;
              &lt;/bean&gt;
          &lt;/list&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean id="stagingCompositeWriter" class="org.springframework.batch.item.support.CompositeItemWriter"&gt;
      &lt;property name="delegates"&gt;
          &lt;list&gt;
              &lt;ref bean="stagingLoadWriter"/&gt;
              &lt;ref bean="stagingPolicyWriter"/&gt;
          &lt;/list&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean id="abstractStagingWriter" class="a.b.c.AbstractStagingWriter" abstract="true"&gt;
      &lt;property name="stepExecution" value="#{stepExecutionContext}"/&gt;
      &lt;property name="hedgingStagingDataSource" ref="hedgingStagingDataSource"/&gt;
  &lt;/bean&gt;
  
  &lt;bean id="stagingLoadWriter" class="a.b.c.StagingLoadWriter" parent="abstractStagingWriter"/&gt;
  
  &lt;bean id="stagingPolicyWriter" class="a.b.c.StagingPolicyWriter" parent="abstractStagingWriter"/&gt;
  </code></pre>
  
  <p>When i run my code i get the following error</p>
  
  <pre><code>Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1008E:(pos 0): Field or property 'stepExecutionContext' cannot be found on object of type 'org.springframework.beans.factory.config.BeanExpressionContext'
  at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:208)
  at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:72)
  at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:93)
  at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:88)
  at org.springframework.context.expression.StandardBeanExpressionResolver.evaluate(StandardBeanExpressionResolver.java:139)
  </code></pre>
  
  <p>I have tried setting the scope="step" in various place but to no avail. Any suggestions?</p>