Integration with Docusign - tsgrp/HPI GitHub Wiki
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.
- 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)
- Once you are in, setup your DocuSign account and go to Admin -> Account -> API and Keys
- Click Add Integrator Key button to add an integrator key
- Override the applicable applicable docusign properties (see below) in a
project-placeholders.properties
,override-placeholders.properties
oropencontent-override-placeholders.properties
properties file as appropriate in OC for your project. See thehpi-edge-alf
project for an example. Note that in most circumstances, the external overrides properties file is the correct spot. - Alfresco Only - Setup module-context.xml to configure the job (See below)
- 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.
TBD - Documentum support for pulling in completed DocuSign items is not yet available.
-
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 inuniversal-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.
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
:
<!-- 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>
<!-- 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 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>
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
See the following file on TSGDEMOWEB2 for information on the different DocuSign sandbox environments: D:\docusign-info.txt