예제 #1
0
    def resume(self):
        # Resume the target workflow.
        wf_svc.request_resume(self.execution)

        # Request resume of tasks that are workflows and still running.
        for child_ex_id in self.execution.children:
            child_ex = ex_db_access.ActionExecution.get(id=child_ex_id)
            if (child_ex.runner['name'] in ac_const.WORKFLOW_RUNNER_TYPES
                    and child_ex.status == ac_const.LIVEACTION_STATUS_PAUSED):
                ac_svc.request_resume(
                    lv_db_access.LiveAction.get(id=child_ex.liveaction['id']),
                    self.context.get('user', None))

        return (ac_const.LIVEACTION_STATUS_RUNNING, self.liveaction.result,
                self.liveaction.context)
예제 #2
0
    def resume(self):
        # Resume the target workflow.
        wf_svc.request_resume(self.execution)

        # Request resume of tasks that are workflows and still running.
        for child_ex_id in self.execution.children:
            child_ex = ex_db_access.ActionExecution.get(id=child_ex_id)
            if (child_ex.runner['name'] in ac_const.WORKFLOW_RUNNER_TYPES and
                    child_ex.status == ac_const.LIVEACTION_STATUS_PAUSED):
                ac_svc.request_resume(
                    lv_db_access.LiveAction.get(id=child_ex.liveaction['id']),
                    self.context.get('user', None)
                )

        return (
            ac_const.LIVEACTION_STATUS_RUNNING,
            self.liveaction.result,
            self.liveaction.context
        )
예제 #3
0
    def resume(self):
        # Resume the target workflow.
        wf_ex_db = wf_svc.request_resume(self.execution)

        # Request resume of tasks that are workflows and still running.
        for child_ex_id in self.execution.children:
            child_ex = ex_db_access.ActionExecution.get(id=child_ex_id)
            if self.task_resumeable(child_ex):
                ac_svc.request_resume(
                    lv_db_access.LiveAction.get(id=child_ex.liveaction['id']),
                    self.context.get('user', None))

        return (wf_ex_db.status
                if wf_ex_db else ac_const.LIVEACTION_STATUS_RUNNING,
                self.liveaction.result, self.liveaction.context)
예제 #4
0
    def resume(self):
        # Resume the target workflow.
        wf_ex_db = wf_svc.request_resume(self.execution)

        # Request resume of tasks that are workflows and still running.
        for child_ex_id in self.execution.children:
            child_ex = ex_db_access.ActionExecution.get(id=child_ex_id)
            if self.task_resumeable(child_ex):
                ac_svc.request_resume(
                    lv_db_access.LiveAction.get(id=child_ex.liveaction['id']),
                    self.context.get('user', None)
                )

        return (
            wf_ex_db.status if wf_ex_db else ac_const.LIVEACTION_STATUS_RUNNING,
            self.liveaction.result,
            self.liveaction.context
        )