简体   繁体   English

如何使用DocusignApi设置签名顺序

[英]How can I set signing order by using DocusignApi

I want to set the signing order in an embedded signing envelope, which means that I have 2 recipients that sign the document one by one. 我想在嵌入式签名信封中设置签名顺序,这意味着我有2个收件人,一个接一个地签名文档。 On the sandbox UI that I can tick the checkbox to set the signing order and have 2 recipients there. 在沙盒用户界面上,我可以勾选复选框以设置签名顺序,并在那里有2个收件人。 The second one receives the email after the first one finished. 在第一个完成后,第二个接收电子邮件。 I am wondering how can I implement the same logic by code. 我想知道如何通过代码实现相同的逻辑。

I ve already tried to set the routing order but not what I want. 我已经尝试设置路由顺序,但没有设置我想要的路由顺序。

TemplateRole signer = new TemplateRole();
signer.setEmail(signerEmail);
signer.setName(signerName);
signer.clientUserId(String.valueOf(xxx));
signer.setRoleName("signer");
signer.setRoutingOrder("1");

TemplateRole signer1 = new TemplateRole();
signer1.setEmail("xxx");
signer1.setName("xxx");
signer1.clientUserId(String.valueOf(123));
signer1.setRoleName("signer1");
signer1.setRoutingOrder("2");

envelopeDefinition.setTemplateRoles(Arrays.asList(signer, signer1));

This is what I want: enter image description here 这就是我想要的: 在此处输入图片描述

Not this: enter image description here 不是这个: 在此处输入图片描述

First, if you're referencing a template you'll need to set up the routing order there. 首先,如果要引用模板,则需要在此处设置路由顺序。 When using using TemplateRoles, it's not necessary to set the routing order in the signer definition. 使用TemplateRoles时,无需在签署者定义中设置路由顺序。

Second, in your code you're hitting signer.setRoutingOrder() twice, looks like you left the 1 off the second reference. 其次,在您的代码中您两次点击了signer.setRoutingOrder(),好像您将第二个引用中的1留了下来。

Third, I don't believe "0" is a valid position in the routing order. 第三,我不认为“ 0”是路由顺序中的有效位置。 Try 1 & 2 instead. 请尝试1和2。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM