internal string SerializePagetoXml()
        {
            DigitalSignaturesWFData data = new DigitalSignaturesWFData()
            {
                DigitalSignatories = string.Join(";", signatories.Select(c => c.signatoryLoginName).ToArray())
            };

            using (MemoryStream stream = new MemoryStream())
            {
                XmlSerializer serializer = new XmlSerializer(typeof(DigitalSignaturesWFData));
                serializer.Serialize(stream, data);
                stream.Position = 0;
                byte[] bytes = new byte[stream.Length];
                stream.Read(bytes, 0, bytes.Length);

                return Encoding.UTF8.GetString(bytes);
            }
        }
 private void onWorkflowActivated1_Invoked(object sender, ExternalDataEventArgs e)
 {
     using (StringReader stringReader = new StringReader(workflowProperties.InitiationData))
     {
         using (XmlReader reader = XmlReader.Create(stringReader))
         {
             XmlSerializer serializer = new XmlSerializer(typeof(DigitalSignaturesWFData));
             WorkflowData = (DigitalSignaturesWFData)serializer.Deserialize(reader);
         }
     }
     SetAgendaTitle();
 }