:sparkles:(backend) signature backend new endpoint to get signature state of a signing procedure
Purpose
It seems like the webhook notifications for signatures may take some time to tell us that a document has been signed. This will allow us to know directly the progress instead of waiting.
To explain more in details : Lex Persona updates the workflow concerned as soon as it gets the signature of the student. This is the reason why we've added this new endpoint which will allow us to see the progression of a signature procedure. With some experience with the signature provider that we use in production, we cannot depend on the speed of the webhook that is sent from Lex Persona to us. It becomes urgent that we need another way to verify the progression of a signing procedure.
We made an utility method that translates those integer values as a dictionary like the following example :
-
{"student": False, "organization": False}: nobody has signed. -
{"student": True, "organization": False}: student has signed only. -
{"student": True, "organization": True}: student and organization have signed.
Those values are retrieved from the response given from LexPersona of a signing procedure with the attribute isFinished that has a boolean value for each step.
Proposal
- [x] add new endpoint to get the progress of a signing procedure for all signature backends
I think before merging this endpoint, we should try to fix the handle_notification method.