Exemple #1
0
 def registerWorkFlowExecution(self, request, context):
     workflow_execution = transform_workflow_execution_meta(request.workflow_execution)
     response = self.store.register_workflow_execution(name=workflow_execution.name,
                                                       project_id=workflow_execution.project_id,
                                                       execution_state=workflow_execution.execution_state,
                                                       properties=workflow_execution.properties,
                                                       start_time=workflow_execution.start_time,
                                                       end_time=workflow_execution.end_time,
                                                       log_uri=workflow_execution.log_uri,
                                                       workflow_json=workflow_execution.workflow_json,
                                                       signature=workflow_execution.signature
                                                       )
     return _wrap_meta_response(MetaToProto.workflow_execution_meta_to_proto(response))
Exemple #2
0
 def updateWorkflowExecution(self, request, context):
     properties = None if request.properties == {} else request.properties
     execution_state = None if request.execution_state == 0 else State(StateProto.Name(request.execution_state))
     workflow_execution = self.store.update_workflow_execution(execution_name=request.name,
                                                               execution_state=execution_state,
                                                               project_id=request.project_id.value if request.HasField(
                                                                   'project_id') else None,
                                                               properties=properties,
                                                               end_time=request.end_time.value if request.HasField(
                                                                   'end_time') else None,
                                                               log_uri=request.log_uri_value if request.HasField(
                                                                   'log_uri') else None,
                                                               workflow_json=request.workjson.value if request.HasField(
                                                                   'workflow_json') else None,
                                                               signature=request.signature.value if request.HasField(
                                                                   'signature') else None)
     return _wrap_meta_response(MetaToProto.workflow_execution_meta_to_proto(workflow_execution))
Exemple #3
0
 def getWorkFlowExecutionByName(self, request, context):
     execution_meta = self.store.get_workflow_execution_by_name(request.name)
     return _wrap_meta_response(MetaToProto.workflow_execution_meta_to_proto(execution_meta))