Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Logic Apps workflow stuck at Create Job step #1181

Open
eddison-shyi opened this issue Sep 25, 2024 · 0 comments
Open

The Logic Apps workflow stuck at Create Job step #1181

eddison-shyi opened this issue Sep 25, 2024 · 0 comments

Comments

@eddison-shyi
Copy link

eddison-shyi commented Sep 25, 2024

Describe the Bug with repro steps

  1. Call logic apps via Thunder Client (you can use postman, that's ok too)
  2. Wait for processing
  3. Check runbook run history in Automation Account -> we've found runbook completed
  4. Back to Logic Apps, we found it stuck at Create Job step (for 5 mins at least after runbook has finished it's job)

What type of Logic App Is this happening in?

Consumption (Portal)

Which operating system are you using?

Windows

Are you using new designer or old designer

New Designer

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

No

Workflow JSON

{
    "definition": {
        "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
        "actions": {
            "Append_Service_ID": {
                "inputs": {
                    "variables": [
                        {
                            "name": "Result",
                            "type": "object",
                            "value": "@union(triggerBody(),body('Parse_JSON'))"
                        }
                    ]
                },
                "runAfter": {
                    "Parse_JSON": [
                        "Succeeded"
                    ]
                },
                "type": "InitializeVariable"
            },
            "Create_job": {
                "inputs": {
                    "body": {
                        "properties": {
                            "parameters": {
                                "DisplayName": "@triggerBody()?['displayName']",
                                "GroupEngName": "@triggerBody()?['projectCode']",
                                "groupOwnerUPN": "[email protected]",
                                "groupType": "CrossOrg",
                                "tenantName": "gurulabtw"
                            }
                        }
                    },
                    "host": {
                        "connection": {
                            "name": "@parameters('$connections')['azureautomation-1']['connectionId']"
                        }
                    },
                    "method": "put",
                    "path": "/subscriptions/@{encodeURIComponent('c19817e9-a05b-40ab-a2a7-ab9b50c2f5ec')}/resourceGroups/@{encodeURIComponent('GuruAssistant')}/providers/Microsoft.Automation/automationAccounts/@{encodeURIComponent('gurulab-runbooks')}/jobs",
                    "queries": {
                        "runbookName": "New-UnifiedGroup",
                        "wait": true,
                        "x-ms-api-version": "2015-10-31"
                    }
                },
                "runAfter": {
                    "Response": [
                        "Succeeded"
                    ]
                },
                "type": "ApiConnection"
            },
            "Get_job_output": {
                "inputs": {
                    "host": {
                        "connection": {
                            "name": "@parameters('$connections')['azureautomation-1']['connectionId']"
                        }
                    },
                    "method": "get",
                    "path": "/subscriptions/@{encodeURIComponent('c19817e9-a05b-40ab-a2a7-ab9b50c2f5ec')}/resourceGroups/@{encodeURIComponent('GuruAssistant')}/providers/Microsoft.Automation/automationAccounts/@{encodeURIComponent('gurulab-runbooks')}/jobs/@{encodeURIComponent(body('Create_job')?['properties']?['jobId'])}/output",
                    "queries": {
                        "x-ms-api-version": "2015-10-31"
                    }
                },
                "runAfter": {
                    "Create_job": [
                        "Succeeded"
                    ]
                },
                "type": "ApiConnection"
            },
            "HTTP": {
                "inputs": {
                    "body": "@variables('Result')",
                    "headers": {
                        "Content-Type": "application/json"
                    },
                    "method": "POST",
                    "uri": "https://somewherenotexist.com.tw"
                },
                "runAfter": {
                    "Append_Service_ID": [
                        "Succeeded"
                    ]
                },
                "runtimeConfiguration": {
                    "contentTransfer": {
                        "transferMode": "Chunked"
                    }
                },
                "type": "Http"
            },
            "Parse_JSON": {
                "inputs": {
                    "content": "@json(body('Get_job_output'))",
                    "schema": {
                        "properties": {
                            "displayName": {
                                "type": "string"
                            },
                            "groupEngName": {
                                "type": "string"
                            },
                            "msg": {
                                "type": "string"
                            },
                            "objectId": {
                                "type": "string"
                            },
                            "siteUrl": {
                                "type": "string"
                            },
                            "status": {
                                "type": "string"
                            },
                            "statusCode": {
                                "type": "integer"
                            }
                        },
                        "required": [
                            "displayName",
                            "groupEngName",
                            "statusCode",
                            "status",
                            "msg"
                        ],
                        "type": "object"
                    }
                },
                "runAfter": {
                    "Get_job_output": [
                        "Succeeded"
                    ]
                },
                "type": "ParseJson"
            },
            "Response": {
                "inputs": {
                    "body": {
                        "status": "Accepted"
                    },
                    "headers": {
                        "Content-Type": "application/json"
                    },
                    "statusCode": 202
                },
                "kind": "Http",
                "runAfter": {},
                "type": "Response"
            }
        },
        "contentVersion": "1.0.0.0",
        "outputs": {},
        "parameters": {
            "$connections": {
                "defaultValue": {},
                "type": "Object"
            }
        },
        "triggers": {
            "project-group": {
                "inputs": {
                    "method": "POST",
                    "schema": {
                        "properties": {
                            "displayName": {
                                "type": "string"
                            },
                            "projectCode": {
                                "type": "string"
                            },
                            "serviceId": {
                                "type": "string"
                            },
                            "sign": {
                                "type": "string"
                            },
                            "timestamp": {
                                "type": "integer"
                            },
                            "workGroupId": {
                                "type": "string"
                            }
                        },
                        "type": "object"
                    }
                },
                "kind": "Http",
                "operationOptions": "EnableSchemaValidation, SuppressWorkflowHeadersOnResponse",
                "type": "Request"
            }
        }
    },
    "parameters": {
        "$connections": {
            "value": {
                "azureautomation-1": {
                    "connectionId": "/subscriptions/c19817e9-a05b-40ab-a2a7-ab9b50c2f5ec/resourceGroups/GuruAssistant/providers/Microsoft.Web/connections/azureautomation-1",
                    "connectionName": "azureautomation-1",
                    "connectionProperties": {
                        "authentication": {
                            "type": "ManagedServiceIdentity"
                        }
                    },
                    "id": "/subscriptions/c19817e9-a05b-40ab-a2a7-ab9b50c2f5ec/providers/Microsoft.Web/locations/japaneast/managedApis/azureautomation"
                }
            }
        }
    }
}

Screenshots or Videos

No response

Browser

Edge

Additional context

No response

@hartra344 hartra344 transferred this issue from Azure/LogicAppsUX Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant