+ +
+

pyams_workflow package

+ +
+

Submodules

+
+
+

pyams_workflow.content module

+
+
+class pyams_workflow.content.WorkflowContentDisplayedDateVocabulary(context)
+

Bases: zope.schema.vocabulary.SimpleVocabulary

+

Workflow content displayed date vocabulary

+
+ +
+
+class pyams_workflow.content.WorkflowContentPublicationInfo
+

Bases: persistent.Persistent, zope.container.contained.Contained

+

Workflow content info

+
+
+displayed_publication_date
+

Computed attributes based on schema fields

+

Field properties provide default values, data validation and error messages +based on data found in field meta-data.

+

Note that FieldProperties cannot be used with slots. They can only +be used for attributes stored in instance dictionaries.

+
+ +
+
+first_publication_date
+
+ +
+
+is_published(check_parent=True)
+
+ +
+
+is_visible(request=None, check_parent=True)
+
+ +
+
+publication
+
+ +
+
+publication_date
+
+ +
+
+publication_effective_date
+
+ +
+
+publication_expiration_date
+
+ +
+
+publisher
+

Computed attributes based on schema fields

+

Field properties provide default values, data validation and error messages +based on data found in field meta-data.

+

Note that FieldProperties cannot be used with slots. They can only +be used for attributes stored in instance dictionaries.

+
+ +
+
+push_end_date
+

Computed attributes based on schema fields

+

Field properties provide default values, data validation and error messages +based on data found in field meta-data.

+

Note that FieldProperties cannot be used with slots. They can only +be used for attributes stored in instance dictionaries.

+
+ +
+
+push_end_date_index
+
+ +
+
+reset(complete=True)
+
+ +
+ +
+
+pyams_workflow.content.WorkflowContentPublicationInfoFactory(context)
+

Workflow content info factory

+
+ +
+
+pyams_workflow.content.handle_cloned_object(event)
+

Add comment when an object is cloned

+
+ +
+
+pyams_workflow.content.handle_cloned_publication_support(event)
+

Reset publication info when an object is cloned

+
+ +
+
+

pyams_workflow.include module

+
+
+pyams_workflow.include.include_package(config)
+

Pyramid include

+
+ +
+
+

pyams_workflow.versions module

+
+
+pyams_workflow.versions.WorkflowContentVersionsFactory(context)
+

Workflow versions factory

+
+ +
+
+class pyams_workflow.versions.WorkflowHistoryItem(**kwargs)
+

Bases: persistent.Persistent

+

Workflow history item

+
+
+comment
+

Computed attributes based on schema fields

+

Field properties provide default values, data validation and error messages +based on data found in field meta-data.

+

Note that FieldProperties cannot be used with slots. They can only +be used for attributes stored in instance dictionaries.

+
+ +
+
+date
+

Computed attributes based on schema fields

+

Field properties provide default values, data validation and error messages +based on data found in field meta-data.

+

Note that FieldProperties cannot be used with slots. They can only +be used for attributes stored in instance dictionaries.

+
+ +
+
+principal
+

Computed attributes based on schema fields

+

Field properties provide default values, data validation and error messages +based on data found in field meta-data.

+

Note that FieldProperties cannot be used with slots. They can only +be used for attributes stored in instance dictionaries.

+
+ +
+
+source_state
+

Computed attributes based on schema fields

+

Field properties provide default values, data validation and error messages +based on data found in field meta-data.

+

Note that FieldProperties cannot be used with slots. They can only +be used for attributes stored in instance dictionaries.

+
+ +
+
+source_version
+

Computed attributes based on schema fields

+

Field properties provide default values, data validation and error messages +based on data found in field meta-data.

+

Note that FieldProperties cannot be used with slots. They can only +be used for attributes stored in instance dictionaries.

+
+ +
+
+target_state
+

Computed attributes based on schema fields

+

Field properties provide default values, data validation and error messages +based on data found in field meta-data.

+

Note that FieldProperties cannot be used with slots. They can only +be used for attributes stored in instance dictionaries.

+
+ +
+
+transition
+

Computed attributes based on schema fields

+

Field properties provide default values, data validation and error messages +based on data found in field meta-data.

+

Note that FieldProperties cannot be used with slots. They can only +be used for attributes stored in instance dictionaries.

+
+ +
+
+transition_id
+

Computed attributes based on schema fields

+

Field properties provide default values, data validation and error messages +based on data found in field meta-data.

+

Note that FieldProperties cannot be used with slots. They can only +be used for attributes stored in instance dictionaries.

+
+ +
+ +
+
+class pyams_workflow.versions.WorkflowVersionState
+

Bases: persistent.Persistent

+

Workflow managed content version object

+
+
+get_first_state_date(states)
+
+ +
+
+state
+
+ +
+
+state_date
+
+ +
+
+state_principal
+
+ +
+
+state_urgency
+

Computed attributes based on schema fields

+

Field properties provide default values, data validation and error messages +based on data found in field meta-data.

+

Note that FieldProperties cannot be used with slots. They can only +be used for attributes stored in instance dictionaries.

+
+ +
+
+version_id = None
+
+ +
+ +
+
+pyams_workflow.versions.WorkflowVersionStateFactory(context)
+

Workflow content version state factory

+
+ +
+
+pyams_workflow.versions.WorkflowVersionVersionsFactory(context)
+

Workflow versions factory for version

+
+ +
+
+class pyams_workflow.versions.WorkflowVersions
+

Bases: zope.container.folder.Folder

+

Workflow versions adapter

+
+
+add_version(content, state, principal=None)
+
+ +
+
+get_last_versions(count=1)
+
+ +
+
+get_version(version_id)
+
+ +
+
+get_versions(states=None, sort=False, reverse=False)
+
+ +
+
+has_version(states)
+
+ +
+
+remove_version(version_id, state='deleted', comment=None, principal=None)
+
+ +
+
+set_state(version_id, state, principal=None)
+
+ +
+ +
+
+class pyams_workflow.versions.WorkflowVersionsSublocations(context)
+

Bases: pyams_utils.adapter.ContextAdapter

+

Workflow versions sub-locations

+
+
+sublocations()
+
+ +
+ +
+
+class pyams_workflow.versions.WorkflowVersionsTraverser(context)
+

Bases: pyams_utils.adapter.ContextAdapter

+

++versions++ namespace traverser

+
+
+traverse(name, furtherpath=None)
+
+ +
+ +
+
+pyams_workflow.versions.handle_workflow_transition(event)
+

Handle workflow transition

+
+ +
+
+pyams_workflow.versions.handle_workflow_version_transition(event)
+

Handle workflow version transition

+
+ +
+
+

pyams_workflow.workflow module

+
+
+pyams_workflow.workflow.NullAction(wf, context)
+

Null action

+
+ +
+
+pyams_workflow.workflow.NullCondition(wf, context)
+

Null condition

+
+ +
+
+class pyams_workflow.workflow.Transition(transition_id, title, source, destination, condition=<function NullCondition>, action=<function NullAction>, trigger=0, permission=None, order=0, **user_data)
+

Bases: object

+

Transition object

+

A transition doesn’t make anything by itself. +Everything is handled by the workflow utility

+
+ +
+
+class pyams_workflow.workflow.Workflow(transitions, states, initial_state=None, update_states=None, readonly_states=None, protected_states=None, manager_states=None, published_states=None, waiting_states=None, retired_states=None, archived_states=None, auto_retired_state=None)
+

Bases: object

+

Workflow utility

+
+
+get_state_label(state)
+
+ +
+
+get_transition(source, transition_id)
+
+ +
+
+get_transition_by_id(transition_id)
+
+ +
+
+get_transitions(source)
+
+ +
+
+refresh(transitions)
+
+ +
+ +
+
+class pyams_workflow.workflow.WorkflowInfo(context)
+

Bases: object

+

Workflow info adapter

+
+
+fire_automatic()
+
+ +
+
+fire_transition(transition_id, comment=None, side_effect=None, check_security=True, principal=None)
+
+ +
+
+fire_transition_for_versions(state, transition_id, comment=None, principal=None)
+
+ +
+
+fire_transition_toward(state, comment=None, side_effect=None, check_security=True, principal=None)
+
+ +
+
+get_automatic_transition_ids()
+
+ +
+
+get_fireable_transition_ids(check_security=True)
+
+ +
+
+get_fireable_transition_ids_toward(state, check_security=True)
+
+ +
+
+get_manual_transition_ids(check_security=True)
+
+ +
+
+get_system_transition_ids()
+
+ +
+
+has_automatic_transitions()
+
+ +
+
+has_version(state)
+
+ +
+
+name
+
+ +
+
+parent
+
+ +
+ +
+
+class pyams_workflow.workflow.WorkflowsVocabulary(context, **kw)
+

Bases: zope.componentvocabulary.vocabulary.UtilityVocabulary

+

Workflows vocabulary

+
+
+interface = <InterfaceClass pyams_workflow.interfaces.IWorkflow>
+
+ +
+
+nameOnly = True
+
+ +
+ +
+
+pyams_workflow.workflow.granted_permission(permission, context)
+
+ +
+
+

Module contents

+
+
+pyams_workflow.includeme(config)
+

Pyramid include

+
+ +
+
+ + +