Document workflows¶
Coaster provides versions of the main Docflow classes where workflow exceptions map to HTTP 403 Forbidden (via werkzeug.exceptions.Forbidden).
-
class
coaster.docflow.
WorkflowState
(value, title=u'', description=u'')[source]¶ State in a workflow.
-
class
coaster.docflow.
WorkflowStateGroup
(value, title=u'', description=u'')[source]¶ Group of states in a workflow. The value parameter is a list of values or WorklowState instances.
-
class
coaster.docflow.
InteractiveTransition
(workflow)[source]¶ Multipart workflow transitions. Subclasses of this class may provide methods to return a form, validate the form and submit the form. Implementing a
submit()
method is mandatory.submit()
will be wrapped by thetransition()
decorator to automatically update the document’s state value.Instances of
InteractiveTransition
will receiveworkflow
anddocument
attributes pointing to the workflow instance and document respectively.
-
class
coaster.docflow.
DocumentWorkflow
(document, context=None)[source]¶ Base class for document workflows.
-
permissions
()[source]¶ Permissions for this workflow. Plays nice with
coaster.views.load_models()
andcoaster.sqlalchemy.PermissionMixin
to determine the available permissions to the current user.
-