There may be an easier way to approach this.
Plone workflows can be stacked; for example, you can assign more than one workflow to a content type.
This means that you can appoint both a nurse and a doctor’s workflow, each of which conveys specific permissions. If you correctly configured your roles for the workflow, your use case should be easily implemented; just divide the roles into those for nurses and doctors.
So, when the default workflow uses Reviewer, Editor, Member, Member, etc., use DoctorReviewer, NurseReviewer, DoctorEditor, NurseEditor, etc. Thus, two workflows will handle two sets of concurrent permissions, transitions, and states.
I don’t know enough about your use cases if this solves your problems at all, but I just wanted to make sure that you knew about this setting before exploring complex custom plugins.
source share