adhocracy_core.sheets.workflow module

Sheets to assign workflows to resources and change states.

interface ISample[source]

Extends: adhocracy_core.interfaces.ISheet

Sheet with the sample workflow.

class StateName(*arg, **kw)[source]

Bases: adhocracy_core.schema.SingleLine

Workflow state name.

Possible values are set by the given workflow binding.

validator = <colander.deferred object>[source]
widget = <colander.deferred object>[source]
class StateData(*arg, **kw)[source]

Bases: adhocracy_core.schema.MappingSchema

Resource specific data for a workflow state.

missing = <colander._drop object>
default = <colander.deferred object>[source]
class StateDataList(*args, **kw)[source]

Bases: adhocracy_core.schema.SequenceSchema

List of StateData.

deferred_workflow_validator(node: adhocracy_core.schema.SchemaNode, kw: dict) → <built-in function callable>[source]

Deferred workflow name validator.

class Workflow(*arg, **kw)[source]

Bases: adhocracy_core.schema.SingleLine

SchemaNode for workflow types.

Default value requires the schema binding workflow.

default = <colander.deferred object>[source]
validator = <colander.deferred object>[source]
widget = <colander.deferred object>[source]
class WorkflowAssignmentSchema(*arg, **kw)[source]

Bases: adhocracy_core.schema.MappingSchema

Workflow assignment sheet data structure.

workflow = None

Workflow assigned to the sheet context resource.

Available workflows are defined in adhocracy_core.workflows.

workflow_state = None

Workflow state of the sheet context resource.

Setting this executes a transition to the new state value.

state_data = None

Optional List of StateData.

example:

{‘name’: ‘state1’, ‘description’: ‘text’, ‘start_date’: <DateTime>}
interface IWorkflowAssignment[source]

Extends: adhocracy_core.interfaces.ISheet

Market interface for the workflow assignment sheet.

class WorkflowAssignmentSheet(meta: adhocracy_core.interfaces.SheetMetadata, context: <InterfaceClass adhocracy_core.interfaces.IResourceSheet>, registry: pyramid.registry.Registry, request: <InterfaceClass pyramid.interfaces.IRequest>=None, creating: adhocracy_core.interfaces.ResourceMetadata=None)[source]

Bases: adhocracy_core.sheets.AnnotationRessourceSheet

Sheet class for workflow assignment sheets.

It allows to view and modify the workflow state of context. If the you set a new workflow state a transition to this state is executed.

The workflow of context is only found, if the resource_type metadata of context has a valid ‘workflow` entry.

includeme(config)[source]

Add sheet.