"...daq_web_service/git@git.aps.anl.gov:hammonds/dm-docs.git" did not exist on "d90608064b4376ec501d44f71ba4bcf9708dd469"
Newer
Older
#!/usr/bin/env python
import cherrypy
import json
from dm.common.utility.encoder import Encoder
from dm.common.service.dmSessionController import DmSessionController
from dm.proc_web_service.service.impl.workflowSessionControllerImpl import WorkflowSessionControllerImpl
class WorkflowSessionController(DmSessionController):
def __init__(self):
DmSessionController.__init__(self)
self.workflowSessionControllerImpl = WorkflowSessionControllerImpl()
@cherrypy.expose
@DmSessionController.require(DmSessionController.canManageStation())
@DmSessionController.execute
def getWorkflowByName(self, owner, encodedName, **kwargs):
if not owner:
raise InvalidRequest('Invalid owner provided.')
name = Encoder.decode(encodedName)
if not name:
raise InvalidRequest('Invalid workflow name provided.')
response = self.workflowSessionControllerImpl.getWorkflowByName(owner, name).getFullJsonRep()
return response