0

I need to pass the dynamic parameter (Error_message,Execution_status,activity_name) from copy data activity to Web url for logic apps. is that possible to take get the nesteted ouput parameters without using the set variable activity

1
  • Hi Abilesh, yes i guess this this possible, reference nested values directly in subsequent activities Commented Jan 9, 2024 at 14:51

2 Answers 2

1

How can I fetch the previous activity name without using the set variable?

Currently, there is no dynamic expression to get the activity name in the ADF pipeline.

However, to achieve your requirement, you can try the workaround below.

First, take a parent pipeline with an Execute pipeline activity. In this activity, give your pipeline. By using the Execute pipeline activity error message, we can get the failed activity name from your child pipeline.

enter image description here

On the failure of the Execute pipeline activity, add the web activity for the logic app.

In the web activity, give your logic app URL and use the expression below in the body.

{
    "Execution_status":"@{activity('Execute Pipeline1').status}",
    "Error_message":"@{split(activity('Execute Pipeline1').Error.message,'failed: ')[1]}",
    "Activity_name":"@{substring(activity('Execute Pipeline1').error.message, add(indexOf(activity('Execute Pipeline1').error.message,'target'),7), sub(sub(indexOf(activity('Execute Pipeline1').error.message,'failed'),1),add(indexOf(activity('Execute Pipeline1').error.message,'target'),7)))}"
}

enter image description here

For example, I have posted it to a dummy URL. You can see the required values in the body.

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

0

if you use dynamic content in the body of your web call, you can reference the output of your prior tasks. We use a similar process as what you describe for error notifications using a powerApp endpoint.

your expression would look something like this

{
    "Error_Message":"@{activity('yourTask').output['Error_Message']}",
    "Execution_Status":"@{activity('yourTask').output['Execution_Status']}"
}

1 Comment

How can i fetch the previous activity name without using the set variable

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.