Logic App Consumption
- 08 Oct 2024
- 1 Minute to read
- Print
- DarkLight
- PDF
Logic App Consumption
- Updated on 08 Oct 2024
- 1 Minute to read
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
In this sample we will look at the scenario for the employee benefits process in Logic App Consumption where we read data from a data source and push it to partners.
When you open a transaction you can see the detail of the steps we have processed.
Video Walk Thru
The below video gives a detailed walk through of this sample.
Parent Query
let runStartedEvent = AzureDiagnostics
| where OperationName == "Microsoft.Logic/workflows/workflowActionCompleted"
| where ResourceGroup == "EAI_APP_EMPLOYEEBENEFITSFILES"
| where resource_workflowName_s == "EmployeeBenefits-To-BenefitsManagement-Partner"
| where resource_actionName_s == "Parse_JSON_-_Tracking_Args"
| extend FileName = trackedProperties_fileName_s
| extend WorkFlowName = resource_workflowName_s
| extend WorkFlowRunID = resource_runId_s
| order by TimeGenerated desc
| project TimeGenerated, FileName, WorkFlowName, WorkFlowRunID;
let workflowCompetedEvents = AzureDiagnostics
| where ResourceGroup == "EAI_APP_EMPLOYEEBENEFITSFILES"
| where resource_workflowName_s == "EmployeeBenefits-To-BenefitsManagement-Partner"
| where OperationName == "Microsoft.Logic/workflows/workflowRunCompleted"
| extend Result = status_s
| extend Start = startTime_t
| extend End = endTime_t
| extend WorkFlowName = resource_workflowName_s
| extend WorkFlowRunID = resource_runId_s
| order by TimeGenerated desc
| project WorkFlowRunID, Result, Start, End;
runStartedEvent | join kind=inner workflowCompetedEvents on WorkFlowRunID
| project TimeGenerated, FileName, WorkFlowName, WorkFlowRunID,Result, Start, End
| order by TimeGenerated desc
Child Queries
Get Employee Data
This is the first stage and shows how to append the url so you can go to the Azure portal.
let inputLogicAppRunPortalUrl = "https://portal.azure.com/#view/Microsoft_Azure_EMA/DesignerEditorConsumption.ReactView/id/%2Fsubscriptions%2F08a281b8-3b07-4219-a517-b11230e9b34f%2FresourceGroups%2FEAI_App_EmployeeBenefitsFiles%2Fproviders%2FMicrosoft.Logic%2Fworkflows%2FEmployeeBenefits-To-BenefitsManagement-Partner/location/northeurope/showGoBackButton~/true/isReadOnly~/true/isMonitoringView~/true/runId/%2Fsubscriptions%2F08a281b8-3b07-4219-a517-b11230e9b34f%2FresourceGroups%2FEAI_App_EmployeeBenefitsFiles%2Fproviders%2FMicrosoft.Logic%2Fworkflows%2FEmployeeBenefits-To-BenefitsManagement-Partner%2Fruns%2F";
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.LOGIC"
| where ResourceGroup == "EAI_APP_EMPLOYEEBENEFITSFILES"
| where resource_workflowName_s == "EmployeeBenefits-To-BenefitsManagement-Partner"
| where ResourceType == "WORKFLOWS/RUNS/ACTIONS"
| where OperationName == "Microsoft.Logic/workflows/workflowActionCompleted"
| where Resource == "HTTP_-_GET_EMPLOYEE_BENEFITS_DATASET"
| where resource_runId_s == {WorkFlowRunID}
| extend FileName = trackedProperties_fileName_s
| extend WorkFlowName = resource_workflowName_s
| extend WorkFlowRunID = resource_runId_s
//Here I concat the url to show the portal url using the earlier parameter
| extend PortalUrl = strcat(inputLogicAppRunPortalUrl, resource_runId_s)
Transform Data
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.LOGIC"
| where ResourceGroup == "EAI_APP_EMPLOYEEBENEFITSFILES"
| where resource_workflowName_s == "EmployeeBenefits-To-BenefitsManagement-Partner"
| where ResourceType == "WORKFLOWS/RUNS/ACTIONS"
| where OperationName == "Microsoft.Logic/workflows/workflowActionCompleted"
| where Resource == "COMPOSE_-_PARTNER_MESSAGE"
| where resource_runId_s == {WorkFlowRunID}
| extend FileName = trackedProperties_fileName_s
| extend WorkFlowName = resource_workflowName_s
| extend WorkFlowRunID = resource_runId_s
Deliver File to Partner
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.LOGIC"
| where ResourceGroup == "EAI_APP_EMPLOYEEBENEFITSFILES"
| where resource_workflowName_s == "EmployeeBenefits-To-BenefitsManagement-Partner"
| where ResourceType == "WORKFLOWS/RUNS/ACTIONS"
| where OperationName == "Microsoft.Logic/workflows/workflowActionCompleted"
| where Resource == "CREATE_BLOB_(V2)"
| where resource_runId_s == {WorkFlowRunID}
| extend FileName = trackedProperties_fileName_s
| extend WorkFlowName = resource_workflowName_s
| extend WorkFlowRunID = resource_runId_s
Was this article helpful?