We have a working xAPI setup that can send statements to an LRS. Our question - what happens if the statements fail either for some period or for some subset of users? Meaning that due to (pick your favorite) internet issues, LRS credentials issues, user data issues - we need to resend all statements for a period of time or selected statements for some users?
We were not planning to keep all statements on file indefinitely. We do have the underlying data and can reformulate the statements but will the LRS freak out if we resend a large collection of statements? We are a content provider sending statements to systems like Cornerstone, Saba, Degreed and other LMS systems on the market.
What do others do?
We haven't tried to solve this yet - looking for general "how do you solve for this" feedback.
Whether or not an LRS will "freak out" is largely dependent on that LRS and how it is deployed, etc.
As far as what the spec dictates, mostly you should be fine particularly if your statements have an
id
that is pre-populated. The LRS has two ways it can implement handling of statements that it feels it has seen before (statements that have anid
that matches one it already stores),(ref: https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-Communication.md#lrs-requirements-3)
Essentially it can accept the statement and just ignore it, or it can compare it to what it already has and reject it with a conflict status. Either way the LRS should be able to handle statements it recognizes.
A statement without an
id
is considered a new statement and will be assigned anid
by the LRS and won't be considered a conflict.The other problem that could be encountered would typically be a downstream system that doesn't understand how to properly handle the
stored
property as that would be different for statements newly stored because they didn't yet exist on the LRS. It would also be best to include atimestamp
in the statement during creation, otherwise it will be set by the LRS when storing the statement and that timestamp is unlikely to match when the statement was actually created and would make the data seem out of order.