How to check the status of pipeline A from Pipeline B. I have to pass the status of Pipeline A into If activity in pipeline B
I have created a pipeline A which has 3 databricks notebook and on Pipeline B i have to use If activity and pass the status of pipeline A. On False condition i have to rerun the pipeline A. Is there any way through which I can check the status of pipeline through code/activity so that I can pass that inside the if condition.
Flow of Pipeline B will look like this: If activity : Pipeline A executes unsuccessful: Rerun it Otherwise: Add wait activity
false
to begin with.false
itself.{
"name": "P_B",
"properties": {
"activities": [
{
"name": "Set variable1",
"type": "SetVariable",
"dependsOn": [],
"userProperties": [],
"typeProperties": {
"variableName": "flag",
"value": {
"value": "true",
"type": "Expression"
}
}
},
{
"name": "Until1",
"type": "Until",
"dependsOn": [
{
"activity": "Set variable1",
"dependencyConditions": [
"Succeeded"
]
}
],
"userProperties": [],
"typeProperties": {
"expression": {
"value": "@not(equals(variables('flag'),'false'))",
"type": "Expression"
},
"activities": [
{
"name": "Execute Pipeline1",
"type": "ExecutePipeline",
"dependsOn": [],
"userProperties": [],
"typeProperties": {
"pipeline": {
"referenceName": "P_A",
"type": "PipelineReference"
},
"waitOnCompletion": true
}
},
{
"name": "Set variable3",
"type": "SetVariable",
"dependsOn": [
{
"activity": "Execute Pipeline1",
"dependencyConditions": [
"Succeeded"
]
}
],
"userProperties": [],
"typeProperties": {
"variableName": "flag",
"value": "true"
}
},
{
"name": "Set variable4",
"type": "SetVariable",
"dependsOn": [
{
"activity": "Execute Pipeline1",
"dependencyConditions": [
"Failed"
]
}
],
"userProperties": [],
"typeProperties": {
"variableName": "flag",
"value": "false"
}
}
],
"timeout": "0.12:00:00"
}
},
{
"name": "Wait1",
"type": "Wait",
"dependsOn": [
{
"activity": "Until1",
"dependencyConditions": [
"Succeeded"
]
}
],
"userProperties": [],
"typeProperties": {
"waitTimeInSeconds": 10
}
}
],
"variables": {
"flag": {
"type": "String"
}
},
"annotations": []
}
}