Assign reviewer from different groups at different stages of workflow in Plone

你说的曾经没有我的故事 提交于 2019-12-20 00:59:55

问题


We are implementing Plone as a document management system in a hospital setting. In doing so, the review process asks for two review steps:

  1. where nursing staff review a document
  2. where physicians review a document

The problem arises when we found out that the nurses are grouped based on the types of machinery they handle (specifically types of scanners, ultrasound,...). On these machines they perform all kinds of exams, on all kinds of bodyparts.

The physicians on the other hand are grouped based on bodyparts expertise.

This means that a document that pertains to an ultrasound of the pelvis should be reviewed by the ultrasound group within the nursing population and the abdominal group within the physician population.

There are approximately 8 nursing groups and 7 physician groups which would account for 56 different workflows on 56 different document types... This looks like a maintance nightmare.

Is there a different way to "dynamically" assign reviewer groups based on parameters given to a document? If so, where are the parameters defined at the document type level and assigned at the document instance level?


回答1:


There may be an easier way to approach this.

Plone workflows can be stacked; e.g. you can assign more than one workflow to a content type.

This means you can assign both a nurse and a doctor workflow, each handing out specific permissions. If you set up your roles correctly per workflow, your use-case should be easy to implement; just split Roles into those for nurses and doctors.

So, where a default workflow uses Reviewer, Editor, Contributor, Member, etc, use DoctorReviewer, NurseReviewer, DoctorEditor, NurseEditor, etc. That way the two workflows will handle two sets of parallel permissions, transitions and states.

I do not know enough about your use-cases if this will solve your problems at all, but I just wanted to make sure you knew about the option before exploring complex custom plugins.




回答2:


Instead of overloading the very simple built-in "Tags" field, you can also use Archetypes.Schemaextender to create a couple of custom fields (e.g. equipment, body part) that you can assign to each content item, then use those fields to assign the Nurse workflow to the right group of nurses and the Doctor workflow to the right group of Doctors, as described above.




回答3:


you've to write your pas plugin. You can start from this: http://pypi.python.org/pypi/Products.AutoRoleFromHostHeader/ (works also for groups) and create your own which assign a role/group. This plugin is very simple and just do this:

security.declarePrivate('getRolesForPrincipal')
def getRolesForPrincipal(self, principal, request=None):
    """ Assign roles based on 'request'. """

there, you can do your own logic and assign to the user a group based on the parameters defined at the document type level and assigned at the document instance level.




回答4:


PlacefulWorkflow may help if you create folders correctly to reflect your groups



来源:https://stackoverflow.com/questions/9663188/assign-reviewer-from-different-groups-at-different-stages-of-workflow-in-plone

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!