Import flow traces via Azure Logic App workflows
Invictus is fully supported to import flows from Azure Logic Apps. It allows to keep track of the execution tree of the ran workflows, plus with tracked properties you can trace specific data for your needs besides the general diagnostic settings.
Workflow operations via Dashboard Requires Operator
Requires the x-iv-parent-workflow-run-id
to be set on the workflows to run properly.
Flows linked to Azure Logic Apps workflows can be resubmitted and resumed via the Dashboard both separately (via the flow actions button) and in batch (via selecting multiple flows).
- Resubmit
- Resume
- Ignore
- Custom
The resubmit functionality will always trigger an "Azure Resubmit" for the first Azure Logic App in the chain. Resubmit will trigger the execution of any corresponding flow, even completed ones. When resubmit is triggered, the first Logic App in the chain (execution tree) is resubmitted on Azure thus retriggering the whole flow.
If we had to take the above image as an example. If resubmit is executed for this flow, "LogicAppChain-A" is resubmitted on Azure. The below image is the outcome after "LogicAppChain-A" is re-executed through the resubmit.
The resume function executes an "Azure Resubmit" for each failed function in the chain. Resume only works on messages with the status Failed. Also, the resume does not start from the first logic app within its flow, as with the resubmit, but instead executes only the failed logic apps.
☝️ The only exception is that if a Parent Logic App of a failed Logic App has also failed, then only the Parent is executed.
Users can choose to ignore a message, normally this could be the case when a message is in failed status. The user can select one or multiple messages and choose to "Ignore" them.
When a message has been set to be ignore, its status will change and show as follows
Flows can be resumed or resubmitted via a custom interaction HTTP endpoint instead of the default Azure management URL, which will resume/resubmit the Azure Logic App workflow mapped to the flow (via DSAV and Workflow name properties).
Configure flow for custom resume/resubmit
The Advanced Settings section is located on the right side of the flow page. To enable custom resume and resubmit for a flow, toggle the switches of Custom resubmit URL and Custom resume URL respectively. Enter a HTTPS URL in one of the fields to set a resubmit/resume URL. The (▷)
button will test the URL to see if it is reachable.
A message will be displayed to indicate if the test was successful.
You may need to use custom HTTP headers when making the custom resubmit/resume request. To edit the HTTP headers, click the (@)
button to open the HTTP headers dialog box where custom HTTP headers can be added.
Resume/Resubmit a flow
Once configured, navigate to the search flow traces page by selecting the flow in the sidebar you just adapted for custom resume/resubmit. Flows can only be resumed/resubmitted based on available flow traces.
A HTTP POST
request will be sent to the configured custom resubmit URL, with a body containing information about the flow run.
Full JSON request body example
[
{
"id": "64d206051178624d80f70775",
"workflowEventId": "1f8be9e8-dc61-41c5-9146-13ce087cbc08",
"partitionKey": "02c1eacb-60a9-4fa9-937f-971b10f567d4",
"workFlowRunId": "08585101213801371750243005842CU150",
"dateInserted": "2023-08-07T09:08:21.028Z",
"parentWorkFlowRunId": "",
"chainId": "439f11e1-739e-461e-b785-f7adad7ff876",
"executionTime": "2023-08-08T09:05:05.372Z",
"appName": null,
"workflowName": "someworkflow",
"statusId": 2,
"subscriptionId": "07459384-7900-43c9-b940-8f90d6ab3c7c",
"resourceGroupName": "someresourcegroup",
"triggerName": "manual",
"userStatus": 1,
"workFlowActionCount": 10,
"errorInfo": "",
"properties": {
"x_iv_enqueued_time": "08/07/2023 09:07:06 +00:00",
"x_iv_importjob_pickuptime": "08/07/2023 09:07:06",
"Domain": "SomeDomain",
"Service": "SomeService",
"Action": "SomeAction",
"Version": "1.0"
},
"source": "1",
"eventText": "Some Event Text",
"messageContentView": null,
"actionName": null
}
]
Example scenarios
Scenario One: resubmit first in the chain
In this scenario, a resubmit was executed on Logic App 1. Since the Azure Logic App is the first one in the chain, which can be identified by the null x-iv-parent-workflow-run-id, this scenario will be handled as a Resubmit. As soon as we receive the events for 4, 5 and 6 we will link 4 with 1 through the OriginWorkFlowRunId which is supplied by the LogicAppRuntime and ignore all descendants of 1.
Scenario Two: resume further down the chain
In this scenario, the resubmitted logic app Is number 3. Since this is not the first Azure Logic App in the Chain, this will be handled as a Resume. As soon as we receive the events for number 4 we can immediately link it to number 1 since it will still have the same x-iv-parent-workflow-run-id. Through the OriginWorkFlowRunId of 333 Azure Logic App 4 is then treated as a resubmit of 3. In the case of a resume, only the resubmitted Azure Logic Apps and its descendants are ignored and not the whole chain.
Scenario Three: resubmit further down the chain
This will be similar to scenario two. In this case the developer decided to resubmit Azure Logic App 3. This can only be achieved through the azure portal as the Invictus Dashboard will only resubmit Failed Azure Logic Apps.
Scenario Four: resubmit multiple further down the chain
In this scenario the developer resubmitted Azure Logic App 2 and Azure Logic App 3.