{"record":{"id":"f21dbb2a7f88f041","repo":"OrchardCMS/OrchardCore","slug":"unknown-xmlrpc-value-type-element-name-localname","errorCode":null,"errorMessage":"Unknown XmlRpc value type {element.Name.LocalName}","messagePattern":"Unknown XmlRpc value type (.+?)","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/OrchardCore.Modules/OrchardCore.XmlRpc/Services/XmlRpcReader.cs","lineNumber":81,"sourceCode":"    /// <summary>\n    /// Maps an XML element to rpc data.\n    /// </summary>\n    /// <param name=\"source\">The XML element to be mapped.</param>\n    /// <returns>The rpc data.</returns>\n    public XRpcData MapToData(XElement source)\n    {\n        var value = source.Element(\"value\");\n        if (value == null)\n        {\n            return new XRpcData();\n        }\n\n        var element = value.Elements().SingleOrDefault();\n\n        Func<XElement, XRpcData> dispatch;\n        if (_dispatch.TryGetValue(element.Name.LocalName, out dispatch) == false)\n        {\n            throw new InvalidOperationException(\"Unknown XmlRpc value type \" + element.Name.LocalName);\n        }\n\n        return dispatch(element);\n    }\n\n    /// <summary>\n    /// Maps an XML element to a rpc struct.\n    /// </summary>\n    /// <param name=\"source\">The XML element to be mapped.</param>\n    /// <returns>The rpc struct.</returns>\n    public XRpcStruct MapToStruct(XElement source)\n    {\n        var result = new XRpcStruct();\n        foreach (var member in source.Elements(\"member\"))\n        {\n            result.Members.Add(\n                (string)member.Element(\"name\"),\n                MapValue(member.Element(\"value\")));","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/OrchardCMS/OrchardCore/blob/4306c0717fe573f6fca1b4955909ddab6a192807/src/OrchardCore.Modules/OrchardCore.XmlRpc/Services/XmlRpcReader.cs#L63-L99","documentation":"ResumeWorkflowAsync continues an existing, halted workflow instance by locating the activity identified by activityId among the workflow's blocking activities. When the given activityId is not in the instance's BlockingActivityIds it throws InvalidOperationException, since only a blocked (awaiting) activity can be resumed — resuming elsewhere would corrupt the workflow state machine.","triggerScenarios":"Calling ResumeWorkflowAsync with an activityId that is not currently blocking: the activity already completed, the workflow halted at a different activity, a stale/wrong activityId was passed, or the workflow instance data was modified out-of-band so BlockingActivityIds no longer contains that id.","commonSituations":"Signal/callback handlers resuming with a hardcoded or cached activityId after the workflow definition changed; double-resume where the first signal already advanced past the activity; copied correlation logic resuming the wrong workflow instance; imported workflow instances with rebuilt blocking lists.","solutions":["Verify the activityId is in workflow.BlockingActivityIds (or query the blocking activities) before calling ResumeWorkflowAsync and resume only the actual halted activity.","Use the workflow's current blocking activity id(s) — e.g. fetch the instance by correlation id and read its blocking activities — rather than a hardcoded id.","If the activity already ran, do not resume; either treat the workflow as complete or restart it via RestartWorkflowAsync.","Fix out-of-band edits to workflow instances that cleared or altered BlockingActivityIds by restoring the instance from a backup or re-running the flow."],"exampleFix":"// before\nawait workflowManager.ResumeWorkflowAsync(workflow, \"activity-1\", \"Signal\", input); // may throw\n// after\nif (workflow.BlockingActivityIds.Contains(\"activity-1\"))\n{\n    await workflowManager.ResumeWorkflowAsync(workflow, \"activity-1\", \"Signal\", input);\n}","handlingStrategy":"validation","validationCode":"// before resume\nif (workflow?.BlockingActivityIds?.Contains(activityId) != true)\n    throw new InvalidOperationException($\"Activity '{activityId}' is not a blocking activity of workflow '{workflow?.Id}'.\");","typeGuard":"static bool IsResumable(Workflow workflow, string activityId) =>\n    workflow?.BlockingActivityIds?.Contains(activityId) == true;","tryCatchPattern":"try { await workflowManager.ResumeWorkflowAsync(workflow, activityId, eventName, input); }\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"is not a blocking activity\"))\n{ logger.LogWarning(ex, \"Attempted resume on non-blocking activity {ActivityId}\", activityId); /* re-read instance and resume correct activity */ }","preventionTips":["Always resolve the current blocking activity id from the workflow instance, never hardcode it","Guard against double-resume: check BlockingActivityIds before each resume call","After editing workflow definitions, re-fetch instances before resuming","Log and inspect BlockingActivityIds when signals seem to have no effect"],"tags":["workflows","invalid-state","activity-resume","orchardcore"],"backgroundTag":"invalid-state-transition","analyzedSha":"4306c0717fe573f6fca1b4955909ddab6a192807","analyzedAt":"2026-09-13T17:41:05.024Z","contentChangedAt":"2026-09-13T17:41:05.024Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}