Hi Rafal,
Thanks for your reply. Sorry my original post wasn't detailed enough.
I have constructed an internal saga state class which looks like this:
public class FosFormExpressSagaState
{
public FosFormExpressSagaState()
{
DocumentGenerationOrder = new List<KeyValuePair<string, int>>();
DebtReferenceAndPaths = new List<KeyValuePair<string, string>>();
Collections = new List<LetterReferenceSortedItemCollection>();
Collection = new LetterReferenceSortedItemCollection();
}
public string Id { get; set; }
public string CaseId { get; set; }
public string CaseRef { get; set; }
public List<Guid> DebtIds { get; set; }
public List<string> DebtRefs { get; set; }
public string CoverLetterReference { get; set; }
public string LetterReference { get; set; }
public string DocumentType { get; set; }
public bool DoNotPrint { get; set; }
public string CreatedBy { get; set; }
public DateTime CreatedDate { get; set; }
public bool ReplyToSaga { get; set; }
public string GeneratedCoverLetterPath { get; set; }
public string FosFormExpressCommandsCount { get; set; }
public bool IsEsignature { get; set; }
public DeliveryChannelType DeliveryType { get; set; }
public string EmailAddress { get; set; }
public string MobileNumber { get; set; }
public List<LetterReferenceSortedItemCollection> Collections { get; set; }
public LetterReferenceSortedItemCollection Collection { get; set; }
public List<KeyValuePair<string, int>> DocumentGenerationOrder { get; set; }
public List<KeyValuePair<string, string>> DebtReferenceAndPaths { get; set; }
}
When the message is handled for the Saga, the initial set up and serialization of the Saga State is correct and viewable in the database JSON:
{
"Id": "7a5335e0-c540-4d2b-97e4-77c02e53cf23",
"CaseId": "03cb3ea1-3254-49a1-8f5f-e250d12f4f13",
"CaseRef": "23589",
"DebtIds": ["00000000-0000-0000-0000-000000000000"],
"CoverLetterReference": "FosClient",
"LetterReference": "FosClient",
"CreatedBy": "michaelsinnott",
"CreatedDate": "2015-09-23T12:57:34.1770028+01:00",
"FosFormExpressCommandsCount": "1",
"EmailAddress": "email@email.com",
"MobileNumber": "012345678910",
"Collections": [],
"Collection": {
},
"DocumentGenerationOrder": [{
"Key": "42092",
"Value": 1
}],
"DebtReferenceAndPaths": []
}
In the Saga, I then send commands out to other handlers, which reply back to the Saga. For the Saga we have InitiatedBy for 3 commands and I am aware that anything initiating the Saga could reset the Saga State however, we use the CorrelationId to keep it in sync and we also have a few other Sagas that work fine this way.

When I handle a reply to the Saga, the Saga State looks like this:
{
"Id": "7a5335e0-c540-4d2b-97e4-77c02e53cf23",
"CaseRef": "23589",
"LetterReference": "FosClient",
"CreatedBy": "michaelsinnott",
"GeneratedCoverLetterPath": "C:\\printing\\23589_FosClient_20150924080721352.pdf",
"Collections": [],
"Collection": {
},
"DocumentGenerationOrder": [],
"DebtReferenceAndPaths": []
}
As you can see I lose some of the Data but not all of it, CaseRef for example. It's causing issue when I go to finalise the Saga as I have to check that the "FosFormExpressCommandsCount" matches another count before continuing and as you can see from above, it is not in the serialization of the Saga State.
I haven't gotten any errors.
Cheers,
Mike