You are not logged in Log in Join
You are here: Home » Download Zope Products » Content Management Framework » CMF Documentation » CMF Requirements Documents » CMF Use Cases » Use Case: Define Workflow Scripts

Log in
Name

Password

 

Use Case: Define Workflow Scripts

Actor

WorkflowDesigner

Documentation

You may need to perform actions like sending an email or invoking another workflow when users execute specific transitions. You can do this by writing scripts. Scripts can be any Zope object, but Scripts (Python) are the most tested for this purpose.

Scripts are passed one parameter, the state_change object of a WorkflowExpression. Remember that your script is executed with the permissions of the user who invokes the transition, rather than your own permissions, unless you give the script proxy roles.

Once a script is in the "Scripts" container of a workflow you can visit a transition and select the script to be executed. The script will be executed before the state change and before variables are updated. It can raise exceptions to veto the action or an ObjectMoved or ObjectDeleted exception to tell the workflow that the object has moved or has been deleted.