Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to access custom variables created as Output variable of XSL transfrom in subsequent assign message

Not applicable
 
Solved Solved
0 11 1,295
1 ACCEPTED SOLUTION

Not applicable

Alas, createNew will blank out previous request data. You would then have to manually copy the elements you want into the new request. The alternative is to for createNew=false with a previous step copying the essential elements you need later. Something along the lines of:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AssignMessage async="false" continueOnError="true" enabled="true" name="assignSaveMessage">
    <DisplayName>assignSaveMessage</DisplayName>
    <AssignVariable>
        <Name>save.request.content</Name>
        <Ref>request.content</Ref>
    </AssignVariable>
    <AssignVariable>
        <Name>save.request.verb</Name>
        <Ref>request.verb</Ref>
    </AssignVariable>
    <AssignVariable>
        <Name>save.request.queryparam.foo</Name>
        <Ref>request.queryparam.foo</Ref>
    </AssignVariable>
[snip]
    <AssignVariable>
        <Name>storeIdAccessToken</Name>
        <Ref>access_token</Ref>
    </AssignVariable>
    <IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
    <AssignTo createNew="false" transport="http" type="request"/>
</AssignMessage>

You could then "restore" those values after you handle the callout. Like follows:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AssignMessage async="false" continueOnError="true" enabled="true" name="assignRestoreMessage">
    <DisplayName>assignRestoreMessage</DisplayName>
    <AssignVariable>
        <Name>request.verb</Name>
        <Ref>save.request.verb</Ref>
    </AssignVariable>
    <AssignVariable>
        <Name>request.queryparam.content</Name>
        <Ref>save.request.queryparam.content</Ref>
    </AssignVariable>
    <AssignVariable>
        <Name>request.queryparam.foo</Name>
        <Ref>save.request.queryparam.foo</Ref>
    </AssignVariable>
[snip]
    <IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
    <AssignTo createNew="false" transport="http" type="request"/>
</AssignMessage>

View solution in original post

11 REPLIES 11