[Zope-CVS] CVS: Packages3/workflow - README.txt:1.3 configure.zcml:1.4 instance.py:1.4
Ulrich Eck
ueck@net-labs.de
Fri, 7 Feb 2003 16:51:22 -0500
Update of /cvs-repository/Packages3/workflow
In directory cvs.zope.org:/tmp/cvs-serv15434
Modified Files:
README.txt configure.zcml instance.py
Log Message:
First usable state of Stateful Workflow :)
- Implemented ProcessInstanceContainer/Adapter + Views
- Implemented Dummy ContentWorkflowsUtility
- updated Readme
- fixed some bugs
--> read the README for a small tutorial of what works
=== Packages3/workflow/README.txt 1.2 => 1.3 ===
--- Packages3/workflow/README.txt:1.2 Fri Feb 7 10:56:29 2003
+++ Packages3/workflow/README.txt Fri Feb 7 16:50:51 2003
@@ -14,19 +14,29 @@
- link/copy this package into src/zope/app/workflow
- add this to the src/zope/app/configure.zcml:
+
<include package=".workflow" />
- link/copy the workflow/browser folder into
src/zope/app/browser/workflow
- add this to the src/zope/app/browser/configure.zcml:
+
<include package=".workflow" />
- edit your site-zcml to grant workflow permissions to manager:
+
<grant permission="zope.workflow.ManageProcessDefinitions" role="Manager" />
<grant permission="zope.workflow.CreateProcessInstances" role="Manager" />
<grant permission="zope.workflow.UseProcessInstances" role="Manager" />
+ - add this to your site.zcml for every content-object that
+ should get an instance annotated (example for FileContent):
+
+ <content class="zope.app.content.file.File" >
+ <implements interface="zope.app.interfaces.workflow.IProcessInstanceContainerAdaptable" />
+ </content>
+
- start your Z3 server
@@ -41,7 +51,7 @@
- within that package create a new Stateful ProcessDefinition
- - configure and activate that ProcessDefinition
+ - configure and activate that ProcessDefinition (name='default')
- goto your newly created ProcessDefinition and
add some States and Transitions
@@ -53,6 +63,23 @@
- edit your ProcessDefinition to use that Module as
RelevantData Schema
+
+ - within that package create a ContentWorkflowsUtility
+ (it currently tries to create an Instance for the
+ ProcessDefinition configured with the name 'default'
+ for every contentobject that implements the interface
+ IProcessInstanceContainerAdaptable, this is only
+ demo-behaviour)
+
+ - goto the utility and register it with the EventService
+
+ - create a new File-Content-object in your content-space
+
+ - goto tab "ProcessInstances" to see the default PI
+
+ - click on the instance and see the Status/Transitions/Data
+
+ - click on <transition> fire to fire a transition
... more to come ...
=== Packages3/workflow/configure.zcml 1.3 => 1.4 ===
--- Packages3/workflow/configure.zcml:1.3 Fri Feb 7 10:29:21 2003
+++ Packages3/workflow/configure.zcml Fri Feb 7 16:50:51 2003
@@ -87,12 +87,10 @@
<!-- Process Instance Container -->
-<!--
<adapter factory="zope.app.workflow.instance.ProcessInstanceContainerAdapter"
provides="zope.app.interfaces.workflow.IProcessInstanceContainer"
for="zope.app.interfaces.annotation.IAnnotatable" />
--->
<include package=".stateful" />
=== Packages3/workflow/instance.py 1.3 => 1.4 ===
--- Packages3/workflow/instance.py:1.3 Wed Feb 5 20:09:29 2003
+++ Packages3/workflow/instance.py Fri Feb 7 16:50:51 2003
@@ -17,13 +17,17 @@
"""
__metaclass__ = type
+from types import StringTypes
from persistence import Persistent
+from persistence.dict import PersistentDict
from zope.proxy.context import ContextWrapper
+from zope.proxy.introspection import removeAllProxies
-from zope.app.interfaces.annotation import IAnnotatable
+from zope.app.interfaces.annotation import IAnnotatable, IAnnotations
from zope.app.interfaces.workflow \
import IProcessInstance, IProcessInstanceContainer
+from zope.component import getAdapter
# XXX should an Instance be persistent by default ???
class ProcessInstance:
@@ -60,7 +64,7 @@
-
+_marker = object()
WFKey = "zope.app.worfklow.ProcessInstanceContainer"