Beispiel #1
0
        private void AddDocsProperty(Application app, Hyland.Unity.WorkflowEventArgs args, TrueSignNextLibrary.Envelope envelope)
        {
            List <long> docHandles = new List <long>();

            envelope.Content.Documents.ForEach(x => docHandles.Add(long.Parse(x.Client_Data)));

            args.SessionPropertyBag.Set("TrueSignEnvelopeDocs", docHandles.ToArray());
            args.SessionPropertyBag.Set("TrueSignEnvelopeId", envelope.Id.ToString());
            args.SessionPropertyBag.Set("TrueSignEnvelopeDocHandle", args.Document.ID.ToString());
        }
Beispiel #2
0
        private void AddRejectionProperty(Application app, Hyland.Unity.WorkflowEventArgs args, TrueSignNextLibrary.Envelope envelope)
        {
            app.Diagnostics.WriteIf(Diagnostics.DiagnosticsLevel.Verbose,
                                    string.Format("Envelope with ID: {0} has been rejected.", envelope.Id));

            //Find which signer rejected the envelope
            var rejected_signer = envelope.Content.Signers.FindLast(x => x.Rejected);

            //Add the rejected note to a property bag
            var note = string.Format("Envelope was rejected by signer {0} with the following reason: {1}",
                                     rejected_signer.First_Name + " " + rejected_signer.Last_Name, rejected_signer.Reject_Reason);

            app.Diagnostics.WriteIf(Diagnostics.DiagnosticsLevel.Verbose, note);

            args.SessionPropertyBag.Set("TrueSignEnvelopeRejected", true);
            args.SessionPropertyBag.Set("TrueSignEnvelopeRejectedReason", note);
        }