Difference between revisions of "PT Sync Getting Started"

From ADF Docs
Jump to: navigation, search
(Sync Mapping)
 
(14 intermediate revisions by the same user not shown)
Line 9: Line 9:
 
## '''Note:''' If syncing a local custom element, make sure the custom element is changed to global on the destination site.
 
## '''Note:''' If syncing a local custom element, make sure the custom element is changed to global on the destination site.
 
## '''Optional''': Import the "Sync Test" custom element into the source and destination sites.
 
## '''Optional''': Import the "Sync Test" custom element into the source and destination sites.
# The custom elemepnt to be synchronized must have a unique ID field (i.e. UUID) and a parent unique ID field.  The parent unique ID field maintains the relationship between the parent and child custom element records.  When building the sync mapping record, select the fields for the unique ID and the parent unique ID within the custom element.
+
# The custom element to be synchronized must have a unique ID field (i.e. UUID).  The unique ID field maintains the relationship between the parent and child custom element records.  When building the sync mapping record, select the fields for the unique ID within the custom element.
  
 
== CCAPI Configuration ==
 
== CCAPI Configuration ==
Line 29: Line 29:
  
 
== CommonSpot Hooks ==
 
== CommonSpot Hooks ==
 +
# CommonSpot version 6.2 and greater contain the "Post Save Form Hook".  If you are running CommonSpot version 6.1, then install the HF 8b.  This hotfix is in the PT Sync application (/ADF/apps/pt_sync/site_files/commonspot/CS_6.1.0_HF08b.zip).
 +
# Copy the Post Save Form Hook cfm file (/ADF/apps/pt_sync/site_files/post-save-form-hook.cfm) and paste in the root of the Source site.
 +
 +
== Optional Sync Test Element Setup ==
 +
'''Optional''' steps to setup datasheets on the source and destination sites for the Sync Test Element.
 +
 +
On the source site, setup the Sync Test Manager to add, edit, and delete the Sync Test custom element.
 +
# On the source site, create page "Sync Test Manager" in the ''/webadmin/sync/'' subsite.
 +
# Add a custom script element to the page.
 +
# Edit the custom script and define the explicit path as the following:
 +
## /ADF/apps/pt_sync/customcf/sync_mapping_test.cfm
 +
# From the "Datasheet Views" dialog, follow the "Click here to create a new datasheet view" link.
 +
# Enter the following information and then click "Next":
 +
## Name: All Sync Test Records
 +
## Private: unchecked
 +
## Default View: unchecked
 +
## Description: View to manage all of the photo sizes
 +
## Datasheet Source: Form Result/Custom Element Sheet
 +
# From the Datasheet Source dialog, choose the "Sync Test Element" custom element and click "Next".
 +
# From the Datasheet Columns dialog select the columns Field1 and Field2 fields and move them to the Selected Columns list then click "Finish".
 +
# You will be directed to the Datasheet View page.  Click "Close" to return to your page.
 +
# Edit the columns to add edit and delete action columns.
 +
## From the "Datasheet View Columns" dialog
 +
## Select "Add Action Column" and create an edit column.  Select the "edit-form-data" from the existing module list.
 +
## Select "Add Action Column" and create an delete column.  Select the "delete-form-data" from the existing module list.
 +
# Move the edit and delete columns to the first and second column in the datasheet.
 +
# Publish the Sync Test Manager page.
 +
 +
On the destination site, create only the datasheet and without the action columns because we want the custom element to be read-only.
 +
# On the source site, create page "Sync Test Manager" in the ''/webadmin/sync/'' subsite.
 +
# Add a datasheet element to the page.
 +
# From the "Datasheet Views" dialog, follow the "Click here to create a new datasheet view" link.
 +
# Enter the following information and then click "Next":
 +
## Name: All Sync Test Records
 +
## Private: unchecked
 +
## Default View: unchecked
 +
## Description: View to manage all of the photo sizes
 +
## Datasheet Source: Form Result/Custom Element Sheet
 +
# From the Datasheet Source dialog, choose the "Sync Test Element" custom element and click "Next".
 +
# From the Datasheet Columns dialog select the columns Field1, Field2, and UUID fields and move them to the Selected Columns list then click "Finish".
 +
# You will be directed to the Datasheet View page.  Click "Close" to return to your page.
 +
# Add a datasheet action column for the Delete action.
 +
# Publish the Sync Test Manager page.
 +
 +
== Reset the ADF ==
 +
[[Reset ADF|Reset the ADF]] on the source and destination sites.
 +
 +
== Validate Sync Process ==
 +
Now that the PT Sync application is installed and configured on the source and destination sites, you are ready to test the sync process.
 +
 +
The following are the test cases to verify the sync application is working properly, the examples will be outlined through the Sync Test Element:
 +
# Add New Record
 +
## On the source site, go to the "Sync Test Manager" page.  Select the "Add New Sync Test Record" and enter text into the fields and submit the form.
 +
## Depending on the scheduling settings that are defined in the ptSync Configuration element, this process will create a ColdFusion scheduled task to run the sync for the element record.  You can check this in the ColdFusion administrator and the Scheduled Tasks.
 +
## Once the scheduled tasks has completed, go to the destination site and look at the "Sync Test Manager" datasheet.  A new element record will appear in the datasheet.
 +
# Edit Record
 +
## On the source site, edit an element record within the datasheet. 
 +
## Wait for the scheduled task to run the sync (check the ColdFusion administrator scheduled tasks to verify the scheduled task).
 +
## Once the scheduled tasks has completed, go to the destination site and look at the "Sync Test Manager" datasheet.  The element record will appear in the datasheet with the updated data fields.
 +
# Delete Record
 +
## On the source site, delete an element record within the datasheet. 
 +
## Wait for the scheduled task to run the sync (check the ColdFusion administrator scheduled tasks to verify the scheduled task).
 +
## Once the scheduled tasks has completed, go to the destination site and look at the "Sync Test Manager" datasheet.  The element record will be delete from the datasheet.
 +
 +
If all these steps are running correctly, then you have successfully installed the PT Sync App. 
 +
 +
Well done!
 +
 +
Please provide feedback and review the [http://community.paperthin.com/projects/pt_sync/ PT Sync App] at The Commons.
 +
 +
[[Category:PT Sync]]

Latest revision as of 17:22, 20 December 2011

Overview

All implementations of the PT Sync application are unique for all sites.

These steps below will walk through implementing the Sync Test custom element. You can use this custom element to test the installation or customize the steps to utilized your sites custom elements.

Sync Custom Elements

  1. Setup the custom element to be identical on both the source and destination sites.
    1. An easy method to maintain this is to export and import the custom element from the source to destination site.
    2. Note: If syncing a local custom element, make sure the custom element is changed to global on the destination site.
    3. Optional: Import the "Sync Test" custom element into the source and destination sites.
  2. The custom element to be synchronized must have a unique ID field (i.e. UUID). The unique ID field maintains the relationship between the parent and child custom element records. When building the sync mapping record, select the fields for the unique ID within the custom element.

CCAPI Configuration

  1. Each custom element to be synchronized must have be setup through in the CCAPI on the destination site.
  2. The following steps for the CCAPI Configuration will setup the CCAPI for the Sync Test custom element.

Sync Mapping

  1. Navigate to the Sync Mappings page created on the source site.
  2. Create a new sync mapping record to synchronize the custom element records to the destination site.
  3. The following are definitions for the fields in the sync mapping:
    1. Source Custom Element - Select from a list of the custom elements within the source site. Select the custom element to synchronize.
      1. Optional: Select the "Sync Test Element" custom element.
    2. Destination Custom Element - This field validates the "Source Custom Element" selected to find the matching custom element on the destination site. The custom elements must have the same names on the both sites.
    3. Unique ID Field - Select the field in the "Source Custom Element" that is the unique ID for the custom element.
      1. Optional: Select the "uuid" custom element.
    4. Parent Unique ID Field - Select the field in the "Source Custom Element" that stores the parent unique ID. This is to maintain the relationship between parent and child records.
      1. Optional: Select the "parentUUID" custom element.
  4. Save the Sync Mapping record and reset the ADF.

CommonSpot Hooks

  1. CommonSpot version 6.2 and greater contain the "Post Save Form Hook". If you are running CommonSpot version 6.1, then install the HF 8b. This hotfix is in the PT Sync application (/ADF/apps/pt_sync/site_files/commonspot/CS_6.1.0_HF08b.zip).
  2. Copy the Post Save Form Hook cfm file (/ADF/apps/pt_sync/site_files/post-save-form-hook.cfm) and paste in the root of the Source site.

Optional Sync Test Element Setup

Optional steps to setup datasheets on the source and destination sites for the Sync Test Element.

On the source site, setup the Sync Test Manager to add, edit, and delete the Sync Test custom element.

  1. On the source site, create page "Sync Test Manager" in the /webadmin/sync/ subsite.
  2. Add a custom script element to the page.
  3. Edit the custom script and define the explicit path as the following:
    1. /ADF/apps/pt_sync/customcf/sync_mapping_test.cfm
  4. From the "Datasheet Views" dialog, follow the "Click here to create a new datasheet view" link.
  5. Enter the following information and then click "Next":
    1. Name: All Sync Test Records
    2. Private: unchecked
    3. Default View: unchecked
    4. Description: View to manage all of the photo sizes
    5. Datasheet Source: Form Result/Custom Element Sheet
  6. From the Datasheet Source dialog, choose the "Sync Test Element" custom element and click "Next".
  7. From the Datasheet Columns dialog select the columns Field1 and Field2 fields and move them to the Selected Columns list then click "Finish".
  8. You will be directed to the Datasheet View page. Click "Close" to return to your page.
  9. Edit the columns to add edit and delete action columns.
    1. From the "Datasheet View Columns" dialog
    2. Select "Add Action Column" and create an edit column. Select the "edit-form-data" from the existing module list.
    3. Select "Add Action Column" and create an delete column. Select the "delete-form-data" from the existing module list.
  10. Move the edit and delete columns to the first and second column in the datasheet.
  11. Publish the Sync Test Manager page.

On the destination site, create only the datasheet and without the action columns because we want the custom element to be read-only.

  1. On the source site, create page "Sync Test Manager" in the /webadmin/sync/ subsite.
  2. Add a datasheet element to the page.
  3. From the "Datasheet Views" dialog, follow the "Click here to create a new datasheet view" link.
  4. Enter the following information and then click "Next":
    1. Name: All Sync Test Records
    2. Private: unchecked
    3. Default View: unchecked
    4. Description: View to manage all of the photo sizes
    5. Datasheet Source: Form Result/Custom Element Sheet
  5. From the Datasheet Source dialog, choose the "Sync Test Element" custom element and click "Next".
  6. From the Datasheet Columns dialog select the columns Field1, Field2, and UUID fields and move them to the Selected Columns list then click "Finish".
  7. You will be directed to the Datasheet View page. Click "Close" to return to your page.
  8. Add a datasheet action column for the Delete action.
  9. Publish the Sync Test Manager page.

Reset the ADF

Reset the ADF on the source and destination sites.

Validate Sync Process

Now that the PT Sync application is installed and configured on the source and destination sites, you are ready to test the sync process.

The following are the test cases to verify the sync application is working properly, the examples will be outlined through the Sync Test Element:

  1. Add New Record
    1. On the source site, go to the "Sync Test Manager" page. Select the "Add New Sync Test Record" and enter text into the fields and submit the form.
    2. Depending on the scheduling settings that are defined in the ptSync Configuration element, this process will create a ColdFusion scheduled task to run the sync for the element record. You can check this in the ColdFusion administrator and the Scheduled Tasks.
    3. Once the scheduled tasks has completed, go to the destination site and look at the "Sync Test Manager" datasheet. A new element record will appear in the datasheet.
  2. Edit Record
    1. On the source site, edit an element record within the datasheet.
    2. Wait for the scheduled task to run the sync (check the ColdFusion administrator scheduled tasks to verify the scheduled task).
    3. Once the scheduled tasks has completed, go to the destination site and look at the "Sync Test Manager" datasheet. The element record will appear in the datasheet with the updated data fields.
  3. Delete Record
    1. On the source site, delete an element record within the datasheet.
    2. Wait for the scheduled task to run the sync (check the ColdFusion administrator scheduled tasks to verify the scheduled task).
    3. Once the scheduled tasks has completed, go to the destination site and look at the "Sync Test Manager" datasheet. The element record will be delete from the datasheet.

If all these steps are running correctly, then you have successfully installed the PT Sync App.

Well done!

Please provide feedback and review the PT Sync App at The Commons.