adhocracy_core.workflows.schemas module

Data structures for Workflows.

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

Bases: adhocracy_core.schema.SchemaNode

Callable executed if this transition is called or state is entered.

It needs to provide the following signature:

context: IResource,
workflow: IWorkflow=None,
transition= dict:None,
request=None
schema_type()[source]

Return schema type.

serialize(appstruct=<colander.null>)[source]

Serialize.

missing = None
default = None
class TransitionMeta(*arg, **kw)[source]

Bases: adhocracy_core.schema.MappingSchema

Workflow transition to state.

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

Bases: adhocracy_core.schema.MappingSchema

Workflow state.

display_only_to_roles = None

Hint for the fronted, this is not security related.

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

Bases: adhocracy_core.schema.MappingSchema

Data structure to define a workflow (finite state machine).

create_workflow_meta_schema(data: dict) → adhocracy_core.schema.SchemaNode[source]

Create workflowMeta schema and add schemas for states and transitions.

Dict:data to deserialize/serialize. For every key in states and transitions a child schema is added.