Skip to content

Commit 680c41b

Browse files
committed
Changed eg023 IDV example to check for workflow name.
1 parent ffb0200 commit 680c41b

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

app/eSignature/examples/eg023_idv_authentication/controller.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,20 @@ def get_workflow(args):
109109

110110
# Check that idv authentication is enabled
111111
if workflow_response.identity_verification:
112-
workflow_id = workflow_response.identity_verification[0].workflow_id
113-
app.logger.info("We found the following workflowID: " + workflow_id)
112+
# Find the workflow ID corresponding to the name "DocuSign ID Verification"
113+
workflow_id = None
114+
115+
for workflow in workflow_response.identity_verification:
116+
if workflow.default_name == "DocuSign ID Verification":
117+
workflow_id = workflow.workflow_id
118+
break
119+
120+
if workflow_id is not None:
121+
app.logger.info("We found the following workflowID: " + workflow_id)
122+
else:
123+
app.logger.info("No workflowID was found for DocuSign ID Verification.")
124+
114125
session['workflow_id'] = workflow_id
115-
116126
return workflow_id
117127

118128
else:

0 commit comments

Comments
 (0)