title: spring integration spel expression to extract fields from message payload
body: <p>Not able to get my head over SPEL for Message payloads. I want to extract data from certain fields of my message payload which is essentially the following JSON converted to <code>Map&lt;String, Object&gt;</code> and passed to a <code>@Transformer</code></p>
  <pre><code>{
    &quot;expand&quot;:&quot;renderedFields,names,schema,transitions,operations,editmeta,changelog,versionedRepresentations&quot;,
    &quot;id&quot;:&quot;14730&quot;,
    &quot;self&quot;:&quot;https://jira.foo.com/rest/api/2/issue/14730&quot;,
    &quot;key&quot;:&quot;SDP-145&quot;,
    &quot;fields&quot;:{
      &quot;issuetype&quot;:{
        &quot;self&quot;:&quot;https://jira.foo.com/rest/api/2/issuetype/10200&quot;,
        &quot;id&quot;:&quot;10200&quot;,
        &quot;description&quot;:&quot;gh.issue.epic.desc&quot;,
        &quot;iconUrl&quot;:&quot;https://jira.foo.com/ghanghor/viewkaka?size=xsmall&amp;kakaId=10501&amp;kakaType=issuetype&quot;,
        &quot;name&quot;:&quot;Epic&quot;,
        &quot;subtask&quot;:false,
        &quot;kakaId&quot;:10501
      },
      &quot;priority&quot;:{
        &quot;self&quot;:&quot;https://jira.foo.com/rest/api/2/priority/3&quot;,
        &quot;iconUrl&quot;:&quot;https://jira.foo.com/images/icons/priorities/major.svg&quot;,
        &quot;name&quot;:&quot;Major&quot;,
        &quot;id&quot;:&quot;3&quot;
      },
      &quot;labels&quot;:[
        &quot;Lizzy&quot;,
        &quot;kanban&quot;,
        &quot;rughani&quot;
      ],
      &quot;updated&quot;:&quot;2021-01-21T10:33:38.000+0000&quot;,
      &quot;status&quot;:{
        &quot;self&quot;:&quot;https://jira.foo.com/rest/api/2/status/1&quot;,
        &quot;description&quot;:&quot;The issue is open and ready for the assignee to start work on it.&quot;,
        &quot;iconUrl&quot;:&quot;https://jira.foo.com/images/icons/statuses/open.png&quot;,
        &quot;name&quot;:&quot;Open&quot;,
        &quot;id&quot;:&quot;1&quot;,
        &quot;statusCategory&quot;:{
          &quot;self&quot;:&quot;https://jira.foo.com/rest/api/2/statuscategory/2&quot;,
          &quot;id&quot;:2,
          &quot;key&quot;:&quot;new&quot;,
          &quot;colorName&quot;:&quot;blue-gray&quot;,
          &quot;name&quot;:&quot;To Do&quot;
        }
      },
      &quot;summary&quot;:&quot;new epic for Tazzy&quot;,
      &quot;creator&quot;:{
        &quot;self&quot;:&quot;https://jira.foo.com/rest/api/2/user?username=skadmin&quot;,
        &quot;name&quot;:&quot;skadmin&quot;,
        &quot;key&quot;:&quot;skadmin&quot;,
        &quot;emailAddress&quot;:&quot;Lizzy.t@foo.com&quot;,
        &quot;displayName&quot;:&quot;Lizzy Rughani&quot;,
        &quot;active&quot;:true,
        &quot;timeZone&quot;:&quot;Asia/Kolkata&quot;
      },
      &quot;subtasks&quot;:[
  
      ],
    }
  }
  </code></pre>
  <p>I'm interested in three nested values here which I'm trying to fetch via following expressions</p>
  <pre><code>issueDataMap = {LinkedHashMap@4867}  size = 3
   &quot;name&quot; -&gt; &quot;#payload['fields']['summary']&quot;
   &quot;description&quot; -&gt; &quot;#payload['description']&quot;
   &quot;text3&quot; -&gt; &quot;#payload['key']&quot;
  </code></pre>
  <p>I get this error when the expression is applied</p>
  <pre><code>org.springframework.expression.spel.SpelEvaluationException: EL1012E: Cannot index into a null value
  </code></pre>
  <p>Here's how I get the payload in the as argument to my transformer</p>
  <pre><code>@Transformer
  public Map&lt;String, Object&gt; generateCardData(Map&lt;String, Object&gt; payload,
                                              @Header(&quot;X-UPSTREAM-WEBHOOK-SOURCE&quot;) String projectId) {
  </code></pre>
  <p>followed by</p>
  <pre><code>StandardEvaluationContext evaluationContext = evaluationContextFactory.getObject();
  </code></pre>
  <p>and here's how I evaluate it</p>
  <pre><code>new SpelExpressionParser().parseExpression(issueDataMap.get(key)).getValue(
                              evaluationContext, payload, String.class)));
  </code></pre>
  <p>I have the app annotated with <code>@SpringBootApplication</code> and <code>@EnableInegration</code>and I autowire an instance of <code>IntegrationEvaluationContextFactoryBean</code> to get the <code>StandardEvaluationContext</code></p>
  <p>I also tried the variant</p>
  <pre><code>issueDataMap = {LinkedHashMap@4867}  size = 3
   &quot;name&quot; -&gt; &quot;payload['fields']['summary']&quot;
   &quot;description&quot; -&gt; &quot;payload['description']&quot;
   &quot;text3&quot; -&gt; &quot;payload['key']&quot;
  </code></pre>
  <p>but then I get</p>
  <pre><code>EL1008E: Property or field 'payload' cannot be found on object of type 'java.util.LinkedHashMap' - maybe not public or not valid?
  </code></pre>