def subworkflow_invoker(self, trans, step, use_cached_job=False): subworkflow_invocation = self._subworkflow_invocation(step) workflow_run_config = workflow_request_to_run_config(trans, subworkflow_invocation) subworkflow_progress = self.subworkflow_progress(subworkflow_invocation, step, workflow_run_config.param_map) subworkflow_invocation = subworkflow_progress.workflow_invocation return WorkflowInvoker( trans, workflow=subworkflow_invocation.workflow, workflow_run_config=workflow_run_config, progress=subworkflow_progress, )
def schedule(self, workflow_invocation): workflow = workflow_invocation.workflow history = workflow_invocation.history request_context = context.WorkRequestContext( app=self.app, history=history, user=history.user) # trans-like object not tied to a web-thread. workflow_run_config = run_request.workflow_request_to_run_config( request_context, workflow_invocation) run.schedule( trans=request_context, workflow=workflow, workflow_run_config=workflow_run_config, workflow_invocation=workflow_invocation, )
def schedule( self, workflow_invocation ): workflow = workflow_invocation.workflow history = workflow_invocation.history request_context = context.WorkRequestContext( app=self.app, history=history, user=history.user ) # trans-like object not tied to a web-thread. workflow_run_config = run_request.workflow_request_to_run_config( request_context, workflow_invocation ) run.schedule( trans=request_context, workflow=workflow, workflow_run_config=workflow_run_config, workflow_invocation=workflow_invocation, )