Introduction and experience of Logic App Standard Advanced Tools – Part I
Published Oct 17 2023 05:59 PM 2,560 Views
Microsoft

Scenario

Microsoft announced General Availability (GA) of Logic App standard on 25th May 2021. We created an intelligent and efficient tool to self-troubleshoot Azure Logic App Standard. This tool integrated several useful features for Logic App Standard which are not available in Logic App portal yet. This blog introduces how to use this tool to help manage and troubleshoot logic app standard.

This tool is still under development and this article will introduce some features so that it is Part I. We will have Part II and Part III in the future. Thanks!

 

References

GitHub - Drac-Zhang/Logic-App-STD-Advanced-Tools

 

Services Used

Azure Logic Apps (Standard) – Need Kudo Permission

 

Introduction

1) Download tool:

intro1.pngintro2.png

 

2) Install tool:

Just drag it into Kudo and it will install automatically:

intro3.pngintro4.pngintro5.pngintro6.pngintro7.png

 

Help Page

If you want to read Help Page first, please use this command

LogicAppAdvancedTool -?

(Main page of Help Page)

LogicAppAdvancedTool [Command] -?

(Introduction of each command)

LogicAppAdvancedTool [Command] [Sub Command]-?

(Introduction of each sub command)

For example:

help1.pnghelp2.png

 

Command format

Please use command

LogicAppAdvancedTool [Command]

LogicAppAdvancedTool [Command] -wf [WorkflowName]

For some other commands, they have sub-commands, eg. SyncToLocal:

LogicAppAdvancedTool [Command] [SubCommand]

Please note: Commands are case-insensitive.

 

Command reference

Backup:

Retrieve all the definitions which can be found in Storage Table and save as Json files. The storage table saves the definition for the past 90 days by default even they have been deleted.

Usage:

Backup [options]

Options:

-d|--date

(Optional) Retrieve workflow definitions which be modified/created later than this date (format: "yyyyMMdd").

-?

Show help information.


For example:

backup1.pngbackup2.png

 

CancelRuns:

Cancel all the running/waiting instances of a workflow.

Please note: Be aware of this command will cause data loss.

Usage:

CancelRuns [options]

Options:

-wf|--workflow

(Mandatory) Workflow Name.

-?

Show help information.


For example:

cancelruns.png

 

CleanJobQueue:

(Deprecated) Clear Logic App storage queue, this action could cause data loss.

CleanUpContainers:

Delete all the Logic App auto-generated blob containers for run history before a specific date.

Usage:

CleanUpContainers [options]

Options:

-wf|--workflow

(Optional) The name of workflow. If not provided, then all the workflow containers will be deleted.

-d|--date

Delete containers before this date (format: "yyyyMMdd"), UTC time.

-?

Show help information.


For example:

cleanupcontainers.png

 

CleanUpTables:

Delete all the Logic App auto-generated storage tables for run history before a specific date.

Usage:

CleanUpTables [options]

Options:

-wf|--workflow

(Optional) The name of workflow. If not provided, then all the workflow containers will be deleted.

-d|--date

(Mandatory) Delete run history related tables before this date (format: "yyyyMMdd"), UTC time.

-?

Show help information.


For example:

cleanuptables.png

CleanUpRunHistory:

Combined command of CleanUpContainers and CleanUpTables.

Usage:

CleanUpRunHistory [options]

Options:

-wf|--workflow

(Optional) The name of workflow. If not provided, then all the workflow containers will be deleted.

-d|--date

(Mandatory) Delete run history related resources before this date (format: "yyyyMMdd"), UTC time.

-?

Show help information.

 

For example:

cleanuprunhistory.png

 

Check connectivity:

Check the connection between Logic App and Storage Account via DNS resolution and TCP ping of 443 port. This command needs Kudu site is available.

Usage:

CheckConnectivity [options]

Options:

-?

Show help information.


For example:

checkconnectivity.png

 

Clone:

Clone a workflow to a new workflow, only support for same Logic App and same kind (stateful or stateless).

Usage:

Clone [options]

Options:

-sn|--sourcename

(Mandatory) Source Workflow Name.

-tn|--targetname

(Mandatory) Target Workflow Name.

-v|--version

(Optional) Version of the workflow the latest version will be cloned, if not provided the latest version will be selected.)

-?

Show help information.


For example:

clone1.pngclone2.png

 

ConvertToStateful:

Clone a stateless workflow and create a new stateful workflow.

Usage:

ConvertToStateful [options]

Options:

-sn|--sourcename

(Mandatory) Source Workflow Name (Stateless)

-tn|--targetname

(Mandatory) Target Workflow Name (Stateful)

-?

Show help information.


For example:

converttostateful1.pngconverttostateful2.png

 

Decode:

Decode a workflow based on provided version to human readable content.

Usage:

Decode [options]

Options:

-wf|--workflow

(Mandatory) Workflow Name.

-v|--version

(Mandatory) Version, the first part of the backup file name.

-?

Show help information.


For example:

decode.png

 

GenerateTablePrefix:

Generate Logic App/Workflow's storage table prefix.

Usage:

GenerateTablePrefix [options]

Options:

-wf|--workflow

(Optional) Workflow name, if not provided, only Logic App prefix will be generated).

-?

Show help information.


For example:

generatetableprefix.png

GenerateRunHistoryUrl:

Generate run history of failure runs of a specific workflow on a specific day. The url can directly open run history page.

Usage:

GenerateRunHistoryUrl [options]

Options:

-wf|--workflow

(Mandatory) The name of workflow.

-d|--date

(Mandatory) The date (format: "yyyyMMdd") you would like to retrieve logs, UTC time.

-f|--filter

(Optional) Filter for specific exception messages.

-?

Show help information.


For example:

generaterunhistoryurl.pnggeneraterunhistoryurl2.png

 

IngestWorkflow:

(In development) This is an experimental feature. NOT fully tested, DON'T use in PROD environment!!! Ingest a workflow into Storage Table directly to bypass workflow definition validation.

ListVersions:

List all the existing versions of a workflow.

Usage:

ListVersions [options]

Options:

-wf|--workflow

(Mandatory) Workflow Name.

-?

Show help information.


For example:

listversions.png

 

ListWorkflows:

List all the existing workflows which can be found in the storage table.

Usage:

ListWorkflows [options]

Options:

-?

Show help information.

 

For example:

listworkflows.png

 

RestoreAll:

Restore all the workflows which were deleted accidentally.

Please note: Restore all workflows which have been deleted, the existing workflows will not be impacted.

Usage:

RestoreAll [options]

Options:

-?

Show help information.


For example:

restoreall1.pngrestoreall2.png

 

RestoreSingleWorkflow:

Restore a workflow which has been deleted accidentally.

Usage:

RestoreSingleWorkflow [options]

Options:

-wf|--workflow

(Mandatory) The name of the workflow.

-?

Show help information.


For example:

restoresingleworkflow.png

 

RestoreRunHistory:

Restore run history of a deleted/overwritten workflow.

Please note: This is an experimental feature that might cause unexpected behavior in Logic App runtime since we directly modify workflow id.

Usage:

RestoreRunHistory [options]

Options:

-wf|--workflow

(Mandatory) Workflow name.

-?

Show help information.


For example:

restorerunhistory.png

RetrieveFailures:

Retrieve all the detailed failure information of a workflow for a specific day/run.

Usage:

RetrieveFailures [command] [options]

Options:

-?

Show help information.


Commands:

Run 'RetrieveFailures [command] -?' for more information about command.

Date

Retrieve all the detailed failure information of a workflow for a specific day.

Run

Retrieve all the detail failure information of a workflow for a specific run.

 

For example:

retrievefailures.png

 

Revert:

Revert a workflow to a specific version.

Usage:

Revert [options]

Options:

-wf|--workflow

(Mandatory) Workflow Name.

-v|--version

(Mandatory) Version, the first part of the backup file name.

-?

Show help information.

 

For example:

revert.png

 

SyncToLocal:

Sync remote wwwroot folder of Logic App Standard to local project. This command must run on a local computer. There are 3 subcommands for different usage, please use '-?' for more information.

Please note: Local computers need to have access to Storage Account.

Usage:

SyncToLocal [command] [options]

Options:

-?

Show help information.


Commands:

Run 'SyncToLocal [command] -?' for more information about a command.

Auto

Auto mode, there's no prompt dialog and can be set as schedule task for regular execution.

Batch

Batch mode, read configuration file (JSON format) from local folder and sync all the Logic Apps which are provided in config without prompt confirmation dialog.

Normal

Normal mode for manual sync, provides prompt dialog for confirmation of each step.


For example:

synctolocal1.pngsynctolocal2.png

 

SearchInHistory:

Search for a keyword in workflow run history based on date.

Usage:

SearchInHistory [options]

Options:

-wf|--workflow

(Mandatory) The name of workflow.

-d|--date

(Mandatory) Date (format: "yyyyMMdd") of the logs need to be searched, UTC time.

-k|--keyword

(Mandatory) The keyword you would like to search for.

-b|--includeBlob

(Optional) true/false, whether needs to include the run history which saved as blob. Only the blob size less than 1MB will be checked due to memory saving.

-of|--onlyFailures

(Optional) Whether only to search for failed runs.

-?

Show help information.


For example:

searchinhistory1.pngsearchinhistory2.png

 

Co-Authors
Version history
Last update:
‎Oct 17 2023 09:29 AM
Updated by: