from zope.wfmc import interfaces from zope.wfmc.attributeintegration import AttributeIntegration from zope.component import adapts, provideUtility # ict_ok.org imports from org.ict_ok.admin_utils.notifier.notifier import NotifyUserEvent path_splits = os.environ['PYTHONPATH'].split(':') for path_split in path_splits: if os.path.exists(path_split + \ '/org/ict_ok/components/host/wf/host_nagios.xpdl'): xpdl_filename = path_split + \ '/org/ict_ok/components/host/wf/host_nagios.xpdl' break package = xpdl.read(open(xpdl_filename)) class Participant(Persistent): adapts(interfaces.IActivity) implements(interfaces.IParticipant) def __init__(self, activity): self.activity = activity self.worklist = [] class User: def __init__(self): self.work_list = []
# #TODO Clean up # phython imports # zope imports import zope.event import zope.interface from zope.wfmc import interfaces from zope.interface import implements from zope.wfmc import xpdl #package = xpdl.read(open("/home/markus/Projekte/ICT_Ok-hp/service/wf/service_nagios.xpdl")) #package = xpdl.read(open("./service_nagios.xpdl")) package = xpdl.read( open("./lib/python/org/ict_ok/components/service/wf/service_nagios.xpdl")) def log_workflow(event): print event work_list = [] class Participant(object): zope.component.adapts(interfaces.IActivity) zope.interface.implements(interfaces.IParticipant) def __init__(self, activity): self.activity = activity
# phython imports from persistent import Persistent # zope imports from zope.location.location import Location from zope.interface import implements from zope.event import notify from zope.wfmc import xpdl from zope.wfmc import interfaces from zope.wfmc.attributeintegration import AttributeIntegration from zope.component import adapts, provideUtility # ict_ok.org imports from org.ict_ok.admin_utils.notifier.notifier import NotifyUserEvent package = xpdl.read( open("./lib/python/org/ict_ok/components/host/wf/host_nagios.xpdl")) class Participant(Persistent): adapts(interfaces.IActivity) implements(interfaces.IParticipant) def __init__(self, activity): self.activity = activity self.worklist = [] class User: def __init__(self): self.work_list = []
# zope imports from zope.location.location import Location from zope.interface import implements from zope.event import notify from zope.wfmc import xpdl from zope.wfmc import interfaces from zope.wfmc.attributeintegration import AttributeIntegration from zope.component import adapts, provideUtility from zope.app.appsetup import appsetup # ict_ok.org imports from org.ict_ok.admin_utils.notifier.notifier import NotifyUserEvent lenDirName = len('etc/site.zcml') * -1 instDirName = appsetup.getConfigSource()[:lenDirName] package = xpdl.read(open(instDirName + \ "lib/python/org/ict_ok/components/host/wf/host_nagios.xpdl")) class Participant(Persistent): adapts(interfaces.IActivity) implements(interfaces.IParticipant) def __init__(self, activity): self.activity = activity self.worklist = [] class User: def __init__(self): self.work_list = []
#TODO Clean up # phython imports # zope imports import zope.event import zope.interface from zope.wfmc import interfaces from zope.interface import implements from zope.wfmc import xpdl from zope.app.appsetup import appsetup lenDirName = len('etc/site.zcml') * -1 instDirName = appsetup.getConfigSource()[:lenDirName] package = xpdl.read(open(instDirName + \ "lib/python/org/ict_ok/components/service/wf/service_nagios.xpdl")) def log_workflow(event): print event work_list = [] class Participant(object): zope.component.adapts(interfaces.IActivity) zope.interface.implements(interfaces.IParticipant) def __init__(self, activity): self.activity = activity