wvuweb / cleanslate-cms

A place to file issues and view releases for CleanSlate CMS. http://cleanslatecms.wvu.edu
6 stars 0 forks source link

Digital measures integration with cleanslate #244

Open architarious opened 5 years ago

architarious commented 5 years ago

Problem explanation

Most faculty members at WVU are required to update and maintain profiles on Digital Measures and they also have other faculty profiles on multiple different sites throughout the university, via college faculty pages, experts database, research center websites, etc. All of this content is typically the same and is a logistical mess in regards to keeping it updated.

What would be ideal is if we could just connect a certain page-template in cleanslate to the Digital Measures API and then pull in all of this content from DM when their profile page is refreshed in cleanslate. That way this information is all stored in a central place and doesn't have to be entered or re-entered in multiple locations.

Proposed functionality

execution flow chart

General description

Faculty profiles in CleanSlate (CS) that are marked with a unique identifier will utilize Digital Measures’ (DM) API to pull their respective profile information into CS while in edit mode. When a faculty profile page with a working identifier is published, CS will then cache the information pulled from DM into local variables, which should prevent unnecessary connections to DM and should also allow for content to be pulled into other areas of the site.

Triggers

CS User opens a page in editor mode with a valid DM_user_id page-data value

Actors

  1. Content editor / CleanSlate user
  2. Digital measures
  3. University Relations

Preconditions

  1. DM schema/university key has been entered into CS by University Relations (var: DM_schema_id)
  2. DM index/college key has been entered into its site data field for this website (var: DM_index_id)
  3. DM user/faculty key has been entered into its page data field for this profile (var: DM_user_id)
  4. CS is able to connect to DM

Goals (successful conclusions)

  1. Faculty bio content is pulled from DM into CS
  2. CS caches content from DM, that will be able to be used elsewhere in the site
  3. After first publish, CS will periodically refresh its cache and stay in sync with DM content

Failed conclusions

  1. Invalid ID
  2. Unable to connect
  3. Null value for field
  4. File size is too large

Steps of execution

  1. DM_index_id is entered into site data
  2. DM_user_id is entered into page data on CS profile
  3. User opens profile in CS’s editor mode
  4. ID’s are used to establish a connection to DM a. Null index or user ID — End connection sequence and instead display a normal profile with editable regions b. Invalid index or user ID — Display error c. Unable to connect — Display error
  5. GET requests for individual fields are sent to DM
  6. DM returns field values which are stored in local variables tied to CS page-id’s a. Field value is null — local variable and DIV container / field name aren’t displayed b. File size is too large — File isn’t cached and an error is displayed in editor mode
  7. Page is published
  8. Field values from DM are cached and are now available to users outside CS
  9. CS cache containing DM fields is refreshed daily / semi-daily a. Invalid user or index ID — page/pages continue using last successful cache and an error message is posted CS Site Messages b. Null user or index ID — page/pages are reverted back to last publish before first entry of DM_user_id or unpublished if DM_user_id was entered on first publish c. Unable to connect — continue using last successful cache and an error message is posted in CS Site Message

Resources

Digital Measures Documentation