An Error Occur on Wait and Resume for Form Task Activity


I’m having some issue with the Wait for Form Task and Resume activity, every time I ran it, it gave me the following error:

RemoteException wrapping System.Runtime.Serialization.InvalidDataContractException: Type ‘System.Collections.IEnumerable’ cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. If the type is a collection, consider marking it with the CollectionDataContractAttribute. See the Microsoft .NET Framework documentation for other supported types. at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result) at System.Activities.WorkflowApplication.IdleEventHandler.OnStage2Complete(IAsyncResult lastResult, WorkflowApplication instance, Boolean isStillSync) at System.Activities.WorkflowApplication.EventFrame(IAsyncResult result)

I went to check out some of the old posts and tried their methods but still does not work.

Hi @tzekailim ,

Can you make sure the Persistence Activities Package are installed ?

And also make sure the Supports Persistence is enabled in the Project Settings.

Also have a look on the Below Documentation where the Best practices for an Orchestration Processes are mentioned.

I’ve done all of that already, but it still does not work😅. @supermanPunch


Ok. Let’s move into the error that you are facing.

Do you have an IEnumerable or a Collection Type of variable under the Scope that is same Scope as that of Wait and Resume Form Task Activity ?

Hi @tzekailim,

Do you find any solution to your problem? Because we are facing to the same issue so we are interresting to know with my team.


Nope, I put it on hold till someone has solution to it.

In case anyone finds this hint useful, I had this error coming up in my first attempt at a parallel for each process as well.

I’ll qualify this with… I’m new to UiPath and by no means a sw developer so this might have been a silly rookie mistake that others wouldn’t make but since my reading of all the posts about this didn’t provide an obvious answer and in the spirit of being helpful I thought I’d share my silly mistake :slight_smile:

The issue I was having was self induced by including the Action Center steps within my validation loop to check confidence levels.

Solution was, within my loop looking for “confidence is blank or less than our threshold”, when the logic fails, set a “needs help” variable to true and break the loop. After the loop, when “needs help” variable is true, create the action center record and wait for a response.