elsa-workflows/elsa-core · error · BpmnBindingException
The binding names activity type
Error message
The binding names activity type '{activityType}', which is not registered in this application. Install or enable the module providing it before importing this document. What it means
The binding names an activity type that is not registered in the running application. Elsa's activity serializer would normally return a NotFoundActivity placeholder that only fails at execution time; the binder instead refuses at import time with a message naming the type.
Solutions
- Install/enable the Elsa module that registers the named activity type (e.g. add the package and its feature in Program.cs/startup).
- Fix a typo: compare the activityType in the binding with the actual registered activity type name.
- If the activity is obsolete, replace the binding with an equivalent supported activity type.
Example fix
// before builder.Services.AddElsa(elsa => elsa.UseWorkflowManagement()); // console activities module missing // after builder.Services.AddElsa(elsa => elsa.UseWorkflowManagement().UseConsole());
Defensive patterns
Strategy: validation
Validate before calling
var registered = activityRegistry.List().Select(d => d.TypeName).ToHashSet(StringComparer.OrdinalIgnoreCase);
var referenced = doc.Descendants().Where(e => e.Name.LocalName == "binding").Select(e => (string?)e.Attribute("activityType"));
var missing = referenced.Where(t => t != null && !registered.Contains(t)).ToList();
if (missing.Any()) throw new InvalidOperationException("Unregistered activity types: " + string.Join(", ", missing)); Try / catch
try { await importer.ImportAsync(bpmn); }
catch (BpmnBindingException ex) when (ex.Message.Contains("not registered"))
{
logger.LogError(ex, "Install/enable the module providing the missing activity type before importing.");
} Prevention
- Ensure all modules whose activities appear in your BPMN documents are installed and enabled at startup
- Keep the authoring and importing environments' module sets in sync
- Check activity type name spelling against the registry
When it happens
Trigger: BpmnActivityBindingFormat.Read deserializes the binding JSON and the resulting IActivity is a NotFoundActivity, meaning no module providing that activity type is loaded when the .bpmn is imported.
Common situations: Importing a .bpmn exported from an environment that had extra Elsa modules installed; forgetting to add the NuGet package or UseXxx feature for the activity type; typo in the activityType name.
Related errors
- An < : > element declares no ' ', so there is nothing to…
- An < : > element of the ' ' binding declares no ' '.
- The ' ' binding declares the input ' ' more than once. Each…
- The binding to activity type
- The ' ' binding declares , which ' ' does not have.
AI-assisted analysis of elsa-workflows/elsa-core@fe9217bdfa (2026-09-13).
Data as JSON: /api/errors/fde2ff8f238b8eef.
Report an issue: GitHub.
Appendix: source
Thrown at src/modules/Elsa.Bpmn.Interchange/Binding/BpmnActivityBindingFormat.cs:232
}
IActivity activity;
try
{
activity = activitySerializer.Deserialize(activityJson.ToJsonString());
}
catch (Exception exception) when (exception is JsonException or NotSupportedException)
{
throw new BpmnBindingException($"The binding to activity type '{activityType}' could not be deserialized: {exception.Message}");
}
// Elsa's activity serializer answers an unregistered type with a NotFoundActivity rather than throwing, and
// that placeholder only fails once it executes — by which time the workflow has already started and the
// process is mid-flight. Refusing at bind time turns "this .bpmn needs a module you have not installed" into a
// sentence naming the type, at the point where someone can still do something about it.
if (activity is NotFoundActivity)
throw new BpmnBindingException($"The binding names activity type '{activityType}', which is not registered in this application. Install or enable the module providing it before importing this document.");
// Elsa's own JSON deserialization ignores a member the target type does not declare, so a mistyped or
// stale input name would otherwise import silently as an activity missing that configuration, with no
// diagnostic anywhere. IActivityDescriber.GetInputProperties is the same enumeration Write reads from and
// ActivityDescriptor.Inputs is built from, so a name is accepted here exactly when Write could have produced
// it.
if (seenInputNames.Count > 0)
{
var declaredInputNames = activityDescriber.GetInputProperties(activity.GetType())
.Select(property => JsonNamingPolicy.CamelCase.ConvertName(property.Name))
.ToHashSet(StringComparer.Ordinal);
var undeclaredInputNames = seenInputNames.Where(name => !declaredInputNames.Contains(name)).ToList();
if (undeclaredInputNames.Count > 0)
{
var noun = undeclaredInputNames.Count == 1 ? "an input" : "inputs";
var names = string.Join(", ", undeclaredInputNames.Select(name => $"'{name}'"));View on GitHub (pinned to fe9217bdfa)