Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7885983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:12:26+00:00 2026-06-03T05:12:26+00:00

In trying to restore the original payload in a message, I ran into this

  • 0

In trying to restore the original payload in a message, I ran into this issue that confused me regarding the scope of a mule message. Given the mule config below, I initially assumed that the payload received at the test.Name vm endpoint was going to be restored at the end of the flow (see 1. and 2. in the config):

<mule  ...>     
    <vm:endpoint name="replacePayloadWithFoo.Name"
            path="replacePayloadWithFoo.Path" />

    <flow name="test">
        <vm:inbound-endpoint name="test.Name" path="test.Path"
            exchange-pattern="request-response" />

        <!-- 1. Down below, I wanted to restore the payload at this point -->

        <expression-transformer evaluator="string"
            expression="bar" />

        <outbound-endpoint ref="replacePayloadWithFoo.Name"
            exchange-pattern="request-response" />

        <!-- 2. The transformer below does not restore the payload at 1. -->            

        <expression-transformer evaluator="groovy"
                expression="message.originalPayload" />
    </flow>

    <flow name="replacePayloadWithFoo">
        <inbound-endpoint ref="replacePayloadWithFoo.Name"
            exchange-pattern="request-response" />

        <expression-transformer evaluator="string"
            expression="foo" />

    </flow>

</mule>

However, it seemed as though the message that entered the test flow ended at the replacePayloadWithFoo outbound endpoint. The transformer at 2. leaves "foo" as the payload.

What’s the scope of the mule message?

In passing, the scripting reference documentation indicates that there is a binding for originalPayload in groovy scripts. However, if the transformer at 2. is replaced with

<expression-transformer evaluator="groovy" expression="originalPayload" />

I get an exception:

org.mule.api.expression.RequiredValueException: Expression Evaluator "groovy"
with expression "originalPayload" returned null but a value was required.

What could be the issue?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T05:12:28+00:00Added an answer on June 3, 2026 at 5:12 am

    Any outbound interaction, unless performed through an enricher, will affect the current in-flight message. This is why the call to replacePayloadWithFoo replaces the original message with the result of the outbound interaction.

    This said, I can not explain the discrepancy between:

    <expression-transformer evaluator="groovy" expression="message.originalPayload" />
    

    and:

    <expression-transformer evaluator="groovy" expression="originalPayload" />
    

    because they both rely on:

    event.getMessage().getPayload()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use form validation that is working in this example with my
I'm trying to restore iPhone OS 3.1.3 to a 3GS that has been upgraded
I'm trying to restore a PostgreSQL database by executing the SQL that pg_dump created,
I have a Postgresql dump file which i'm trying to restore. I get this
I have some corrupted Gzip log files that I'm trying to restore. The files
When I trying to commit I get this error. What that was done, I
So I have someone else's old code that I am trying to restore. I
I am trying to restore a database by first restoring a full backup and
Trying to use this method (gist of which is use self.method_name in the FunnyHelper
Trying to get comfortable with jQuery and I have encountered some sample code that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.