{"record":{"id":"d644810c23ddb4a5","repo":"elsa-workflows/elsa-core","slug":"an-namespaceprefix-inputelementname-element-of-the","errorCode":null,"errorMessage":"An <{NamespacePrefix}:{InputElementName}> element of the '{activityType}' binding declares no '{InputNameAttributeName}'.","messagePattern":"An <(.+?):(.+?)> element of the '(.+?)' binding declares no '(.+?)'\\.","errorType":"exception","errorClass":"BpmnBindingException","httpStatus":null,"severity":"error","filePath":"src/modules/Elsa.Bpmn.Interchange/Binding/BpmnActivityBindingFormat.cs","lineNumber":207,"sourceCode":"    {\n        var activityType = AttributeOf(element, ActivityTypeAttributeName)\n                           ?? throw new BpmnBindingException($\"An <{NamespacePrefix}:{BindingElementName}> element declares no '{ActivityTypeAttributeName}', so there is nothing to build.\");\n\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        }","sourceCodeStart":189,"sourceCodeEnd":225,"githubUrl":"https://github.com/elsa-workflows/elsa-core/blob/fe9217bdfa0e27f0e09e45006eb6898f616e513d/src/modules/Elsa.Bpmn.Interchange/Binding/BpmnActivityBindingFormat.cs#L189-L225","documentation":"Within BpmnActivityBindingFormat.Read, each child <elsa:input> element of an activity binding must carry the input-name attribute identifying which activity input it sets. When an input element omits it, the parser cannot map the value to an activity property and throws BpmnBindingException. Duplicate input names are rejected separately.","triggerScenarios":"Parsing a BPMN document where an <elsa:input> (InputElementName) child of the binding has no input-name attribute — AttributeOf(input, InputNameAttributeName) returns null inside the Children loop.","commonSituations":"Hand-edited BPMN where the name attribute was deleted or misspelled; tool exports emitting value-only input elements; XML namespace mishandling so the attribute name doesn't match InputNameAttributeName.","solutions":["Add the input-name attribute (named by InputNameAttributeName) to each input element, matching an input the declared activity type actually defines.","Validate inputs against the activity type's declared input descriptors before import.","Fix the element's namespace/prefix so the attribute resolves correctly.","Remove input elements that carry no name rather than leaving empty shells."],"exampleFix":"// before\n<elsa:activity-binding activity-type=\"Elsa.Http:WriteHttpResponse\">\n  <elsa:input value=\"Hello\" />\n</elsa:activity-binding>\n\n// after\n<elsa:activity-binding activity-type=\"Elsa.Http:WriteHttpResponse\">\n  <elsa:input input-name=\"Content\" value=\"Hello\" />\n</elsa:activity-binding>","handlingStrategy":"validation","validationCode":"foreach (var input in bindingElement.Elements().Where(e => e.Name.LocalName == \"input\"))\n    if (input.Attributes().All(a => a.Name.LocalName != \"input-name\"))\n        throw new InvalidOperationException($\"<input> at line {((IXmlLineInfo)input).LineNumber} is missing 'input-name'.\");","typeGuard":null,"tryCatchPattern":"try\n{\n    var activity = bindingFormat.Read(element);\n}\ncatch (BpmnBindingException ex)\n{\n    logger.LogError(ex, \"Invalid BPMN input element in binding for activity type {ActivityType}\", declaredType);\n}","preventionTips":["Check every <elsa:input> declares input-name and that it matches an input the activity type declares.","Run BPMN interchange import as part of CI so malformed diagrams fail early.","Use XSD/schema validation on exported BPMN before committing or importing it."],"tags":["bpmn","xml","validation","inputs"],"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"}