WorkflowClientTrait

Trait WorkflowClientTrait 

Source
pub trait WorkflowClientTrait: NamespacedClient {
Show 21 methods // Required methods fn start_workflow<'life0, 'async_trait>( &'life0 self, input: Vec<Payload>, task_queue: String, workflow_id: String, workflow_type: String, request_id: Option<String>, options: WorkflowOptions, ) -> Pin<Box<dyn Future<Output = Result<StartWorkflowExecutionResponse, Status>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn reset_sticky_task_queue<'life0, 'async_trait>( &'life0 self, workflow_id: String, run_id: String, ) -> Pin<Box<dyn Future<Output = Result<ResetStickyTaskQueueResponse, Status>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn complete_activity_task<'life0, 'async_trait>( &'life0 self, task_token: TaskToken, result: Option<Payloads>, ) -> Pin<Box<dyn Future<Output = Result<RespondActivityTaskCompletedResponse, Status>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn record_activity_heartbeat<'life0, 'async_trait>( &'life0 self, task_token: TaskToken, details: Option<Payloads>, ) -> Pin<Box<dyn Future<Output = Result<RecordActivityTaskHeartbeatResponse, Status>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn cancel_activity_task<'life0, 'async_trait>( &'life0 self, task_token: TaskToken, details: Option<Payloads>, ) -> Pin<Box<dyn Future<Output = Result<RespondActivityTaskCanceledResponse, Status>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn signal_workflow_execution<'life0, 'async_trait>( &'life0 self, workflow_id: String, run_id: String, signal_name: String, payloads: Option<Payloads>, request_id: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<SignalWorkflowExecutionResponse, Status>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn signal_with_start_workflow_execution<'life0, 'async_trait>( &'life0 self, options: SignalWithStartOptions, workflow_options: WorkflowOptions, ) -> Pin<Box<dyn Future<Output = Result<SignalWithStartWorkflowExecutionResponse, Status>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn query_workflow_execution<'life0, 'async_trait>( &'life0 self, workflow_id: String, run_id: String, query: WorkflowQuery, ) -> Pin<Box<dyn Future<Output = Result<QueryWorkflowResponse, Status>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn describe_workflow_execution<'life0, 'async_trait>( &'life0 self, workflow_id: String, run_id: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<DescribeWorkflowExecutionResponse, Status>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn get_workflow_execution_history<'life0, 'async_trait>( &'life0 self, workflow_id: String, run_id: Option<String>, page_token: Vec<u8>, ) -> Pin<Box<dyn Future<Output = Result<GetWorkflowExecutionHistoryResponse, Status>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn cancel_workflow_execution<'life0, 'async_trait>( &'life0 self, workflow_id: String, run_id: Option<String>, reason: String, request_id: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<RequestCancelWorkflowExecutionResponse, Status>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn terminate_workflow_execution<'life0, 'async_trait>( &'life0 self, workflow_id: String, run_id: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<TerminateWorkflowExecutionResponse, Status>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn register_namespace<'life0, 'async_trait>( &'life0 self, options: RegisterNamespaceOptions, ) -> Pin<Box<dyn Future<Output = Result<RegisterNamespaceResponse, Status>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn list_namespaces<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<ListNamespacesResponse, Status>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn describe_namespace<'life0, 'async_trait>( &'life0 self, namespace: Namespace, ) -> Pin<Box<dyn Future<Output = Result<DescribeNamespaceResponse, Status>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn list_open_workflow_executions<'life0, 'async_trait>( &'life0 self, max_page_size: i32, next_page_token: Vec<u8>, start_time_filter: Option<StartTimeFilter>, filters: Option<Filters>, ) -> Pin<Box<dyn Future<Output = Result<ListOpenWorkflowExecutionsResponse, Status>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn list_closed_workflow_executions<'life0, 'async_trait>( &'life0 self, max_page_size: i32, next_page_token: Vec<u8>, start_time_filter: Option<StartTimeFilter>, filters: Option<Filters>, ) -> Pin<Box<dyn Future<Output = Result<ListClosedWorkflowExecutionsResponse, Status>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn list_workflow_executions<'life0, 'async_trait>( &'life0 self, page_size: i32, next_page_token: Vec<u8>, query: String, ) -> Pin<Box<dyn Future<Output = Result<ListWorkflowExecutionsResponse, Status>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn list_archived_workflow_executions<'life0, 'async_trait>( &'life0 self, page_size: i32, next_page_token: Vec<u8>, query: String, ) -> Pin<Box<dyn Future<Output = Result<ListArchivedWorkflowExecutionsResponse, Status>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn get_search_attributes<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetSearchAttributesResponse, Status>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn update_workflow_execution<'life0, 'async_trait>( &'life0 self, workflow_id: String, run_id: String, name: String, wait_policy: WaitPolicy, args: Option<Payloads>, ) -> Pin<Box<dyn Future<Output = Result<UpdateWorkflowExecutionResponse, Status>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait;
}
Expand description

This trait provides higher-level friendlier interaction with the server. See the WorkflowService trait for a lower-level client.

Required Methods§

Source

fn start_workflow<'life0, 'async_trait>( &'life0 self, input: Vec<Payload>, task_queue: String, workflow_id: String, workflow_type: String, request_id: Option<String>, options: WorkflowOptions, ) -> Pin<Box<dyn Future<Output = Result<StartWorkflowExecutionResponse, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Starts workflow execution.

Source

fn reset_sticky_task_queue<'life0, 'async_trait>( &'life0 self, workflow_id: String, run_id: String, ) -> Pin<Box<dyn Future<Output = Result<ResetStickyTaskQueueResponse, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Notifies the server that workflow tasks for a given workflow should be sent to the normal non-sticky task queue. This normally happens when workflow has been evicted from the cache.

Source

fn complete_activity_task<'life0, 'async_trait>( &'life0 self, task_token: TaskToken, result: Option<Payloads>, ) -> Pin<Box<dyn Future<Output = Result<RespondActivityTaskCompletedResponse, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Complete activity task by sending response to the server. task_token contains activity identifier that would’ve been received from polling for an activity task. result is a blob that contains activity response.

Source

fn record_activity_heartbeat<'life0, 'async_trait>( &'life0 self, task_token: TaskToken, details: Option<Payloads>, ) -> Pin<Box<dyn Future<Output = Result<RecordActivityTaskHeartbeatResponse, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Report activity task heartbeat by sending details to the server. task_token contains activity identifier that would’ve been received from polling for an activity task. result contains cancel_requested flag, which if set to true indicates that activity has been cancelled.

Source

fn cancel_activity_task<'life0, 'async_trait>( &'life0 self, task_token: TaskToken, details: Option<Payloads>, ) -> Pin<Box<dyn Future<Output = Result<RespondActivityTaskCanceledResponse, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Cancel activity task by sending response to the server. task_token contains activity identifier that would’ve been received from polling for an activity task. details is a blob that provides arbitrary user defined cancellation info.

Source

fn signal_workflow_execution<'life0, 'async_trait>( &'life0 self, workflow_id: String, run_id: String, signal_name: String, payloads: Option<Payloads>, request_id: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<SignalWorkflowExecutionResponse, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Send a signal to a certain workflow instance

Source

fn signal_with_start_workflow_execution<'life0, 'async_trait>( &'life0 self, options: SignalWithStartOptions, workflow_options: WorkflowOptions, ) -> Pin<Box<dyn Future<Output = Result<SignalWithStartWorkflowExecutionResponse, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Send signal and start workflow transcationally

Source

fn query_workflow_execution<'life0, 'async_trait>( &'life0 self, workflow_id: String, run_id: String, query: WorkflowQuery, ) -> Pin<Box<dyn Future<Output = Result<QueryWorkflowResponse, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Request a query of a certain workflow instance

Source

fn describe_workflow_execution<'life0, 'async_trait>( &'life0 self, workflow_id: String, run_id: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<DescribeWorkflowExecutionResponse, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Get information about a workflow run

Source

fn get_workflow_execution_history<'life0, 'async_trait>( &'life0 self, workflow_id: String, run_id: Option<String>, page_token: Vec<u8>, ) -> Pin<Box<dyn Future<Output = Result<GetWorkflowExecutionHistoryResponse, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Get history for a particular workflow run

Source

fn cancel_workflow_execution<'life0, 'async_trait>( &'life0 self, workflow_id: String, run_id: Option<String>, reason: String, request_id: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<RequestCancelWorkflowExecutionResponse, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Cancel a currently executing workflow

Source

fn terminate_workflow_execution<'life0, 'async_trait>( &'life0 self, workflow_id: String, run_id: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<TerminateWorkflowExecutionResponse, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Terminate a currently executing workflow

Source

fn register_namespace<'life0, 'async_trait>( &'life0 self, options: RegisterNamespaceOptions, ) -> Pin<Box<dyn Future<Output = Result<RegisterNamespaceResponse, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Register a new namespace

Source

fn list_namespaces<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<ListNamespacesResponse, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Lists all available namespaces

Source

fn describe_namespace<'life0, 'async_trait>( &'life0 self, namespace: Namespace, ) -> Pin<Box<dyn Future<Output = Result<DescribeNamespaceResponse, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Query namespace details

Source

fn list_open_workflow_executions<'life0, 'async_trait>( &'life0 self, max_page_size: i32, next_page_token: Vec<u8>, start_time_filter: Option<StartTimeFilter>, filters: Option<Filters>, ) -> Pin<Box<dyn Future<Output = Result<ListOpenWorkflowExecutionsResponse, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

List open workflow executions with Standard Visibility filtering

Source

fn list_closed_workflow_executions<'life0, 'async_trait>( &'life0 self, max_page_size: i32, next_page_token: Vec<u8>, start_time_filter: Option<StartTimeFilter>, filters: Option<Filters>, ) -> Pin<Box<dyn Future<Output = Result<ListClosedWorkflowExecutionsResponse, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

List closed workflow executions Standard Visibility filtering

Source

fn list_workflow_executions<'life0, 'async_trait>( &'life0 self, page_size: i32, next_page_token: Vec<u8>, query: String, ) -> Pin<Box<dyn Future<Output = Result<ListWorkflowExecutionsResponse, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

List workflow executions with Advanced Visibility filtering

Source

fn list_archived_workflow_executions<'life0, 'async_trait>( &'life0 self, page_size: i32, next_page_token: Vec<u8>, query: String, ) -> Pin<Box<dyn Future<Output = Result<ListArchivedWorkflowExecutionsResponse, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

List archived workflow executions

Source

fn get_search_attributes<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetSearchAttributesResponse, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Get Cluster Search Attributes

Source

fn update_workflow_execution<'life0, 'async_trait>( &'life0 self, workflow_id: String, run_id: String, name: String, wait_policy: WaitPolicy, args: Option<Payloads>, ) -> Pin<Box<dyn Future<Output = Result<UpdateWorkflowExecutionResponse, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Send an Update to a workflow execution

Implementors§

Source§

impl<T> WorkflowClientTrait for T
where T: RawClientLike + NamespacedClient + Clone + Send + Sync + 'static, <T as RawClientLike>::SvcType: GrpcService<Body> + Send + Clone + 'static, <<T as RawClientLike>::SvcType as GrpcService<Body>>::ResponseBody: Body<Data = Bytes> + Send + 'static, <<T as RawClientLike>::SvcType as GrpcService<Body>>::Error: Into<Box<dyn Error + Sync + Send>>, <<T as RawClientLike>::SvcType as GrpcService<Body>>::Future: Send, <<<T as RawClientLike>::SvcType as GrpcService<Body>>::ResponseBody as Body>::Error: Into<Box<dyn Error + Sync + Send>> + Send,