Difference between pages "DocuSign Integration" and "Moving database from live to test"

From TempusServa wiki
(Difference between pages)
Jump to navigation Jump to search
m (9 revisions imported)
 
old>Admin
 
Line 1: Line 1:
== Prereq ==
== Option: Database creation ==
I can there is no database allready please perform the following steps (assuming no db is sandbox)


To set up DocuSign integration an account that meets one of the following criteria is needed.<br/>
  mysql -uUSERNAME -pPASSWORD
* A DocuSign-partner or
* Advanced developer" license


To use the integration, the uploading user only needs a regular eSignature subscription.
  CREATE DATABASE IF NOT EXISTS sandboxbase;
  CREATE DATABASE IF NOT EXISTS sandboxtest;
  CREATE DATABASE IF NOT EXISTS sandboxlive;
  CREATE USER 'sandboxroot'@'localhost' IDENTIFIED BY 'TempusServaFTW!';
  GRANT ALL PRIVILEGES ON sandboxlive.* TO 'sandboxroot'@'localhost';
  GRANT ALL PRIVILEGES ON sandboxtest.* TO 'sandboxroot'@'localhost';
  GRANT ALL PRIVILEGES ON sandboxbase.* TO 'sandboxroot'@'localhost';


The integration will initially be created in demo mode and has to be approved, before it can be moved to production.<br/>
Approval requires 20 consecutive successful uploads performed within the last 30 days.<br/>
After that, an account with the proper access permissions has to sign in and the integration will be transferred to their account.


== Setup in DocuSign ==
== Database transfer ==
Choose ONE of the options below that best suits your requirements.


First: Sign in with an admin account and create a new "Integration" under "Settings" -> "Integrations" -> "Apps and Keys". Give it a descriptive name. This name will be shown to all who upload documents via the integration.
=== Database transfer: Different MySQL server / Same schema name ===
Export data from LIVE server


Second: Add a "Secret Key", save it. This is needed for ''docuSignSecretKey''.
  mysqldump -uUSERNAME -pPASSWORD --databases tsbase tslive tstest > dump.sql


Third: Under "Redirect URIs" provide a URL using the following syntax:<br/>
Import data to TEST server
https://[domain]/[TS-app-name]/[docuSignAuthCallbackUrl]


URL Example: https://omega.tempusserva.dk/TempusServa/main?command=dk.tempusserva.signing.docusign.PageLoginCallback
  mysql -uUSERNAME -pPASSWORD --force < dump.sql


== Setup in TS ==
=== Database transfer: Same MySQL server / Different schema name ===


There are 11 parameters available. Seven of these (marked with an asterisk below) must be set for the integration to work:
Export data from LIVE server


* docuSignActive*
  mysqldump -uUSERNAME -pPASSWORD tsbase > dumpBase.sql
* docuSignLog
  mysqldump -uUSERNAME -pPASSWORD tslive > dumpLive.sql
* docuSignApiHost*
  mysqldump -uUSERNAME -pPASSWORD tstest > dumpTest.sql
* docuSignAuthHost*
* docuSignHost*
* docuSignAccountId*
* docuSignIntegrationKey*
* docuSignSecretKey*
* docuSignAuthCallbackUrl
* docuSignEventCallbackUrl
* docuSignBrandId


The Field Type Component for which DocuSign upload should be available must be changed from "[[FieldFiles|Files: Documents]]" to "[[FieldFilesSigning|Files: Documents with signing]]".
Import data to TEST server (assuming name is 'sandbox')


=== docuSignActive ===
  mysql -uUSERNAME -pPASSWORD sandboxbase < dumpBase.sql
  mysql -uUSERNAME -pPASSWORD sandboxlive < dumpLive.sql
  mysql -uUSERNAME -pPASSWORD sandboxtest < dumpTest.sql


To enable the DocuSign functionality, this has to be set to "true".
== Configuration changes ==
Important information:
The following script will updata the database '''tslive''', for the sandbox copy example please '''USE sandboxlive;'''.


=== docuSignLog ===
Run the following commands '''before''' you start the server


This is used for debugging and should '''not''' be enabled in production.<br/>
  mysql -uUSERNAME -pPASSWORD
It enables debuggin-logs on all uploads, both in TS and in DocuSign, thus breaking confidentiality, because all parameters will be saved to a log somewhere.


=== docuSignApiHost ===
  USE tslive;
  UPDATE systempolicy SET PolicyValue = 'false' WHERE PolicyName='serviceAutostart';
  UPDATE systempolicy SET PolicyValue = 'true' WHERE PolicyName='smtpTestMode';
  UPDATE systempolicy SET PolicyValue = 'localhost' WHERE PolicyName='smtpServer';
  UPDATE systempolicy SET PolicyValue = 'localhost' WHERE PolicyName='applicationServer';
  UPDATE systempolicy SET PolicyValue = 'http://localhost' WHERE PolicyName='applicationURL';
  UPDATE systempolicy SET PolicyValue = '' WHERE PolicyName LIKE 'folder%';
  UPDATE systempolicy SET PolicyValue = 'C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps' WHERE PolicyName='applicationBasePath';


This parameter is account-dependant.<br/>
Note:
It can be found on the "Apps and Keys" page in DocuSign, labeled "Account Base URI".
The following changes can be replaced by setting the values in the application deployment descriptor, starting from version 2500


=== docuSignAuthHost ===
== Rebuild views ==
Ensure that views exist by rebuilding them


This parameter should always be "https://account-d.docusign.com/oauth/" when testing the integration and "https://account.docusign.com/oauth/", when the integration is in production.
  Designer > Modules > Admin services > RebuildViews


=== docuSignHost ===


This parameter is account-dependant. It is used to redirect the user, after a successful upload.<br/>
== Troubleshooting ==
It's value should be "https://appdemo.docusign.com" during testing.<br/>
The production value is found by signing in with an account, that will be using the integration, and then copying the URL from the browser. Remember to only copy from beginning to end of ''docusign.com'', don't include the trailing /.


=== docuSignAccountId ===
=== Server not started ===
* Check application server log files for information
* Tomcat
** Check xml descriptor is found in [TOMCAT]/conf/Catalina/localhost
** Check war file is unpacked correctly in [TOMCAT]/webapps


This attribute is account-dependant.<br/>
=== Cannot select fieldtype when adding or editing fields ===
It can be found on the "Apps and Keys" page in DocuSign, labeled "API Account ID".<br/>
# Run the following SQL command
It's a GUID, formatted like this: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX


=== docuSignIntegrationKey ===
  USE tsbase;
  DROP VIEW IF EXISTS viewdatatypeselector;
  CREATE VIEW viewdatatypeselector AS
    SELECT
      systemdatatype.FeltTypeID AS `FeltTypeID`,
      concat(systemdatatypepackage.TypePrefix,': ',systemdatatype.FeltType) AS `FeltType`
    FROM systemdatatype
    JOIN systemdatatypepackage
      ON systemdatatype.PackageID = systemdatatypepackage.PackageID
    WHERE systemdatatype.IsSelectable = 1)
    ORDER BY systemdatatypepackage.SortOrder, systemdatatype.FeltType;


This parameter is integration-dependant.<br/>
# Repeat the "Rebuild views above"
It can be found on the "Apps and Keys" page in DocuSign, or when viewing the details about the integration.<br/>
It's a GUID, formatted like this: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
 
=== docuSignSecretKey ===
 
This parameter is integration-dependant.<br/>
It can be found when viewing the details about the integration, in DocuSign.<br/>
You will only have access to the entire key when creating it, but you can just add a new one if the key is lost. Remember to delete the old one.<br/>
It's a GUID, formatted like this: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
 
=== docuSignAuthCallbackUrl ===
 
This parameter I static and should always be<br/>
"main?command=dk.tempusserva.signing.docusign.PageLoginCallback".
 
=== docuSignEventCallbackUrl ===
 
This parameter is static and should always be<br/>
"docusign-event-callback".
 
=== docuSignBrandId ===
 
This parameter is optional.<br/>
In DocuSign it is possible to create "Brands" ("Settings" -> "Account" -> "Brands").<br/>
All brands have a unique ID, it doesn't have to be the owner of the integration that creates the brand.<br/>
To enable custom branding in email, the signing formula, etc., input the brandID here.<br/>
If this parameter is left is empty, the default DocuSign branding will be used.<br/>
It's a GUID, formatted like this: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
 
== Moving to production ==
 
When moving the integration to production, the following should be taken into account.
 
Make sure to complete 20 successful uploads in a row within 30 days.<br/>
Uploads don't have to be full featured documents, empty ones will do, and they don't have to be different documents, you can upload the same document 20 times.
 
If the production account is different from the test account, the following parameters should be updated:
 
* docuSignAccountId
* docuSignApiHost
 
Make sure to change the following parameters:
 
* docuSignHost
* docuSignAuthHost
 
If the TS Application for test and production are different (different base URL), remember to add the "Redirect URIs" in DocuSign. And make sure that docuSignLog is set to false.

Revision as of 12:23, 3 October 2013

Option: Database creation

I can there is no database allready please perform the following steps (assuming no db is sandbox)

 mysql -uUSERNAME -pPASSWORD
 CREATE DATABASE IF NOT EXISTS sandboxbase; 
 CREATE DATABASE IF NOT EXISTS sandboxtest;
 CREATE DATABASE IF NOT EXISTS sandboxlive;
 CREATE USER 'sandboxroot'@'localhost' IDENTIFIED BY 'TempusServaFTW!';
 GRANT ALL PRIVILEGES ON sandboxlive.* TO 'sandboxroot'@'localhost';
 GRANT ALL PRIVILEGES ON sandboxtest.* TO 'sandboxroot'@'localhost';
 GRANT ALL PRIVILEGES ON sandboxbase.* TO 'sandboxroot'@'localhost';


Database transfer

Choose ONE of the options below that best suits your requirements.

Database transfer: Different MySQL server / Same schema name

Export data from LIVE server

 mysqldump -uUSERNAME -pPASSWORD --databases tsbase tslive tstest > dump.sql

Import data to TEST server

 mysql -uUSERNAME -pPASSWORD --force < dump.sql

Database transfer: Same MySQL server / Different schema name

Export data from LIVE server

 mysqldump -uUSERNAME -pPASSWORD tsbase > dumpBase.sql
 mysqldump -uUSERNAME -pPASSWORD tslive > dumpLive.sql
 mysqldump -uUSERNAME -pPASSWORD tstest > dumpTest.sql

Import data to TEST server (assuming name is 'sandbox')

 mysql -uUSERNAME -pPASSWORD sandboxbase < dumpBase.sql
 mysql -uUSERNAME -pPASSWORD sandboxlive < dumpLive.sql
 mysql -uUSERNAME -pPASSWORD sandboxtest < dumpTest.sql

Configuration changes

Important information: The following script will updata the database tslive, for the sandbox copy example please USE sandboxlive;.

Run the following commands before you start the server

 mysql -uUSERNAME -pPASSWORD
 USE tslive;
 UPDATE systempolicy SET PolicyValue = 'false' WHERE PolicyName='serviceAutostart';
 UPDATE systempolicy SET PolicyValue = 'true' WHERE PolicyName='smtpTestMode';
 UPDATE systempolicy SET PolicyValue = 'localhost' WHERE PolicyName='smtpServer';
 UPDATE systempolicy SET PolicyValue = 'localhost' WHERE PolicyName='applicationServer';
 UPDATE systempolicy SET PolicyValue = 'http://localhost' WHERE PolicyName='applicationURL';
 UPDATE systempolicy SET PolicyValue =  WHERE PolicyName LIKE 'folder%';
 UPDATE systempolicy SET PolicyValue = 'C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps' WHERE PolicyName='applicationBasePath';

Note: The following changes can be replaced by setting the values in the application deployment descriptor, starting from version 2500

Rebuild views

Ensure that views exist by rebuilding them

 Designer > Modules > Admin services > RebuildViews


Troubleshooting

Server not started

  • Check application server log files for information
  • Tomcat
    • Check xml descriptor is found in [TOMCAT]/conf/Catalina/localhost
    • Check war file is unpacked correctly in [TOMCAT]/webapps

Cannot select fieldtype when adding or editing fields

  1. Run the following SQL command
 USE tsbase;
 DROP VIEW IF EXISTS viewdatatypeselector;
 CREATE VIEW viewdatatypeselector AS
   SELECT
     systemdatatype.FeltTypeID AS `FeltTypeID`,
     concat(systemdatatypepackage.TypePrefix,': ',systemdatatype.FeltType) AS `FeltType` 
   FROM systemdatatype 
   JOIN systemdatatypepackage 
     ON systemdatatype.PackageID = systemdatatypepackage.PackageID 
   WHERE systemdatatype.IsSelectable = 1)
   ORDER BY systemdatatypepackage.SortOrder, systemdatatype.FeltType;
  1. Repeat the "Rebuild views above"