Integration with Docusign - tsgrp/HPI GitHub Wiki

This page is being moved to the alfresco documentation

Please note that as of May 2015, the Send to DocuSign action should work for any ECM back end. However, we have only built an Alfresco job to retrieve completed documents from DocuSign and ingest them back in to the repository.

Setup a DocuSign Account

  1. If needed, create a DEV sandbox with DocuSign here: https://www.docusign.com/developer-center
  • TSG note - we will want to have a separate sandbox for each of our environments. This way, documents sent from edge2 aren't consumed by release2 (or any other environment)
  1. Once you are in, setup your DocuSign account and go to Admin -> Account -> API and Keys
  2. Click Add Integrator Key button to add an integrator key

Setup OpenContent

  1. Override the applicable applicable docusign properties (see below) in a project-placeholders.properties, override-placeholders.properties or opencontent-override-placeholders.properties properties file as appropriate in OC for your project. See the hpi-edge-alf project for an example. Note that in most circumstances, the external overrides properties file is the correct spot.
  2. Alfresco Only - Setup module-context.xml to configure the job (See below)

Setup the Repository

Alfresco

  1. Add a folder to the repository to store DocuSign data
  • Defaults to /hpi/docuSignData
  • Alfresco Permissions - HPI Administrators - Coordinator, EVERYONE - Contributor
  • Eventual Dctm ACL should give HPI Administrators and admingroup DELETE access and dm_world WRITE access.

Documentum

TBD - Documentum support for pulling in completed DocuSign items is not yet available.

Docusign Properties

  • docusign.username - DocuSign user name (which should be the same as the user's email address)
  • docusign.password - DocuSign user password, should be encrypted with the TSGEncrypter and enclosed with the encryption indicator like: @{theEncPassword}
  • docusign.integratorKey - see setup step above
  • docusign.login.url - the login URL is defaulted to the DocuSign dev sandbox URL in universal-defaults.properties. You will want to override this for production environments
  • docusign.hpi.dataPath - The folder where DocuSign data objects should be stored. Defaults to /hpi/docuSignData
  • docusign.completed.version.policy - When a document is completed in docusign, it is versioned in the repository. This property controls whether the version is a major or minor version. Note that for TSG Controlled Documents, versioning is not possible. If a controlled document is sent out for DocuSign, the PDF rendition is replaced in the repository when DocuSign completes it's process. The object is not versioned in the repository.

Module-Context Updates

In order for the Retrieve job to run in Alfresco, make the following updates to your project's module-context.xml or the external opencontent-override-module-context.xml:

Ensure that the DocuSign retrieve job is configured

Alfresco 5.x

<!-- Retrieve Content from Docusign Job -->
<bean id="hpi-docusign-retrieve-job" class="org.alfresco.util.CronTriggerBean">
	<property name="jobDetail">
		<bean id="com.tsgrp.opencontent.alfresco.job.retrieveDocusignContentJob" class="org.springframework.scheduling.quartz.JobDetailBean">
			<property name="jobClass" value="com.tsgrp.opencontent.alfresco.job.RetrieveDocusignContentJob" />
			<property name="jobDataAsMap">
				<map>
					<entry key="serviceRegistry" value-ref="ServiceRegistry" />
					<entry key="version" value="${docusign.completed.version.policy}" />
					<entry key="docuSignUsername" value="${docusign.username}" />
					<entry key="docuSignPassword" value="${docusign.password}" />
					<entry key="integratorKey" value="${docusign.integratorKey}" />
					<entry key="docuSignLoginURL" value="${docusign.login.url}" />
					<entry key="dataPath" value="${docusign.hpi.dataPath}" />
				</map>
			</property>
		</bean>
	</property>
	<property name="scheduler" ref="schedulerFactory" />
	<!-- Run every hour -->
	<property name="cronExpression" value="0 0 * * * ?"/>
</bean>

Alfresco 6.x

<!-- Retrieve Content from Docusign Job -->
	<bean id="hpi-docusign-retrieve-trigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
		<!-- Run every hour -->
		<property name="cronExpression" value="0 0 * * * ?"/>
		<property name="jobDetail">
			<bean id="com.tsgrp.opencontent.alfresco.job.retrieveDocusignContentJob"
				  class="org.springframework.scheduling.quartz.JobDetailFactoryBean">
				<property name="jobClass" value="com.tsgrp.opencontent.alfresco.job.RetrieveDocusignContentJob"/>
				<property name="jobDataAsMap">
					<map>
						<entry key="serviceRegistry" value-ref="ServiceRegistry"/>
						<entry key="version" value="${docusign.completed.version.policy}"/>
						<entry key="docuSignUsername" value="${docusign.username}"/>
						<entry key="docuSignPassword" value="${docusign.password}"/>
						<entry key="integratorKey" value="${docusign.integratorKey}"/>
						<entry key="docuSignLoginURL" value="${docusign.login.url}"/>
						<entry key="dataPath" value="${docusign.hpi.dataPath}"/>
						<entry key="folderNotesEnabled" value="${docusign.folderNotesEnabled}"/>
					</map>
				</property>
			</bean>
		</property>
	</bean>

Ensure that the job is scheduled to run

Ensure that the tsgSchedulerAccessor bean has the docusign retrieve job configured in the triggers list. Remember to make sure that the opencontent-override-module-context file outside the amp isn't undoing changes you make to the module-context

<bean id="tsgSchedulerAccessor" class="org.springframework.scheduling.quartz.SchedulerAccessorBean">
    <property name="scheduler" ref="schedulerFactory"/>
    <property name="triggers">
        <list>
            <ref bean="hpi-docusign-retrieve-trigger"/>
            <ref bean="index-queue-document-unlock-reset-trigger"/>
            <ref bean="indexer-temp-cleanup-trigger"/>
        </list>
    </property>
</bean>

Run Job Immediately

Since the job is typically configured to run every hour, it's sometimes necessary to force the job to run for testing. Navigate to the Alfresco Admin Console -> Scheduled Jobs. Run the com.tsgrp.opencontent.alfresco.job.retrieveDocusignContentJob

TSG DocuSign Sandboxes

See the following file on TSGDEMOWEB2 for information on the different DocuSign sandbox environments: D:\docusign-info.txt

⚠️ **GitHub.com Fallback** ⚠️