问题
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:
- append /manage onto site root
- go to "portal_workflow"
- click the "contents" tab
- click on the workflow you're using
- click the transitions
- 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