Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes
CMFCore.interfaces._tools.IWorkflowTool Class Reference
Inheritance diagram for CMFCore.interfaces._tools.IWorkflowTool:
Inheritance graph
[legend]
Collaboration diagram for CMFCore.interfaces._tools.IWorkflowTool:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def getCatalogVariablesFor
def doActionFor
def getInfoFor
def notifyCreated
def notifyBefore
def notifySuccess
def notifyException
def getHistoryOf
def getStatusOf
def setStatusOf

Static Public Attributes

tuple id

Detailed Description

This tool accesses and changes the workflow state of content.

Definition at line 1607 of file _tools.py.


Member Function Documentation

def CMFCore.interfaces._tools.IWorkflowTool.doActionFor (   ob,
  action,
  wf_id = None,
  args,
  kw 
)
Perform the given workflow action on 'ob'.

o 'ob' is the target object.

o 'action' is the ID of the action to perform.

o 'wf_id', if passed, is the ID of the workflow supplying the action.

o 'args' and 'kw', if passed, are applied to the invoked action.

o Invoked by user interface code, allowing the user to request a
  workflow action.

o The workflow object must perform its own security checks.

o Permission:  Public

Definition at line 1630 of file _tools.py.

01630 
01631     def doActionFor(ob, action, wf_id=None, *args, **kw):
01632         """ Perform the given workflow action on 'ob'.
01633 
01634         o 'ob' is the target object.
01635 
01636         o 'action' is the ID of the action to perform.
01637 
01638         o 'wf_id', if passed, is the ID of the workflow supplying the action.
01639 
01640         o 'args' and 'kw', if passed, are applied to the invoked action.
01641 
01642         o Invoked by user interface code, allowing the user to request a
01643           workflow action.
01644 
01645         o The workflow object must perform its own security checks.
01646 
01647         o Permission:  Public
01648         """

Get a mapping of "workflow-relevant" attributes.

o Invoked by 'portal_catalog' when indexing content.

o Allows workflows to add variables to the catalog based on workflow
  status, making it possible to implement queues.

o Permission:  Private (Python only)

Definition at line 1619 of file _tools.py.

01619 
01620     def getCatalogVariablesFor(ob):
01621         """ Get a mapping of "workflow-relevant" attributes.
01622 
01623         o Invoked by 'portal_catalog' when indexing content.
01624 
01625         o Allows workflows to add variables to the catalog based on workflow
01626           status, making it possible to implement queues.
01627 
01628         o Permission:  Private (Python only)
01629         """

Here is the caller graph for this function:

Get the history of an object for a given workflow.

o 'wf_id' is the id of the selected workflow.

o 'ob' is the content object.

o Invoked by workflow definitions.

o Permission:  Private (Python only)

Definition at line 1718 of file _tools.py.

01718 
01719     def getHistoryOf(wf_id, ob):
01720         """ Get the history of an object for a given workflow.
01721 
01722         o 'wf_id' is the id of the selected workflow.
01723 
01724         o 'ob' is the content object.
01725 
01726         o Invoked by workflow definitions.
01727 
01728         o Permission:  Private (Python only)
01729         """

Here is the caller graph for this function:

def CMFCore.interfaces._tools.IWorkflowTool.getInfoFor (   ob,
  name,
  default = _marker,
  wf_id = None 
)
Get the given bit of workflow information for the object.

o 'ob' is the target object.

o 'name' is the name of the information requested.

o 'default', if passed, will be returned if 'name' is not found;
  if 'default' is not passed, then raise ValueError.

o 'wf_id', if passed, is the ID of the workflow supplying the action.

o Invoked by user interface code, allowing the user to request
  information provided by the workflow.

o The workflow object must perform its own security checks.

o Permission:  Public

Definition at line 1649 of file _tools.py.

01649 
01650     def getInfoFor(ob, name, default=_marker, wf_id=None):
01651         """ Get the given bit of workflow information for the object.
01652 
01653         o 'ob' is the target object.
01654 
01655         o 'name' is the name of the information requested.
01656 
01657         o 'default', if passed, will be returned if 'name' is not found;
01658           if 'default' is not passed, then raise ValueError.
01659 
01660         o 'wf_id', if passed, is the ID of the workflow supplying the action.
01661 
01662         o Invoked by user interface code, allowing the user to request
01663           information provided by the workflow.
01664 
01665         o The workflow object must perform its own security checks.
01666 
01667         o Permission:  Public
01668         """

Get the last element of a workflow history for a given workflow.

o 'wf_id' is the id of the selected workflow.

o 'ob' is the content object.

o Invoked by workflow definitions.

o Permission:  Private (Python only)

Definition at line 1730 of file _tools.py.

01730 
01731     def getStatusOf(wf_id, ob):
01732         """ Get the last element of a workflow history for a given workflow.
01733 
01734         o 'wf_id' is the id of the selected workflow.
01735 
01736         o 'ob' is the content object.
01737 
01738         o Invoked by workflow definitions.
01739 
01740         o Permission:  Private (Python only)
01741         """

Notify all applicable workflows of an action before it happens.

o 'ob' is the content object which is the target of the action.

o 'action' usually corresponds to a method name.

o Participating workflows may veto the action by raising
  WorkflowException.

o Unless vetoed, the tool will later call either a 'notifySuccess' or
  'notifyException'

o Permission:  Private (Python only)

Definition at line 1678 of file _tools.py.

01678 
01679     def notifyBefore(ob, action):
01680         """ Notify all applicable workflows of an action before it happens.
01681 
01682         o 'ob' is the content object which is the target of the action.
01683 
01684         o 'action' usually corresponds to a method name.
01685 
01686         o Participating workflows may veto the action by raising
01687           WorkflowException.
01688 
01689         o Unless vetoed, the tool will later call either a 'notifySuccess' or
01690           'notifyException'
01691 
01692         o Permission:  Private (Python only)
01693         """

Notify all applicable workflows that an object has been created.

o 'ob' is the newly-created object;  it will already be "seated"
  in its new place.

o Permission:  Private (Python only)

Definition at line 1669 of file _tools.py.

01669 
01670     def notifyCreated(ob):
01671         """ Notify all applicable workflows that an object has been created.
01672 
01673         o 'ob' is the newly-created object;  it will already be "seated"
01674           in its new place.
01675 
01676         o Permission:  Private (Python only)
01677         """

def CMFCore.interfaces._tools.IWorkflowTool.notifyException (   ob,
  action,
  exc 
)
Notify all applicable workflows that an action failed.

o 'ob' is the content object which is the target of the action.

o 'action' usually corresponds to a method name.

o 'exc' is the 'sys.exec_info' triple for the exception.

o Permission:  Private (Python only)

Definition at line 1706 of file _tools.py.

01706 
01707     def notifyException(ob, action, exc):
01708         """ Notify all applicable workflows that an action failed.
01709 
01710         o 'ob' is the content object which is the target of the action.
01711 
01712         o 'action' usually corresponds to a method name.
01713 
01714         o 'exc' is the 'sys.exec_info' triple for the exception.
01715 
01716         o Permission:  Private (Python only)
01717         """

def CMFCore.interfaces._tools.IWorkflowTool.notifySuccess (   ob,
  action,
  result = None 
)
Notify all applicable workflows that an action has taken place.

o 'ob' is the content object which is the target of the action.

o 'action' usually corresponds to a method name.

o 'result' is the value returned from the action.

o Permission:  Private (Python only)

Definition at line 1694 of file _tools.py.

01694 
01695     def notifySuccess(ob, action, result=None):
01696         """ Notify all applicable workflows that an action has taken place.
01697 
01698         o 'ob' is the content object which is the target of the action.
01699 
01700         o 'action' usually corresponds to a method name.
01701 
01702         o 'result' is the value returned from the action.
01703 
01704         o Permission:  Private (Python only)
01705         """

Here is the caller graph for this function:

def CMFCore.interfaces._tools.IWorkflowTool.setStatusOf (   wf_id,
  ob,
  status 
)
Append a record to the workflow history of a given workflow.

o 'wf_id' is the id of the selected workflow.

o 'ob' is the content object.

o 'status' is a mapping defining the history item to append.

o Invoked by workflow definitions.

o Permission:  Private (Python only)

Definition at line 1742 of file _tools.py.

01742 
01743     def setStatusOf(wf_id, ob, status):
01744         """ Append a record to the workflow history of a given workflow.
01745 
01746         o 'wf_id' is the id of the selected workflow.
01747 
01748         o 'ob' is the content object.
01749 
01750         o 'status' is a mapping defining the history item to append.
01751 
01752         o Invoked by workflow definitions.
01753 
01754         o Permission:  Private (Python only)
01755         """
01756 


Member Data Documentation

Initial value:
Attribute('id',
            """ The ID of the tool.o Must be set to "portal_workflow"""",
            )
This tool accesses and changes the workflow state of content.

Definition at line 1612 of file _tools.py.


The documentation for this class was generated from the following file: