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
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.
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)))}"
}
For example, I have posted it to a dummy URL. You can see the required values in the body.