Python API#

The pages below are generated from the source. They are the authoritative description of every public name this package offers.

collective.multiworkflow.api#

Workflow-aware equivalents of the plone.api workflow helpers. Called without a workflow_id, each behaves exactly as its plone.api counterpart.

api.get_state(obj, default, workflow_id)

Get the object's current state, optionally in a specific workflow.

api.get_states(obj)

Get the object's state in every workflow of its chain.

api.transition(obj[, transition, to_state, ...])

Perform a workflow transition, optionally on a specific workflow.

api.transitions(obj)

Get the transitions available to the current user, by workflow.

api.conflicting_permissions(obj)

Find permissions claimed by more than one workflow in the chain.

api.owning_workflow(obj)

Map every transition id in the object's chain to its owning workflow.

collective.multiworkflow.declaration#

Registration of the workflows a behavior contributes. Most callers use the ZCML directive instead of these.

declaration.contributes(marker, *workflow_ids)

Build a subscription adapter factory contributing workflow_ids.

declaration.collect_contributions(context)

Collect the workflow ids every participating marker contributes.

declaration.workflow_label(workflow)

Name a workflow the way the user interface should show it.

collective.multiworkflow.interfaces#

The interfaces the mechanism is built on.

interfaces.IAdditionalWorkflows

Base marker for content participating in additional workflows.

interfaces.IAdditionalWorkflowsFor

The workflow ids one marker contributes to an object's chain.

interfaces.IAdditionalWorkflowLabel

The label a workflow is shown under, in place of its title.

collective.multiworkflow.chain#

The adapter that appends contributed workflows to a type's configured chain.

chain.additional_workflows_chain(context, tool)

Append contributed workflows to the chain configured for the type.

collective.multiworkflow.utils.workflow#

The values the workflow_states catalog index holds, and the helpers that build and read them.

utils.workflow.WORKFLOW_STATES

Name of the index, of the metadata column, and the state_variable an additional workflow should adopt.

utils.workflow.STATE_SEPARATOR

Separates the workflow id from the state id within one indexed value.

utils.workflow.format_state(workflow_id, ...)

Build one indexed value out of a workflow id and a state id.

utils.workflow.parse_state(value)

Split one indexed value back into its workflow id and state id.

utils.workflow.formatted_workflow_states(obj)

Describe the object's state in every workflow of its chain.

collective.multiworkflow.indexers.workflow_states#

The indexer that fills the workflow_states catalog index.

indexers.workflow_states.workflow_states

Index every workflow in the object's chain, in chain order.

collective.multiworkflow.subscribers.reindex#

The event subscriber keeping the index fresh for workflows with a state variable of their own.

subscribers.reindex.reindex_workflow_states(...)

Keep the index fresh for workflows with a state variable of their own.

collective.multiworkflow.querystring#

Rewriting of review_state queries onto the chain index.

querystring.query_index_modifiers.qualify(state)

Name the workflow a bare state id belongs to.

querystring.query_index_modifiers.ReviewStateModifier

Move a parsed review_state query that names a workflow onto workflow_states.

collective.multiworkflow.vocabularies#

vocabularies.workflow.WorkflowStatesVocabulary

Every state of every workflow, keyed as the index holds them.

collective.multiworkflow.restapi.serializer#

A patch to plone.restapi's content serializer, and the summary metadata, adding workflow_states to the payloads. The patch is applied when the package's ZCML is loaded; nothing here is called directly.

restapi.serializer.dxcontent.apply_patch()

Wrap SerializeToJson.__call__ so its payload carries workflow_states.

restapi.serializer.summary.JSONSummarySerializerMetadata

Additional metadata to be exposed on listings.

collective.multiworkflow.exportimport#

A patch to plone.exportimport, so that imported content has the role mappings and chain index entries of the state it was imported in. Applied when the package's ZCML is loaded; nothing here is called directly.

exportimport.update_role_mappings(obj)

Apply the permission map of the state each workflow was restored to.

exportimport.reindex_workflow_variables(obj)

Reindex the catalog indexes named after the object's workflow variables.

exportimport.apply_patches()

Wrap update_workflow_history so it finishes what a transition would.