Forum Discussion

tarima's avatar
tarima
New Member
1 year ago
Solved

Passing a variable from one pipeline to another

I'm trying to pass a variable from one pipeline (child) to another (parent). The child pipeline creates a return value variable called Test.

 

It's working just fine. Here is the output.

The parent pipeline invokes the child pipeline and then runs a Set Variable activity to capture the child pipeline's return value. Here is the expression for the Set Variable activity in the parent pipeline.

 

@activity('GetTest').output.pipelineReturnValue.Test
 

When I run the parent pipeline the Set Variable activity fails with the following error message.

 

The expression 'activity('GetTest').output.pipelineReturnValue.Test' cannot be evaluated because property 'pipelineReturnValue' doesn't exist, available properties are 'id, itemId, jobType, invokeType, status, failureReason, rootActivityId, startTimeUtc, endTimeUtc, monitoringURL, pipelineRunId, ResponseHeaders, effectiveIntegrationRuntime, executionDuration, durationInQueue, billingReference'.

 

Here is the output of the child pipeline. No Test variable.

So, the child pipeline is creating the return value just fine but when I invoke it in a parent pipeline the return value doesn't exist. Any ideas why?

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi tarima 

     

    Create a child pipeline

     

     

    Create the Parent Pipeline and add an Invoke Pipeline activity to invoke the child pipeline.

     

     

    "Invoke pipeline"

     

    "Set variable"

     

    @activity('Invoke Pipeline1').output.pipelineReturnValue.Test

     

     

    Regards,

    Nono Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi tarima 

     

    Create a child pipeline

     

     

    Create the Parent Pipeline and add an Invoke Pipeline activity to invoke the child pipeline.

     

     

    "Invoke pipeline"

     

    "Set variable"

     

    @activity('Invoke Pipeline1').output.pipelineReturnValue.Test

     

     

    Regards,

    Nono Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

    • fabchinmay's avatar
      fabchinmay
      Microsoft Employee

      Hi Anonymous , 
      I did try the above steps but still I am getting the same error 

      The expression 'activity('Invoke pipeline1').output.pipelineReturnValue.Test' cannot be evaluated because property 'pipelineReturnValue' doesn't exist, available properties are 'id, itemId, jobType, invokeType, status, failureReason, rootActivityId, startTimeUtc, endTimeUtc, monitoringURL, pipelineRunId, ResponseHeaders, effectiveIntegrationRuntime, executionDuration, durationInQueue, billingReference'.