Protocol switching and submission

flowchart TD
Edit["Edit protocol configuration"] --> Validate{"Ability and parameters are valid?"}
Validate -- No--> Reject["Keep old protocol"]
Validate -- Yes--> Stop["Stop old backend"]
Stop --> Load["Load new protocol partition"]
Load --> Start{"Start successfully?"}
Start -- No--> Safe["Keep stopped/error"]
Start -- Yes--> Persist{"Save successfully?"}
Persist -- No--> Unsaved["Running but not saved"]
Persist -- Yes--> Commit["S"]