mozilla / aestimia

[Archived] Assessment tool
4 stars 10 forks source link

Need to confirm a workflow #85

Closed cmcavoy closed 10 years ago

cmcavoy commented 10 years ago

@toolness / @andrewhayward wanted to confirm that the following workflow for CEM could work. If it doesn't work with the current implementation of Aestimia, how much would we need to change? The intent here is to field a CEM site (essentially a CSOL-lite implementation) without having to store any kind of state on the CEM site. We don't have user accounts, so why store any data at all? If the following flow works, then I think we can hit that goal.

  1. A user submits evidence and their email for a particular badge.
  2. CEM calls Aestimia with a bundle of information, the users email, the evidence, and the badge they're applying for.
  3. Aestimia evaluation happens.
  4. Aestimia approves or disapproves the application.
  5. Aestimia calls CEM and says there's been a state change. Aestimia passes a transaction id only.
  6. CEM calls Aestimia back with the transaction id and requests the details. CEM gets the email, evidence and badge id back.
  7. CEM processes the application, emailing - openbadgering - whatever.
  8. CEM calls Aestimia back and lets them know that transaction id xxxx has been processed, and should be marked as processed.
  9. Aestimia marks the transaction received or processed or something.
andrewhayward commented 10 years ago

In general, I think I agree. However, I'm not sure as I understand the same thing by 'transaction id' that you do. Right now, it's possible for the same application to have multiple evaluations, or what I think of as 'transactions'.

In the case of CEM, given that we're trying to avoid any kind of fixed state, we won't have the option for a user to go back and update an application - they'll just have to start again, with a fresh application. However, to generalise the situation, we'll need to know which evaluations have been picked up on, regardless of how many are made for any given application.

So, my understanding of the situation:

  1. A user submits evidence and their email for a particular badge.
  2. CEM calls Aestimia with [...].
  3. Aestimia evaluation happens.
  4. Aestimia approves or disapproves the application (a 'transaction').
  5. Aestimia calls CEM and says there's been a state change. Aestimia passes an application id only.
  6. CEM calls Aestimia back with the application id and requests the details. CEM gets the email, evidence and badge id back, as well as all evaluations (i.e. relevant transactions).
  7. CEM processes the most recent evaluation, emailing - openbadgering - whatever.
  8. CEM calls Aestimia back and lets them know that the evaluation referenced by transaction id xxxx has been processed, and should be marked processed.
  9. Aestimia marks the evaluation ('transaction') received or processed or something.

Off the top of my head, I don't think this means much needs to change.

cmcavoy commented 10 years ago

yes - agreed - application id is what I'm thinking.

So - next step is clearly ticketing out the things that need to change. Not sure what the gap is between the workflow above and what's current.

andrewhayward commented 10 years ago

Upon further investigation, we need to file tickets to:

andrewhayward commented 10 years ago

Everything needed for the stateless workflow seems to be in place.