Azure / Azure/LogicAppsUX

How (on earth) to stop (forever) a logic app running flow in vscode?

Open
#8,629 1 comment 1 reaction 0 assignees View on GitHub
VSCode
Dominant language
TypeScript
Stars
111
Forks
109
Avg merge
1d 23h
Merged PRs (30d)
20

Description

### Severity

P2 - High (Major functionality broken)

### Describe the Bug with repro steps

Hi,

I am coding a standard logic app flow in vscode. I want to do something very simple: Stop a running flow (forever). I can't see any "stop" button anywhere.

On top of that, if I stop the debugger and press F5 again, this running flow ID is resumed (which I don't want at all).

How can it be so complex to stop a running instance?

### What type of Logic App Is this happening in?

Standard (VSCode)

### Are you experiencing a regression?

_No response_

### Which operating system are you using?

Windows

### Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg

Yes

### Workflow JSON

```json
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"contentVersion": "1.0.0.0",
"actions": {
"Initialize_CSV_Variable": {
"type": "InitializeVariable",
"inputs": {
"variables": [
{
"name": "csvOutput",
"type": "string",
"value": "Id,CreatedDate,Source_DC,PartNumber,Qty,Truck Number"
}
]
},
"runAfter": {}
},
"Initialize_Skip_Variable": {
"type": "InitializeVariable",
"inputs": {
"variables": [
{
"name": "skip",
"type": "integer",
"value": 0
}
]
},
"runAfter": {
"Initialize_CSV_Variable": [
"SUCCEEDED"
]
}
},
"Initialize_Top_Variable": {
"type": "InitializeVariable",
"inputs": {
"variables": [
{
"name": "top",
"type": "integer",
"value": 50
}
]
},
"runAfter": {
"Initialize_Skip_Variable": [
"SUCCEEDED"
]
}
},
"Initialize_TotalCount_Variable": {
"type": "InitializeVariable",
"inputs": {
"variables": [
{
"name": "totalCount",
"type": "integer",
"value": -1
}
]
},
"runAfter": {
"Initialize_Top_Variable": [
"SUCCEEDED"
]
}
},
"Initialize_ContinuePaging_Variable": {
"type": "InitializeVariable",
"inputs": {
"variables": [
{
"name": "continuePaging",
"type": "boolean",
"value": true
}
]
},
"runAfter": {
"Initialize_TotalCount_Variable": [
"SUCCEEDED"
]
}
},
"Call_an_Azure_function_-_Check_SC_Status": {
"type": "Function",
"inputs": {
"method": "GET",
"function": {
"connectionName": "azureFunctionOperation-2"
},
"retryPolicy": {
"type": "none"
}
},
"runAfter": {
"Initialize_ContinuePaging_Variable": [
"SUCCEEDED"
]
}
},
"Until_All_Pages_Processed": {
"type": "Until",
"expression": "@equals(variables('continuePaging'), false)",
"limit": {
"count": 500,
"timeout": "PT2H"
},
"actions": {
"Call_an_Azure_function_-_Get_WOs": {
"type": "Function",
"inputs": {
"method": "GET",
"queries": {
"top": "@variables('top')",
"skip": "@variables('skip')"
},
"function": {
"connectionName": "azureFunctionOperation-3"
},
"retryPolicy": {
"type": "none"
}
}
},
"Parse_JSON_-_Get_WO": {
"type": "ParseJson",
"inputs": {
"content": "@body('Call_an_Azure_function_-_Get_WOs')",
"schema": {
"type": "object",
"properties": {
"@@odata.count": {
"type": "integer"
},
"value": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Id": {
"type": "integer"
},
"CreatedDate": {
"type": "string"
},
"Description": {
"type": "string"
},
"Inventory_Site": {
"type": "string"
},
"Status": {
"type": "string"
}
},
"required": [
"Id",
"CreatedDate",
"Description",
"Inventory_Site",
"Status"
]
}
}
}
}
},
"runAfter": {
"Call_an_Azure_function_-_Get_WOs": [
"SUCCEEDED"
]
}
},
"Set_TotalCount": {
"type": "SetVariable",
"inputs": {
"name": "totalCount",
"value": "@body('Parse_JSON_-_Get_WO')?['@odata.count']"
},
"runAfter": {
"Parse_JSON_-_Get_WO": [
"SUCCEEDED"
]
}
},
"For_each_WO": {
"type": "foreach",
"foreach": "@body('Parse_JSON_-_Get_WO')?['value']",
"actions": {
"Call_an_Azure_function_-_Get_WO_Notes": {
"type": "Function",
"inputs": {
"method": "GET",
"queries": {
"workOrderId": "@items('For_each_WO')?['Id']"
},
"function": {
"connectionName": "azureFunctionOperation-6"
},
"retryPolicy": {
"type": "none"
}
}
},
"Parse_JSON_-_Get_WO_Notes": {
"type": "ParseJson",
"inputs": {
"content": "@body('Call_an_Azure_function_-_Get_WO_Notes')",
"schema": {
"type": "object",
"properties": {
"@@odata.context": {
"type": "string"
},
"@@odata.count": {
"type": "integer"
},
"value": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Id": {
"type": "integer"
},
"NoteData": {
"type": "string"
},
"DateCreated": {
"type": "string"
},
"NoteType": {
"type": "string"
},
"CreatedBy": {
"type": "string"
}
},
"required": [
"Id",
"NoteData",
"DateCreated",
"NoteType",
"CreatedBy"
]
}
}
}
}
},
"runAfter": {
"Call_an_Azure_function_-_Get_WO_Notes": [
"SUCCEEDED"
]
}
},
"Filter_Validation_Error_Notes": {
"type": "Query",
"description": "Check if work order has to be processed or not by reading its notes ",
"inputs": {
"from": "@body('Parse_JSON_-_Get_WO_Notes')?['value']",
"where": "@and(contains(item()?['NoteData'], 'Validation Error:'), equals(item()?['CreatedBy'], parameters('sc-username')))"
},
"runAfter": {
"Parse_JSON_-_Get_WO_Notes": [
"SUCCEEDED"
]
}
},
"Condition_-_WO_has_to_be_processed": {
"type": "If",
"expression": {
"and": [
{
"equals": [
"@length(body('Filter_Validation_Error_Notes'))",
0
]
}
]
},
"actions": {
"Condition_-_Check_CreatedDate_Age": {
"type": "If",
"expression": {
"and": [
{
"less": [
"@ticks(items('For_each_WO')?['CreatedDate'])",
"@ticks(addDays(utcNow(), -90))"
]
}
]
},
"actions": {
"Call_an_Azure_function_-_Post_Note_Date_Validation": {
"type": "Function",
"inputs": {
"method": "POST",
"body": {
"workOrderId": "@{items('For_each_WO')?['Id']}",
"noteData": "Validation Error: Work Order Creation Date older than 90 days"
},
"function": {
"connectionName": "azureFunctionOperation-5"
}
}
},
"Send_an_email_-_Date_Validation_Error": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"referenceName": "office365"
}
},
"method": "post",
"body": {
"To": "@parameters('emailTo')",
"Subject": "DATE VALIDATION ERROR ⚠️ - WO @{items('For_each_WO')?['Id']}",
"Body": "

Work Order ID: @{items('For_each_WO')?['Id']}


Created Date: @{items('For_each_WO')?['CreatedDate']}


Validation Error: Work Order Creation Date is older than 90 days.


Description:

@{items('For_each_WO')?['Description']}

",
"Importance": "High"
},
"path": "/v2/Mail"
},
"runAfter": {
"Call_an_Azure_function_-_Post_Note_Date_Validation": [
"SUCCEEDED"
]
}
}
},
"else": {
"actions": {
"Call_an_Azure_function_-_Parse_WO": {
"type": "Function",
"inputs": {
"method": "POST",
"body": {
"description": "@items('For_each_WO')?['Description']"
},
"function": {
"connectionName": "azureFunctionOperation-4"
},
"retryPolicy": {
"type": "fixed",
"count": 3,
"interval": "PT5S"
}
}
},
"Parse_JSON_-_Parse_WO": {
"type": "ParseJson",
"inputs": {
"content": "@body('Call_an_Azure_function_-_Parse_WO')",
"schema": {
"type": "object",
"properties": {
"items": {
"type": [
"array",
"null"
],
"items": {
"type": "object",
"properties": {
"part_number": {
"type": [
"string",
"null"
]
},
"quantity": {
"type": [
"integer",
"null"
]
}
}
}
},
"truck_number": {
"type": [
"string",
"null"
]
},
"status": {
"type": [
"string",
"null"
]
},
"invalid_parts": {
"type": [
"array",
"null"
]
}
}
}
},
"runAfter": {
"Call_an_Azure_function_-_Parse_WO": [
"SUCCEEDED"
]
}
},
"Condition_-_Check_Extraction_Status": {
"type": "If",
"expression": {
"and": [
{
"equals": [
"@body('Parse_JSON_-_Parse_WO')?['status']",
"OK"
]
}
]
},
"actions": {
"For_each_Item": {
"type": "foreach",
"foreach": "@body('Parse_JSON_-_Parse_WO')?['items']",
"actions": {
"Append_to_CSV": {
"type": "AppendToStringVariable",
"inputs": {
"name": "csvOutput",
"value": "\n@{items('For_each_WO')?['Id']},@{items('For_each_WO')?['CreatedDate']},@{coalesce(items('For_each_WO')?['Inventory_Site'], '')},@{coalesce(items('For_each_Item')?['part_number'], '')},@{coalesce(items('For_each_Item')?['quantity'], 0)},@{coalesce(body('Parse_JSON_-_Parse_WO')?['truck_number'], '')}"
}
}
},
"runtimeConfiguration": {
"concurrency": {
"repetitions": 1
}
}
}
},
"else": {
"actions": {
"Call_an_Azure_function_-_Post_Note": {
"type": "Function",
"inputs": {
"method": "POST",
"body": {
"workOrderId": "@{items('For_each_WO')?['Id']}",
"noteData": "Validation Error: @{coalesce(body('Parse_JSON_-_Parse_WO')?['status'], 'Unknown error')}"
},
"function": {
"connectionName": "azureFunctionOperation-5"
},
"retryPolicy": {
"type": "none"
}
}
},
"Send_an_email_(V2)-copy": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"referenceName": "office365"
}
},
"method": "post",
"body": {
"To": "@parameters('emailTo')",
"Subject": "PARSING EXCEPTION ⚠️",
"Body": "

Work Order ID: @{items('For_each_WO')?['Id']}



Original Description:


@{items('For_each_WO')?['Description']}


Parsing:


@{body('Parse_JSON_-_Parse_WO')}

",
"Importance": "Normal"
},
"path": "/v2/Mail"
},
"runAfter": {
"Call_an_Azure_function_-_Post_Note": [
"SUCCEEDED"
]
}
}
}
},
"runAfter": {
"Parse_JSON_-_Parse_WO": [
"SUCCEEDED"
]
}
}
}
}
}
},
"else": {
"actions": {}
},
"runAfter": {
"Filter_Validation_Error_Notes": [
"SUCCEEDED"
]
}
}
},
"runAfter": {
"Set_TotalCount": [
"SUCCEEDED"
]
},
"runtimeConfiguration": {
"concurrency": {
"repetitions": 1
}
}
},
"Check_If_More_Pages": {
"type": "SetVariable",
"inputs": {
"name": "continuePaging",
"value": "@and(greater(length(body('Parse_JSON_-_Get_WO')?['value']), 0), less(variables('skip'), variables('totalCount')))"
},
"runAfter": {
"Increment_skip": [
"SUCCEEDED"
]
}
},
"Increment_skip": {
"type": "IncrementVariable",
"inputs": {
"name": "skip",
"value": "@length(body('Parse_JSON_-_Get_WO')?['value'])"
},
"runAfter": {
"For_each_WO": [
"SUCCEEDED"
]
}
}
},
"runAfter": {
"Call_an_Azure_function_-_Check_SC_Status": [
"SUCCEEDED"
]
}
},
"Compose_-_Show_CSV": {
"type": "Compose",
"inputs": "@variables('csvOutput')",
"runAfter": {
"Until_All_Pages_Processed": [
"SUCCEEDED"
]
}
}
},
"outputs": {},
"triggers": {
"When_an_HTTP_request_is_received": {
"type": "Request",
"kind": "Http"
}
}
},
"kind": "Stateful"
}
```

### Screenshots or Videos

Image

### Environment

Azure Logic Apps (Standard) Extension version v5.185.10

### Additional context

It is impossible that you guys did not add a stop functionality to a current run, so hope you can help me with this. Thank you!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.