Mule - Pass Parameters to datamapper and access them in xpath conditions

后端 未结 1 608
忘了有多久
忘了有多久 2021-01-28 07:05

How to pass parameters to datamapper in mule and access them. (In XSLT, I pass them as context parameters, receive them in param and access using $ symbol). I need to do the sa

相关标签:
1条回答
  • 2021-01-28 07:21

    You can use input arguments with DataMapper and then refer to them in the output:

    <set-variable variableName="testvar" value="value of testvar"/>
    <data-mapper:transform config-ref="new_mapping_grf"">
        <data-mapper:input-arguments>
            <data-mapper:input-argument key="testvar">#[flowVars['testvar']]</data-mapper:input-argument>
        </data-mapper:input-arguments>
    </data-mapper:transform>
    

    and

    output.myField = invokeTransformer("MyTransformer",inputArguments.testvar);
    

    or

    output.myField = inputArguments.testvar;
    

    Adding input arguments available in the DataMapper GUI through the input side green plus icon.

    0 讨论(0)
提交回复
热议问题