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='', description='')[source]¶ State in a workflow.
-
exception_permission
¶ alias of
WorkflowPermissionException
-
exception_state
¶ alias of
WorkflowStateException
-
exception_transition
¶ alias of
WorkflowTransitionException
-
-
class
coaster.docflow.
WorkflowStateGroup
(value, title='', description='')[source]¶ Group of states in a workflow. The value parameter is a list of values or WorklowState instances.
-
exception_permission
¶ alias of
WorkflowPermissionException
-
exception_state
¶ alias of
WorkflowStateException
-
exception_transition
¶ alias of
WorkflowTransitionException
-
-
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.
-
exception_state
¶ alias of
WorkflowStateException
-