{"record":{"id":"f3d88c7c27619ce5","repo":"elsa-workflows/elsa-core","slug":"the-activitytype-binding-declares-the-input-name-more-than","errorCode":null,"errorMessage":"The '{activityType}' binding declares the input '{name}' more than once. Each <{NamespacePrefix}:{InputElementName}> must name a distinct input.","messagePattern":"The '(.+?)' binding declares the input '(.+?)' more than once\\. Each <(.+?):(.+?)> must name a distinct input\\.","errorType":"exception","errorClass":"BpmnBindingException","httpStatus":null,"severity":"error","filePath":"src/modules/Elsa.Bpmn.Interchange/Binding/BpmnActivityBindingFormat.cs","lineNumber":210,"sourceCode":"\n        var activityJson = new JsonObject\n        {\n            [\"type\"] = activityType\n        };\n\n        // Every name seen so far, in the order the document declares them, so a second <elsa:input> with the same\n        // name is refused rather than silently overwriting activityJson[name] and leaving the earlier one's\n        // configuration invisible.\n        var seenInputNames = new List<string>();\n        var seenInputNameSet = new HashSet<string>(StringComparer.Ordinal);\n\n        foreach (var input in element.Children.Where(child => child.Name == InputQName))\n        {\n            var name = AttributeOf(input, InputNameAttributeName)\n                       ?? throw new BpmnBindingException($\"An <{NamespacePrefix}:{InputElementName}> element of the '{activityType}' binding declares no '{InputNameAttributeName}'.\");\n\n            if (!seenInputNameSet.Add(name))\n                throw new BpmnBindingException($\"The '{activityType}' binding declares the input '{name}' more than once. Each <{NamespacePrefix}:{InputElementName}> must name a distinct input.\");\n\n            seenInputNames.Add(name);\n            activityJson[name] = Parse(input.Value, name, activityType);\n        }\n\n        IActivity activity;\n\n        try\n        {\n            activity = activitySerializer.Deserialize(activityJson.ToJsonString());\n        }\n        catch (Exception exception) when (exception is JsonException or NotSupportedException)\n        {\n            throw new BpmnBindingException($\"The binding to activity type '{activityType}' could not be deserialized: {exception.Message}\");\n        }\n\n        // Elsa's activity serializer answers an unregistered type with a NotFoundActivity rather than throwing, and\n        // that placeholder only fails once it executes — by which time the workflow has already started and the","sourceCodeStart":192,"sourceCodeEnd":228,"githubUrl":"https://github.com/elsa-workflows/elsa-core/blob/fe9217bdfa0e27f0e09e45006eb6898f616e513d/src/modules/Elsa.Bpmn.Interchange/Binding/BpmnActivityBindingFormat.cs#L192-L228","documentation":"During BPMN import, an activity binding's <elsa:input> child elements must each name a distinct activity input. This error is thrown when two <input> elements in the same binding use the same name, which would make the resulting activity JSON ambiguous.","triggerScenarios":"Calling Read (BpmnActivityBindingFormat.Read) on a binding extension element whose <input> children contain a duplicate name attribute value, detected when seenInputNameSet.Add(name) returns false.","commonSituations":"Hand-editing or copy-pasting binding XML in a .bpmn file; merging two authors' binding declarations; a modeling tool export that duplicates an input element.","solutions":["Open the .bpmn file, find the <elsa:binding> for the named activityType, and remove or rename the duplicated <elsa:input name=\"...\"> element so each input is declared once.","If both inputs are intentional, rename the XML input to match the actual distinct activity input names declared on the activity type.","Validate the document again after the edit; the error names the exact activity type and input."],"exampleFix":"// before\n<elsa:binding activityType=\"SendEmail\">\n  <elsa:input name=\"Subject\">\"Hi\"</elsa:input>\n  <elsa:input name=\"Subject\">\"Hello\"</elsa:input>\n</elsa:binding>\n// after\n<elsa:binding activityType=\"SendEmail\">\n  <elsa:input name=\"Subject\">\"Hi\"</elsa:input>\n</elsa:binding>","handlingStrategy":"validation","validationCode":"var inputs = bindingElement.Descendants().Where(e => e.Name.LocalName == \"input\");\nvar dupes = inputs.GroupBy(e => (string)e.Attribute(\"name\")).Where(g => g.Count() > 1 && g.Key != null).ToList();\nif (dupes.Any()) throw new InvalidOperationException(\"Duplicate input names: \" + string.Join(\", \", dupes.Select(d => d.Key)));","typeGuard":null,"tryCatchPattern":"try { await importer.ImportAsync(bpmn); }\ncatch (BpmnBindingException ex) when (ex.Message.Contains(\"more than once\"))\n{\n    logger.LogError(ex, \"Binding XML declares a duplicate input; fix the <elsa:input> elements.\");\n}","preventionTips":["Keep each binding's input list short and reviewed; never duplicate <elsa:input name> elements","Lint the .bpmn for duplicate names inside <extensionElements> before import","Avoid copy-pasting whole binding blocks without pruning unused inputs"],"tags":["bpmn","xml","duplicate-input","validation"],"backgroundTag":"schema-validation-failed","analyzedSha":"fe9217bdfa0e27f0e09e45006eb6898f616e513d","analyzedAt":"2026-09-13T20:32:34.702Z","contentChangedAt":"2026-09-13T20:32:34.702Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}