I have a custom workflow activity that I created that has an object as a parameter.
The object has a property that is a list of another object.
In the designer, I am able to set all the required fields of the sub-objects and they save and retrieve properly.
The problem happens when the workflow runs.
The base object appears to exist, but the list of child objects is null.
When I reopen the workflow in designer the data is in the designer.
I have a second property that is just a list of objects and that works fine.
In the profile activity file, they are defined as
public List<MyDocument> Documents { get; set; } public MyRecipients Recipients { get; set; }
in the proxy, they are defined as
/// <summary>The backing field for the Documents property.</summary> private List<MyDocument> documents = null; /// <summary>The backing field for the Recipients property.</summary> private MyRecipients recipients = null;
The MyDocuments class is just a basic object with basic properties.
public class MyDocument { public int ID { get; set; } public string Name { get; set; } public string MimeType { get; set; } public string DocuentId { get; set; } public Byte[] Bytes { get; set; } }
The MyRecipients class has multiple lists of an object MyRecipient separated by type of recipient.
public class MyRecipients { public List<MyRecipient> PrimaryRecipients { get; set; } public List<MyRecipient> SecondaryRecipients { get; set; } } public class MyRecipient { public int ID { get; set; } public string Name { get; set; } public string email { get; set; } }