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

Logic App Standard Invoke a workflow fails if using formulas, parameters, or Dynamic Content #1311

Open
fernandojribeiro opened this issue Mar 9, 2025 · 0 comments

Comments

@fernandojribeiro
Copy link

Describe the Bug

When configuring an "Invoke a workflow in this workflow app" action within a parent workflow, using a formula to dynamically generate the workflow name (e.g., concat('test-child', 'stateful-workflow')) leads to a validation error upon execution, even though no validation errors are displayed while saving the workflow.

Plan Type

Standard (VSCode)

Steps to Reproduce the Bug or Issue

Reproduction Steps:

  1. Create a new workflow project with a workflow named test-parent-stateful-workflow.
  2. Create a second workflow named test-child-stateful-workflow with a request and response.
  3. Open the parent workflow and configure it as follows:
    • Set the trigger to "When an HTTP request is received".
    • Add an "Invoke a workflow in this workflow app" action.
    • Under "Workflow name", select "Enter custom value" and use the formula:
      concat('test-child', 'stateful-workflow')
    • Add a response action.
  4. Save the workflow and note that no validation errors are displayed.
  5. Debug and run the workflow.

Expected Behavior:

  • The workflow should execute successfully, dynamically resolving the workflow name.

Actual Behavior:

  • The workflow saves without validation errors.
  • Upon execution, the workflow fails with the following error in the terminal:
    Workflow 'test-parent-stateful-workflow' validation and creation failed. Error: 
    'The provided workflow name '@concat('test-child', 'stateful-workflow')' has these invalid characters '@'', '''. 
    The name can only be a letter, digit, '-', '.', '(', ')' or '_'.'
    

Workflow JSON

{
    "definition": {
        "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
        "actions": {
            "Response": {
                "type": "Response",
                "kind": "Http",
                "inputs": {
                    "statusCode": 200
                },
                "runAfter": {
                    "Invoke_a_workflow_in_this_workflow_app": [
                        "SUCCEEDED"
                    ]
                }
            },
            "Invoke_a_workflow_in_this_workflow_app": {
                "type": "Workflow",
                "inputs": {
                    "host": {
                        "workflow": {
                            "id": "@concat('test-child', 'stateful-workflow')"
                        }
                    }
                },
                "runAfter": {}
            }
        },
        "contentVersion": "1.0.0.0",
        "outputs": {},
        "triggers": {
            "When_a_HTTP_request_is_received": {
                "type": "Request",
                "kind": "Http"
            }
        }
    },
    "kind": "Stateful"
}

Screenshots or Videos

Image
Image
Image

Additional context

The inability to use dynamic workflow names prevents efficient routing of business workflows based on input payload values.

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