Action Centre-Error

Hi,
I am using action centre in reframe work and i am using the “Create Form Task” and “Wait for Form Task and Resume” in the process state(not in process xaml). The “Create Form Task” activity works fine and it is uploading the data correctly into action center but after that instead of pausing the code at “Wait for Form Task and Resume” ,it is throwing an error at that particular activity like
“Type ‘System.Data.DataRow’ cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. Alternatively, you can ensure that the type is public and has a parameterless constructor - all public members of the type will then be serialized, and no attributes will be required.”

I am passing a datatable variable in the “Create Form Task” activity. Can anyone help me with the solution or the reason why this is happening. I used the same code in main in init state and it worked fine

Hi @Amruta_George3

As describe here in Best Practices section, variables in the scope of a long-running activities need to be serializable.

You can create a sequence and move the long-running workflow activities into to isolate variables that can’t be serializable.