@@ -59,11 +59,9 @@ protected Object doWork(WorkArguments args, ModelMap model,
5959 String phoneNumber = args .getPhoneNumber ();
6060 String accountId = session .getAccountId ();
6161
62- // Step 2 start
62+ //ds-snippet- start:eSign41Step2
6363 ApiClient apiClient = createApiClient (session .getBasePath (), user .getAccessToken ());
64- // Step 2 end
6564
66- // Step 3 start
6765 AccountsApi workflowDetails = new AccountsApi (apiClient );
6866 AccountIdentityVerificationResponse workflowRes = workflowDetails .getAccountIdentityVerification (session .getAccountId ());
6967 List <AccountIdentityVerificationWorkflow > identityVerification = workflowRes .getIdentityVerification ();
@@ -75,15 +73,16 @@ protected Object doWork(WorkArguments args, ModelMap model,
7573 workflowId = identityVerification .get (i ).getWorkflowId ();
7674 }
7775 }
78- // Step 3 end
76+ //ds-snippet-end:eSign41Step2
77+
7978 logger .info ("workflowId = " + workflowId );
8079 if (workflowId .equals ("" ))
8180 {
8281 throw new ApiException (0 , getTextForCodeExample ().CustomErrorTexts .get (0 ).ErrorMessage );
8382 }
8483
85-
86- // Step 1. Create the envelope definition
84+ // Create the envelope definition
85+ //ds-snippet-start:eSign41Step4
8786 EnvelopeDefinition envelope = CfrEmbeddedSigningService .makeEnvelope (
8887 signerName ,
8988 signerEmail ,
@@ -96,26 +95,33 @@ protected Object doWork(WorkArguments args, ModelMap model,
9695 DOCUMENT_FILE_NAME ,
9796 DOCUMENT_NAME );
9897
99- // Step 2. Call DocuSign to create the envelope
98+ // Call DocuSign to create the envelope
10099 EnvelopesApi envelopesApi = new EnvelopesApi (apiClient );
101100 EnvelopeSummary envelopeSummary = envelopesApi .createEnvelope (accountId , envelope );
102101
103102 String envelopeId = envelopeSummary .getEnvelopeId ();
103+ //ds-snippet-end:eSign41Step4
104+
104105 session .setEnvelopeId (envelopeId );
105106
106- // Step 3. create the recipient view, the embedded signing
107+ // create the recipient view, the embedded signing
108+ //ds-snippet-start:eSign41Step5
107109 RecipientViewRequest viewRequest = CfrEmbeddedSigningService .makeRecipientViewRequest (
108110 signerEmail ,
109111 signerName ,
110112 config ,
111113 signerClientId );
112114
115+ //ds-snippet-end:eSign41Step5
116+
117+ //ds-snippet-start:eSign41Step6
113118 ViewUrl viewUrl = CfrEmbeddedSigningService .embeddedSigning (
114119 envelopesApi ,
115120 accountId ,
116121 envelopeId ,
117122 viewRequest
118123 );
124+ //ds-snippet-end:eSign41Step6
119125
120126 // Step 4. Redirect the user to the embedded signing
121127 // Don't use an iFrame!
0 commit comments