{"record":{"id":"1510147590b99e41","repo":"elsa-workflows/elsa-core","slug":"activity-descriptor-not-found","errorCode":null,"errorMessage":"Activity descriptor not found","messagePattern":"Activity descriptor not found","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/modules/Elsa.Workflows.Core/Extensions/ActivityExecutionContextExtensions.InputEvaluation.cs","lineNumber":49,"sourceCode":"\n        /// <summary>\n        /// Evaluates the specified input property of the activity.\n        /// </summary>\n        public async Task<T?> EvaluateInputPropertyAsync<TActivity, T>(Expression<Func<TActivity, Input<T>>> propertyExpression)\n        {\n            var inputName = propertyExpression.GetProperty()!.Name;\n            var input = await EvaluateInputPropertyAsync(context, inputName);\n            return input.ConvertTo<T>();\n        }\n\n        /// <summary>\n        /// Evaluates a specific input property of the activity.\n        /// </summary>\n        public async Task<object?> EvaluateInputPropertyAsync(string inputName)\n        {\n            var activity = context.Activity;\n            var activityRegistryLookup = context.GetRequiredService<IActivityRegistryLookupService>();\n            var activityDescriptor = await activityRegistryLookup.FindAsync(activity.Type) ?? throw new Exception(\"Activity descriptor not found\");\n            var inputDescriptor = activityDescriptor.GetWrappedInputPropertyDescriptor(activity, inputName);\n\n            if (inputDescriptor == null)\n                throw new Exception($\"No input with name {inputName} could be found\");\n\n            return await EvaluateInputPropertyAsync(context, activityDescriptor, inputDescriptor);\n        }\n\n        /// <summary>\n        /// Evaluates the specified input and sets the result in the activity execution context's memory space.\n        /// </summary>\n        /// <param name=\"input\">The input to evaluate.</param>\n        /// <typeparam name=\"T\">The type of the input.</typeparam>\n        /// <returns>The evaluated value.</returns>\n        public async Task<T?> EvaluateAsync<T>(Input<T> input)\n        {\n            var evaluator = context.GetRequiredService<IExpressionEvaluator>();\n            var memoryBlockReference = input.MemoryBlockReference();","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/elsa-workflows/elsa-core/blob/fe9217bdfa0e27f0e09e45006eb6898f616e513d/src/modules/Elsa.Workflows.Core/Extensions/ActivityExecutionContextExtensions.InputEvaluation.cs#L31-L67","documentation":"A generic Exception thrown by EvaluateInputPropertyAsync when the activity registry lookup returns no descriptor for the activity's Type. It signals the activity type is unknown to the runtime, so its input descriptors cannot be resolved.","triggerScenarios":"Calling EvaluateInputPropertyAsync(activityName) on an ActivityExecutionContext whose Activity.Type is not registered in IActivityRegistryLookupService (FindAsync returns null).","commonSituations":"Evaluating input properties of custom/unregistered activities in unit tests without installing the corresponding feature; running a workflow whose activity types come from a missing module; type renamed without re-registering.","solutions":["Install/register the activity's feature so its descriptor exists in the registry before evaluating inputs.","Verify activity.Type matches a registered descriptor (spelling, namespace-derived type name).","In tests, configure the workflow test host to include the activity types under test.","Replace ad-hoc Exception handling: check the registry via FindAsync yourself to fail with a clearer message."],"exampleFix":"// before\nvar descriptor = await registry.FindAsync(activity.Type) ?? throw new Exception(\"Activity descriptor not found\");\n\n// after\nvar descriptor = await registry.FindAsync(activity.Type);\nif (descriptor is null)\n    throw new ActivityNotFoundException(activity.Type); // and ensure the activity is registered via its feature","handlingStrategy":"type-guard","validationCode":"var descriptor = await registryLookup.FindAsync(activity.Type);\nif (descriptor is null) { /* skip evaluation or fail with clear message */ }","typeGuard":"async ValueTask<bool> IsRegisteredAsync(IActivityRegistryLookupService lookup, IActivity activity) => await lookup.FindAsync(activity.Type) is not null;","tryCatchPattern":null,"preventionTips":["Register activity types in the test host before evaluating inputs.","Never evaluate inputs for activities outside installed features.","Check registry contents when debugging unknown activity types."],"tags":["workflow","activity-registry","input-evaluation","csharp"],"backgroundTag":"entity-not-found","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"}