Class DocuSignUtils

java.lang.Object
com.avoka.component.docusign.DocuSignUtils

public class DocuSignUtils extends Object
Provides a constants and utility functions for DocuSign services.
Since:
3.6.0
  • Field Details

    • ENVELOPE_STATUSES_IN_PROGRESS

      public static final String[] ENVELOPE_STATUSES_IN_PROGRESS
      The DocuSign Envelope In-Progress status values: [ "changed" | "created" | "sent" | "delivered" | "signed" ].
    • ENVELOPE_STATUSES_IS_DEAD

      public static final String[] ENVELOPE_STATUSES_IS_DEAD
      The DocuSign Envelope Is Dead status values: [ "voided" | "deleted" | "declined" | "timedout" ].
    • ENVELOPE_STATUS_COMPLETED

      public static final String ENVELOPE_STATUS_COMPLETED
      The DocuSign Envelope Completed status value: "completed".
      See Also:
    • ENVELOPE_STATUSES_READY_TO_PROCESS

      public static final String[] ENVELOPE_STATUSES_READY_TO_PROCESS
      The DocuSign Envelope statuses which are ready to process
  • Constructor Details

    • DocuSignUtils

      public DocuSignUtils()
  • Method Details

    • isStatusCompleted

      public static boolean isStatusCompleted(String status)
      Return true if the DocuSign envelope status is completed.
      Parameters:
      status - the DocuSign envelope status
      Returns:
      true if the DocuSign envelope status is completed
    • isStatusDead

      public static boolean isStatusDead(String status)
      Return true if the DocuSign envelope status is dead.
      Parameters:
      status - the DocuSign envelope status
      Returns:
      true if the DocuSign envelope status is dead
    • isStatusInProgress

      public static boolean isStatusInProgress(String status)
      Return true if the DocuSign envelope status is in progress.
      Parameters:
      status - the DocuSign envelope status
      Returns:
      true if the DocuSign envelope status is in progress
    • isStatusReady

      public static boolean isStatusReady(String status)
      Return true if the DocuSign envelope status is ready to complete processing
      Parameters:
      status - the DocuSign envelope status
      Returns:
      true if the DocuSign envelope status is READY to process
      Since:
      4.3.4
    • getRecipientList

      public static List<DocuSignRecipient> getRecipientList(String submissionXml)
      Return the list of DocuSignRecipients for the given form submission XML data.

      Groovy Example

       // Determine the signing recipient list based on the submission XML data
       def recipientList = DocuSignUtils.getRecipientList(submissionXml)
      
       // Create DocuSign envelop and send notification signing request emails to the recipients
       envelopeId = docuSignClient.createAndSendEnvelope(serviceParameters["DocuSign Email Blurb"],
                                                         serviceParameters["DocuSign Email Subject"],
                                                         serviceParameters["DocuSign Document FileName"],
                                                         receiptPDF,
                                                         recipientList)
       
      Parameters:
      submissionXml - the form submission XML
      Returns:
      list of DocuSignRecipients for the given form submission XML data