opensubmit icon indicating copy to clipboard operation
opensubmit copied to clipboard

Refactor the state model

Open troeger opened this issue 11 years ago • 1 comments

The state model for submissions is too deep weaved into the code. Some proposal for an explicit state machine implementation:

#states
SUBMITTED=1
COMPILETEST=2
WITHDRAWN=3
NotApplicable=object()
#inputs
NEW_SUBMISSION=1
JOB_REQUEST=2
WITHDRAW_REQUEST=3
def transition1():
   if not bedingung:
        return NotApplicable
   datenbank_aendern()
   return WITHDRAWN
transitions = {}
transitions[SUBMITTED, WITHDRAW_REQUEST] = [transition]

troeger avatar Sep 29 '14 21:09 troeger

Is this still active?

Feinbube avatar Oct 06 '15 19:10 Feinbube