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.

collective.multiworkflow.interfaces#

The two 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.

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.indexers#

The workflow_states catalog index and the values it holds.

indexers.WORKFLOW_STATES

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

indexers.STATE_SEPARATOR

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

indexers.format_state(workflow_id, state_id)

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

indexers.parse_state(value)

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

indexers.workflow_states

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

indexers.reindex_workflow_states(obj, event)

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

Rewrite a parsed review_state query to target workflow_states.

collective.multiworkflow.vocabularies#

vocabularies.workflow.WorkflowStatesVocabulary

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

collective.multiworkflow.exportimport#

A patch to plone.exportimport, so that importing content leaves the chain index correct. Applied when the package's ZCML is loaded; nothing here is called directly.

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 reindexes what it changed.