[Zope3-checkins] CVS: Zope3/src/zope/app/workflow/stateful -
contentworkflow.py:1.15
Stephan Richter
srichter at cosmos.phy.tufts.edu
Thu Apr 15 18:11:40 EDT 2004
Update of /cvs-repository/Zope3/src/zope/app/workflow/stateful
In directory cvs.zope.org:/tmp/cvs-serv8703/src/zope/app/workflow/stateful
Modified Files:
contentworkflow.py
Log Message:
Got rid of workflow service.
=== Zope3/src/zope/app/workflow/stateful/contentworkflow.py 1.14 => 1.15 ===
--- Zope3/src/zope/app/workflow/stateful/contentworkflow.py:1.14 Sat Mar 13 18:55:31 2004
+++ Zope3/src/zope/app/workflow/stateful/contentworkflow.py Thu Apr 15 18:11:09 2004
@@ -17,19 +17,18 @@
$Id$
"""
-__metaclass__ = type
-
from persistent import Persistent
from persistent.dict import PersistentDict
-from zope.component import getService
+from zope.app import zapi
from zope.app.event.interfaces import ISubscriber
from zope.app.event.interfaces import IObjectCreatedEvent
-from zope.app.servicenames import EventSubscription, Workflows
+from zope.app.servicenames import EventSubscription, Utilities
from zope.app.workflow.interfaces import IProcessInstanceContainer
from zope.app.workflow.interfaces import IProcessInstanceContainerAdaptable
from zope.app.workflow.interfaces.stateful import IContentWorkflowsManager
+from zope.app.workflow.instance import createProcessInstance
from zope.interface import implements, providedBy
from zope.app.container.contained import Contained
@@ -62,8 +61,6 @@
return
if IObjectCreatedEvent.providedBy(event):
- wfs = getService(self, Workflows)
-
# here we will lookup the configured processdefinitions
# for the newly created compoent. For every pd_name
# returned we will create a processinstance.
@@ -72,7 +69,7 @@
if pd_name in pi_container.keys():
continue
try:
- pi = wfs.createProcessInstance(pd_name)
+ pi = createProcessInstance(self, pd_name)
except KeyError:
# No registered PD with that name..
continue
@@ -102,7 +99,7 @@
def _getChannel(self, channel):
if channel is None:
- channel = getService(self, EventSubscription)
+ channel = zapi.getService(self, EventSubscription)
return channel
def getProcessDefinitionNamesForObject(self, object):
More information about the Zope3-Checkins
mailing list