Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0.1
  • Fix Version/s: 2.0.2
  • Component/s: Modules: Scripting
  • Labels:
    None
  • User impact:
    Medium
  • Affects Docs:
    Yes
  • Migration Impact:
    The bindings in the script context need to be documented
  • Similar Issues:
    None

Description

Right now you get different bindings depending on who calls the script. Some times the $message binding is the payload and sometimes its the MuleMessage instance. Not good. I suggest the following bindings:

$muleContext MuleContext
$eventContext MuleEventContext
$message MuleMessage
$log Logger

if MuleMessage is passed in
$payload MuleMessage.getPayload
otherwise
$originalPayload MuleEvent.getMessage.getPayload
$payload MuleEvent.transformMessage()

(all message headers get added to the context too)

For backward compatability:
$src = $payload

Activity

Hide
Ross Mason added a comment -

fixed in: r11879

Show
Ross Mason added a comment - fixed in: r11879

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: