openfun / joanie

šŸ‘› A headless ERP for education to manage course enrollment/subscription, payment and certificates delivery.
MIT License
20 stars 2 forks source link

šŸ›(backend) convert validity period in ms for Lex Persona backend #743

Closed jbpenrath closed 3 months ago

jbpenrath commented 3 months ago

Purpose

Currently the document uploaded on the signature provider has the contract definition title as title. This is weird as for a course, all contracts will have the same name. In order to improve that we decide to built a specific title according to the current date, the related course and the order primary key.

YYYY-MM-DD_COURSE_CODE_ORDER_PK

On Lex Persona, each workflow steps have a validity period. We sets this one according to the settings JOANIE_SIGNATURE_VALIDITY_PERIOD but this setting is expressed in seconds and it appears Lex Persona expects a duration in ms. So as effect, the minimum validity period of Lex persona is used (which is 24h). Once this delay is reached, Lex Persona stops the related workflow and recipients are not able to sign until we restart the worfklow.

Furthermore, we decide to update the default JOANIE_SIGNATURE_VALIDITY_PERIOD to the max value accepted by Lex Persona which is 99 days.

Proposal