Context and DCWorkflow
Guard conditions in DCWorkflow (the workflow engine shipped with Plone) allow you to control whether a transition is available to the user depending on external circumstances. Usually these are simply based on permissions or the role of the logged in user, but in some cases you want to get cleverer. Provision is made for you to write TALES expressions that will be evaluated whenever the actions are shown, allowing for quite complex conditions to be written fairly simply..
However, there is one thing that you need to look out for… The predefined variables available to those workflow TALES expressions are not the usual ones available within page templates or other actions, and in fact things you absolutely expect (like context and member, for example) aren’t available at all. It’s therefore very worth reading this introduction to DCWorkflow (PDF) which lists all the available variables at the end. Should save you 15 minutes or so!