A recent error has always occurred in developing a SharePoint workflow: After the workflow starts, it displays "completed" or the error "internal errors" after the start.
Look at the log at that time and find the following paragraph:
02/06/2007 10:31:03.92 w3wp.exe (0x0758)
0X0F3C Windows SharePoint Services Workflow Infrastructure 72eo Unexpected
DehydrateInstance:System.Runtime.Serialization.SerializationException: The end of the stream is encountered before parsing is complete.
In System.runtime.serialization.formatters.binary.__binaryparser.run ()
In System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize (HeaderHandler handler, __binaryparser Serparser, Boolean Fcheck, Boolean iscrossappdomain, IMethodCallMessage methodcallmessage)
In System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (Stream serializationstream, HeaderHandler handler, Boolean Fcheck, Boolean iscrossappdomain, IMethodCallMessage methodcallmessage)
In System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (Stream serializationstream)
In System.Workflow.ComponentModel.Activity.Load (Stream stream, activity outeractivity, IFormatter Formatter) ...
02/06/2007 10:31:03.92* w3wp.exe (0x0758)
0X0F3C Windows SharePoint Services Workflow infrastructure 72eo Unexpected ...
In System.Workflow.ComponentModel.Activity.Load (Stream stream, activity outeractivity)
In System.Workflow.Runtime.Hosting.WorkflowPersistenceService.RestoreFromDefaultSerializedForm (byte[] Activitybytes, Activity outeractivity)
In Microsoft.SharePoint.Workflow.SPWinOePersistenceService.LoadWorkflowInstanceState (Guid Instanceid)
In System.Workflow.Runtime.WorkflowRuntime.InitializeExecutor (Guid Instanceid, Creationcontext context, Workflowexecutor executor, WorkflowInstance workflowinstance)
In System.Workflow.Runtime.WorkflowRuntime.Load (Guid key, Creationcontext context, WorkflowInstance workflowinstance) In System.Workflow.Runtime.WorkflowRuntime.GetWorkflow (Guid Instanceid)
In Microsoft.SharePoint.Workflow.SPWinOeHostServices.DehydrateInstance (spworkflowinstance wo ...)
02/06/2007 10:31:03.92* w3wp.exe (0x0758)
0X0F3C Windows SharePoint Services Workflow infrastructure 72eo unexpected ... rkflow)
02/06/2007 10:31:03.93 w3wp.exe (0x0758)
0X0F3C Windows SharePoint Services Workflow infrastructure 88XR unexpected WINWF Error Internal Ating Workflow id# 472dae03-5465-4f04-876f-d4cc4caa902a
Look inside the longest paragraph in the Chinese description: "Before the analysis is complete, the end of the stream is encountered", and in the case of the SharePoint English version, this error message should be "encountered before parsing was completed".
That is to say, workflow runtime does not complete the whole process of analysis.
Read this sentence before Chinese English: "DehydrateInstance:System.Runtime.Serialization.SerializationException".
The original workflow occurred when the instance was deactivated with a serialization exception.
Looking back at the persistence of the workflow, Workflow runtime serializes the idle workflow data into XML, then clears the workflow instance from memory, and then deserializes it into memory when it is needed.
Would it be because I added a custom class to the workflow project that didn't support serialization, which caused the workflow serialization to fail?