JIRA

  • Log In Access more options
    • Online Help
    • GreenHopper Help
    • Agile Answers
    • Use Agile By Default
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Agile Access more options (Alt+g)
  • Create Issue
  • Mule
  • MULE-5096

Transformation result gets lost in a router chaining an async-reply service to a one-way service

  • Agile Board
  • More Actions
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 3.0.1
  • Fix Version/s: Bug Backlog
  • Component/s: Core: API
  • Labels:
    None
  • User impact:
    Medium
  • Configuration:
    Hide

    <?xml version="1.0" encoding="UTF-8"?>
    <mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:vm="http://www.mulesoft.org/schema/mule/vm" xmlns:script="http://www.mulesoft.org/schema/mule/scripting"
    xsi:schemaLocation="
    http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.0/mule.xsd
    http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/3.0/mule-vm.xsd
    http://www.mulesoft.org/schema/mule/scripting http://www.mulesoft.org/schema/mule/scripting/3.0/mule-scripting.xsd
    ">

    <script:transformer name="appendBar">
    <script:script engine="groovy">
    <script:text>payload.collect() { it + '.bar' }</script:text>
    </script:script>
    </script:transformer>

    <model>
    <service name="Chain">
    <inbound>
    <vm:inbound-endpoint path="chain" />
    </inbound>
    <outbound>
    <chaining-router>
    <vm:outbound-endpoint path="async-reply" exchange-pattern="request-response" />
    <vm:outbound-endpoint path="logger" transformer-refs="appendBar" />
    </chaining-router>
    </outbound>
    </service>

    <service name="AsyncReply">
    <inbound>
    <vm:inbound-endpoint path="async-reply" exchange-pattern="request-response" />
    </inbound>
    <outbound>
    <list-message-splitter-router>
    <vm:outbound-endpoint path="foo-appender" exchange-pattern="request-response"/>
    <reply-to address="vm://async-reply.reply" />
    </list-message-splitter-router>
    </outbound>
    <async-reply timeout="0">
    <vm:inbound-endpoint path="async-reply.reply" />
    <collection-async-reply-router />
    </async-reply>
    </service>

    <service name="FooAppender">
    <inbound>
    <vm:inbound-endpoint path="foo-appender" exchange-pattern="request-response" />
    </inbound>
    <script:component>
    <script:script engine="groovy">
    <script:text>payload + '.foo'</script:text>
    </script:script>
    </script:component>
    </service>

    <service name="Logger">
    <inbound>
    <vm:inbound-endpoint path="logger" />
    </inbound>
    <!-- Can't use log-component because of http://www.mulesoft.org/jira/browse/MULE-5095 -->
    <script:component>
    <script:script engine="groovy">
    <script:text>
    log.info(payload)
    </script:text>
    </script:script>
    </script:component>
    </service>

    </model>
    </mule>

    Show
    <?xml version="1.0" encoding="UTF-8"?> <mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:vm="http://www.mulesoft.org/schema/mule/vm" xmlns:script="http://www.mulesoft.org/schema/mule/scripting" xsi:schemaLocation=" http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.0/mule.xsd http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/3.0/mule-vm.xsd http://www.mulesoft.org/schema/mule/scripting http://www.mulesoft.org/schema/mule/scripting/3.0/mule-scripting.xsd "> <script:transformer name="appendBar"> <script:script engine="groovy"> <script:text>payload.collect() { it + '.bar' }</script:text> </script:script> </script:transformer> <model> <service name="Chain"> <inbound> <vm:inbound-endpoint path="chain" /> </inbound> <outbound> <chaining-router> <vm:outbound-endpoint path="async-reply" exchange-pattern="request-response" /> <vm:outbound-endpoint path="logger" transformer-refs="appendBar" /> </chaining-router> </outbound> </service> <service name="AsyncReply"> <inbound> <vm:inbound-endpoint path="async-reply" exchange-pattern="request-response" /> </inbound> <outbound> <list-message-splitter-router> <vm:outbound-endpoint path="foo-appender" exchange-pattern="request-response"/> <reply-to address="vm://async-reply.reply" /> </list-message-splitter-router> </outbound> <async-reply timeout="0"> <vm:inbound-endpoint path="async-reply.reply" /> <collection-async-reply-router /> </async-reply> </service> <service name="FooAppender"> <inbound> <vm:inbound-endpoint path="foo-appender" exchange-pattern="request-response" /> </inbound> <script:component> <script:script engine="groovy"> <script:text>payload + '.foo'</script:text> </script:script> </script:component> </service> <service name="Logger"> <inbound> <vm:inbound-endpoint path="logger" /> </inbound> <!-- Can't use log-component because of http://www.mulesoft.org/jira/browse/MULE-5095 --> <script:component> <script:script engine="groovy"> <script:text> log.info(payload) </script:text> </script:script> </script:component> </service> </model> </mule>
  • Similar Issues:
    None

Description

In the attached configuration, the appendBar transformer defined on the outbound logger endpoint gets called, the message gets correctly transformed but when it hits the logger service, the payload is reverted to the value before transformation.

Test the attached config with: muleClient.dispatch("vm://chain", Arrays.asList("abc", "def"), null);

Getting logged: [abc.foo, def.foo]
Expected: [abc.foo.bar, def.foo.bar]

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Transitions
  • Commits
  • Source
  • Builds

People

  • Assignee:
    Unassigned
    Reporter:
    David Dossot
Vote (0)
Watch (0)

Dates

  • Created:
    17/Sep/10 02:01 PM
    Updated:
    05/Oct/10 11:04 AM

Agile

  • View on Board
  • Atlassian JIRA (v5.0.7#734-sha1:8ad78a6)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for MuleForge. Try JIRA - bug tracking software for your team.