[英]send a document using a specific template docusign java
see my scenario.看我的场景。 I already have my environment configuring using the docusign sdk java using the intellj idea.我已经使用 intellj 想法使用 docusign sdk java 配置了我的环境。 the examples are all working.这些例子都有效。
I created a template on the development portal.我在开发门户上创建了一个模板。 What do I need to do and send a document using a specific template.我需要做什么并使用特定模板发送文档。 In the portal I will have a template where the person who will receive it will need to sign.在门户中,我将有一个模板,接收它的人需要在该模板上签名。 How do I do via sdk java?如何通过 sdk java 做?
Update: this is the code in the Java SDK to udpate a document:更新:这是Java SDK 中更新文档的代码:
public void updateDocument(String accountId, String envelopeId, String documentId)
This article has code examples in all languages including Java using the SDK. 本文包含所有语言的代码示例,包括使用 SDK 的 Java。
I also suggest to try to useQuickstart so the authentication part of making API calls is handled for you.我还建议尝试使用快速入门,以便为您处理进行 API 调用的身份验证部分。
Here is part of the Java code you will need:这是您需要的 Java 代码的一部分:
private EnvelopeDefinition makeEnvelope(WorkArguments args) {
String signerEmail = args.getSignerEmail();
String signerName = args.getSignerName();
String ccEmail = args.getCcEmail();
String ccName = args.getCcName();
String templateId = args.getTemplateId();
EnvelopeDefinition env = new EnvelopeDefinition();
env.setTemplateId(templateId);
TemplateRole signer1 = new TemplateRole();
signer1.setEmail(signerEmail);
signer1.setName(signerName);
signer1.setRoleName("signer");
TemplateRole cc1 = new TemplateRole();
cc1.setEmail(ccEmail);
cc1.setName(ccName);
cc1.setRoleName("cc");
env.setTemplateRoles(Arrays.asList(signer1, cc1));
env.setStatus("sent");
return env;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.