Envelop Expiry Problem


#1

Dear Support,


We are using Group Docs SDK in ASP.NET to send documents

Below is the code sample
GroupdocsService service = new GroupdocsService(basePath, “2c54b59a4c6cd797”, “cbebe7abf9f46ef3fd27229e0c694178”);  // 06-04-2017 Created New account with the name riya.khanna@outlook.com

string pathSource = “C:\Sample.pdf”
string FileNameOnly = Path.GetFileName(pathSource);
 <span style="color:#2b91af;">FileStream</span> fsSource = <span style="color:blue;">new</span> <span style="color:#2b91af;">FileStream</span>(pathSource, <span style="color:#2b91af;">FileMode</span>.Open, <span style="color:#2b91af;">FileAccess</span>.Read);
 <span style="color:#2b91af;">FileStream</span> fsSource1 = <span style="color:blue;">new</span> <span style="color:#2b91af;">FileStream</span>(pathSource, <span style="color:#2b91af;">FileMode</span>.Open, <span style="color:#2b91af;">FileAccess</span>.Read);

 <span style="color:blue;">if</span> (!FileNameOnly.Equals(<span style="color:#a31515;">""</span>))
 {
     Groupdocs.Api.Contract.<span style="color:#2b91af;">UploadRequestResult</span> upload = service.UploadFile(<span style="color:#a31515;">"Internal\\"</span> + FileNameOnly, <span style="color:#2b91af;">String</span>.Empty, fsSource1);
     <span style="color:blue;">if</span> (upload.Guid != <span style="color:blue;">null</span>)
     {
         guid = upload.Guid;
         fileName = upload.AdjustedName;
     }
 }


 <span style="color:blue;">if</span> (!guid.Equals(<span style="color:#a31515;">""</span>) && !fileName.Equals(<span style="color:#a31515;">""</span>))
 {

     Groupdocs.Api.Contract.Signature.<span style="color:#2b91af;">SignatureEnvelopeResponse</span> envelop = service.CreateEnvelope(<span style="color:#a31515;">""</span>, <span style="color:#a31515;">""</span>, <span style="color:#a31515;">"E-sign Agreement for "</span> + name + <span style="color:#a31515;">" "</span> + lastName + <span style="color:#a31515;">" from "</span> + <span style="color:#a31515;">"Test Company"</span>, <span style="color:#a31515;">""</span>, <span style="color:blue;">false</span>);
     envelop.Result.Envelope.CanBeCommented = <span style="color:blue;">false</span>;
     envelop.Result.Envelope.EnvelopeExpireTime = 1;
     envelop.Result.Envelope.StepExpireTime = 1;</pre><pre style="font-family: Consolas; font-size: 13px; background: white;"><br></pre><pre style="font-family: Consolas; font-size: 13px; background: white;">We are setting the values of envelop to expire after 1 day but the envelop is not getting expired.</pre><pre style="font-family: Consolas; font-size: 13px; background: white;">Please suggest.</pre><pre style="font-family: Consolas; font-size: 13px; background: white;">Thanks</pre></div>

#2

Hi,


Thank you for your request. You tried to set envelope settings after its creation - it’s wrong, to set envelop settings such as expiration time you should create SignatureEnvelopeSettingsInfo object and set it properties first, then pass this object to the CreateEnvelope method.

Please check this documentation for more info and example

Best regards.

#3

Hi,


Sorry for confusion. Please try to use such code:


Groupdocs.Api.Contract.Signature.SignatureEnvelopeResponse envelop = service.CreateEnvelope("", “”, fileName, guid, false);
Groupdocs.Api.Contract.Signature.SignatureEnvelopeSettingsInfo settings = new Groupdocs.Api.Contract.Signature.SignatureEnvelopeSettingsInfo();
settings.CanBeCommented = false;
settings.EnvelopeExpireTime = 1;
settings.StepExpireTime = 1;
envelop = service.ModifyEnvelope(envelop.Result.Envelope.Id, settings);

Best regards.