Plone Workflow: How to check for multiple attributes of an object?

陌路散爱 提交于 2019-12-12 17:25:56

问题


In our project we would like to have a workflow which checks whether all three signatures (implemented through booleans) have been added to an object of type "Project" before it continues to the next state.

Unfortunately this doesn't seem to be possible while editing the workflow through the web and we haven't been able to find it in the documentation either.

How would we do it?

Thank you very much for any assistance.


回答1:


Use the transition Guard expression to check for this:

python: here.getFirstBoolean() and here.getSecondBoolean() and here.getThirdBoolean()

This can be access through the ZMI:

  1. append /manage onto site root
  2. go to "portal_workflow"
  3. click the "contents" tab
  4. click on the workflow you're using
  5. click the transitions
  6. you should see the area for a guard expression

You could put the login into a Script in the custom folder also if you wanted to make it easier and do it all TTW.



来源:https://stackoverflow.com/questions/8419176/plone-workflow-how-to-check-for-multiple-attributes-of-an-object

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