Stack Definition

Revision: $Id$

Contents

1   Stack Definition Introduction

A stack definition is an object stored within a state definition object implementing an abstraction layer on a stack object instance.

A stack definition:

It may be used as well without any roles policy if the purpose of the stack is not to distribute local roles. (for instance: adding a stack of tasks hooked on a given state)

2   Stack Definition Registry

If you need to implement a specific behavior, you may register your own stack definition.

You must implement the IWorkflowStackDefinition interface and usually you will inherit from the base StackDefinition class in your child class which is already implementing this interface.

You may use it like this:

>>> from Products.CPSWorkflow.stackregistries import WorkflowStackDefRegistry
>>> from Products.CPSWorkflow.stackdefinition import StackDefinition
>>>
>>> class MyStackDefinition(StackDefinition):
...     # Here implementation
...     pass
>>>
>>> WorkflowStackDefRegistry.register(MyStackDefinition)
1

Check the API in the doc/api/ sub-folder.