{"record":{"id":"f420b56a786d3f78","repo":"elsa-workflows/elsa-core","slug":"the-bpmn-work-binding-kind-binding-gettype-name-declared-by","errorCode":null,"errorMessage":"The BPMN work binding kind '{binding.GetType().Name}' declared by element '{binding.ElementId}' is not supported by this binder.","messagePattern":"The BPMN work binding kind '(.+?)' declared by element '(.+?)' is not supported by this binder\\.","errorType":"exception","errorClass":"BpmnBindingException","httpStatus":null,"severity":"error","filePath":"src/modules/Elsa.Bpmn.Interchange/Binding/BpmnWorkBinder.cs","lineNumber":135,"sourceCode":"        binding switch\n        {\n            BpmnWorkBinding.TimerWait timer => new Delay(IsoDurationOf(timer)),\n            BpmnWorkBinding.MessageWait message => new Event(message.MessageName),\n            BpmnWorkBinding.SignalWait signal => new Event(signal.SignalName),\n            BpmnWorkBinding.MessagePublish publish => new PublishEvent\n            {\n                EventName = new(publish.MessageName)\n            },\n            BpmnWorkBinding.CallProcess call => new DispatchWorkflow\n            {\n                WorkflowDefinitionId = new(CalledElementOf(call)),\n                WaitForCompletion = new(call.WaitForCompletion)\n            },\n            BpmnWorkBinding.NestedProcess nested => BindScope(nested.Definition, bindings),\n            BpmnWorkBinding.UnboundTask unbound => ReadDeclaredActivity(definition, unbound, consumed),\n            // The binding hierarchy is closed, so this is reachable only from a library version that added a kind this\n            // binder has never heard of. Skipping it would produce a scope whose interpreter starts work nothing maps.\n            _ => throw new BpmnBindingException($\"The BPMN work binding kind '{binding.GetType().Name}' declared by element '{binding.ElementId}' is not supported by this binder.\")\n        };\n\n    private IActivity ReadDeclaredActivity(BpmnProcessDefinition definition, BpmnWorkBinding.UnboundTask unbound, ISet<string> consumed)\n    {\n        var element = definition.Elements.FirstOrDefault(element => string.Equals(element.ElementId, unbound.ElementId, StringComparison.Ordinal));\n\n        if (BpmnActivityBindingFormat.Find(element?.Extensions) is not { } declaration)\n        {\n            throw new BpmnBindingException(\n                $\"BPMN element '{unbound.ElementId}' of process '{unbound.ProcessId}' is a '{unbound.TaskType}': the document says what it is for, not how to perform it, and nothing binds it to an Elsa activity. \"\n                + $\"Declare one with an <{BpmnActivityBindingFormat.NamespacePrefix}:{BpmnActivityBindingFormat.BindingElementName}> element inside the element's <extensionElements>.\");\n        }\n\n        consumed.Add(unbound.ElementId);\n\n        return format.Read(declaration);\n    }\n","sourceCodeStart":117,"sourceCodeEnd":153,"githubUrl":"https://github.com/elsa-workflows/elsa-core/blob/fe9217bdfa0e27f0e09e45006eb6898f616e513d/src/modules/Elsa.Bpmn.Interchange/Binding/BpmnWorkBinder.cs#L117-L153","documentation":"The BPMN work binding hierarchy contains a kind this binder does not know how to convert into an Elsa activity. Since the binding hierarchy is closed within a library version, this only occurs when the interchange library version that produced the bindings is newer than the binder handling them.","triggerScenarios":"BpmnWorkBinder.CreateActivity's switch over BpmnWorkBinding falls through to the default arm because the binding object's runtime type matches no known kind (e.g. a new BpmnWorkBinding subtype added in a newer package version).","commonSituations":"Mixed package versions of the Elsa.Bpmn.Interchange library (one package updated, another not) after an upgrade; a custom library build adding a binding kind.","solutions":["Align all Elsa.Bpmn.Interchange-related packages to the same version (update the binder's package to the version that produced the document).","Re-export the .bpmn with the older/installed library version so bindings use supported kinds.","If neither works, report the missing binding kind so the binder can gain a case for it."],"exampleFix":"// before\ndotnet add package Elsa.Bpmn.Interchange --version 3.5.0  // binder, while bindings were produced by 3.6.0\n// after\ndotnet add package Elsa.Bpmn.Interchange --version 3.6.0  // versions aligned","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { await importer.ImportAsync(bpmn); }\ncatch (BpmnBindingException ex) when (ex.Message.Contains(\"is not supported by this binder\"))\n{\n    logger.LogError(ex, \"Binding kind not supported; align Elsa.Bpmn.Interchange package versions.\");\n}","preventionTips":["Pin all Elsa.Bpmn.Interchange-related packages to the same version","Regenerate/re-export BPMN documents after library upgrades","Keep dependency versions aligned in Directory.Packages.props"],"tags":["bpmn","version-mismatch","unsupported-binding-kind"],"backgroundTag":"unsupported-operation","analyzedSha":"fe9217bdfa0e27f0e09e45006eb6898f616e513d","analyzedAt":"2026-09-13T20:32:34.702Z","contentChangedAt":"2026-09-13T20:32:34.702Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}