Previous Topic

Next Topic

Book Contents

Book Index

Writing Code that Implements the Asset Synchronization Cycle

Key things about the Asset Integration Cycle algorithm:

The Asset Integration Cycle must be in the order of hours. Completing the Process File step is specific to the LMS. Before you apply changes, see Checking Status.

Recommended algorithm

set mode to ‘all’ or ‘delta’
set format to ‘aicc’ or ‘scorm’, etc…
loop (forever) { 
  try {
    handle = AI_InitiateAssetMetaData (mode, format)
    loop (forever) {
      sleep X minutes // polling interval
      try {
        resp = AI_PollForAssetMetaData(handle)
        exitloop // exit polling loop
      } catch (DataNotReady) {
        // stay in polling loop
      }
    }
    Retrieve file via URL in resp
    Process file
    AI_AcknowledgeAssetMetaData(handle)
    if mode==all then exitloop // performing 'all' exit main loop
  } catch (AnyException) { 
    try {
      AI_AcknowledgeAssetMetaData(null)
    } catch (AnyException) {
      // ignore
    }
  }
  sleep N hours // main Asset Integration Cycle interval
  
}