pub struct WorkflowHandle {
pub workflow_id: String,
pub run_id: Option<String>,
pub workflow_type: String,
/* private fields */
}Fields§
§workflow_id: String§run_id: Option<String>§workflow_type: StringImplementations§
Source§impl WorkflowHandle
impl WorkflowHandle
Sourcepub async fn request_cancellation(
&self,
options: CooperativeCancellationOptions,
) -> Result<WorkflowCancellationRequest>
pub async fn request_cancellation( &self, options: CooperativeCancellationOptions, ) -> Result<WorkflowCancellationRequest>
Request bounded cleanup for whichever run is current.
Sourcepub async fn request_selected_run_cancellation(
&self,
options: CooperativeCancellationOptions,
) -> Result<WorkflowCancellationRequest>
pub async fn request_selected_run_cancellation( &self, options: CooperativeCancellationOptions, ) -> Result<WorkflowCancellationRequest>
Request bounded cleanup only while this handle’s selected run is current.
Source§impl WorkflowHandle
impl WorkflowHandle
Sourcepub async fn get_activities(&self) -> Result<WorkflowActivityList>
pub async fn get_activities(&self) -> Result<WorkflowActivityList>
Inspect the run originally selected by this handle.
A handle without a run ID refuses before sending a request. Use
Client::get_run_activities to select a historical run explicitly.
Source§impl WorkflowHandle
impl WorkflowHandle
Sourcepub async fn update_outcome(
&self,
update_id: &str,
wait_timeout_seconds: Option<u64>,
) -> Result<Value>
pub async fn update_outcome( &self, update_id: &str, wait_timeout_seconds: Option<u64>, ) -> Result<Value>
Read one of this workflow’s accepted updates by update id; see
Client::update_outcome.
Sourcepub async fn update_outcome_avro_value(
&self,
update_id: &str,
wait_timeout_seconds: Option<u64>,
) -> Result<AvroValue>
pub async fn update_outcome_avro_value( &self, update_id: &str, wait_timeout_seconds: Option<u64>, ) -> Result<AvroValue>
Read one of this workflow’s accepted updates by update id with a
bytes-capable Avro result; see Client::update_outcome_avro_value.
Source§impl WorkflowHandle
impl WorkflowHandle
Sourcepub async fn describe(&self) -> Result<WorkflowDescription>
pub async fn describe(&self) -> Result<WorkflowDescription>
Describe whichever run is current for this stable workflow instance.
Sourcepub async fn describe_selected_run(&self) -> Result<WorkflowDescription>
pub async fn describe_selected_run(&self) -> Result<WorkflowDescription>
Describe the run identity originally selected by this handle.
Sourcepub async fn signal<T: Serialize>(
&self,
signal_name: &str,
input: T,
) -> Result<Value>
pub async fn signal<T: Serialize>( &self, signal_name: &str, input: T, ) -> Result<Value>
Signal this workflow with an SDK-generated caller command key.
Sourcepub async fn signal_with_request_id<T: Serialize>(
&self,
signal_name: &str,
input: T,
request_id: &str,
) -> Result<Value>
pub async fn signal_with_request_id<T: Serialize>( &self, signal_name: &str, input: T, request_id: &str, ) -> Result<Value>
Signal this workflow with an explicit caller command key (1 to 255 Unicode characters).
pub async fn append_message<T: Serialize>( &self, stream_name: &str, message_id: &str, input: T, ) -> Result<Value>
Sourcepub async fn signal_selected_run<T: Serialize>(
&self,
signal_name: &str,
input: T,
) -> Result<Value>
pub async fn signal_selected_run<T: Serialize>( &self, signal_name: &str, input: T, ) -> Result<Value>
Signal only if this handle’s selected run is still current, with an SDK-generated caller command key.
Sourcepub async fn signal_selected_run_with_request_id<T: Serialize>(
&self,
signal_name: &str,
input: T,
request_id: &str,
) -> Result<Value>
pub async fn signal_selected_run_with_request_id<T: Serialize>( &self, signal_name: &str, input: T, request_id: &str, ) -> Result<Value>
Signal only if this handle’s selected run is still current, with an explicit caller command key (1 to 255 Unicode characters).
Sourcepub async fn cancel(
&self,
options: WorkflowCommandOptions,
) -> Result<WorkflowCommandResult>
pub async fn cancel( &self, options: WorkflowCommandOptions, ) -> Result<WorkflowCommandResult>
Close whichever run is current as cancelled, without workflow cleanup.
Sourcepub async fn cancel_selected_run(
&self,
options: WorkflowCommandOptions,
) -> Result<WorkflowCommandResult>
pub async fn cancel_selected_run( &self, options: WorkflowCommandOptions, ) -> Result<WorkflowCommandResult>
Request cancellation only if this handle’s selected run is still current.
Sourcepub async fn terminate(
&self,
options: WorkflowCommandOptions,
) -> Result<WorkflowCommandResult>
pub async fn terminate( &self, options: WorkflowCommandOptions, ) -> Result<WorkflowCommandResult>
Forcefully terminate whichever run is current.
Sourcepub async fn terminate_selected_run(
&self,
options: WorkflowCommandOptions,
) -> Result<WorkflowCommandResult>
pub async fn terminate_selected_run( &self, options: WorkflowCommandOptions, ) -> Result<WorkflowCommandResult>
Terminate only if this handle’s selected run is still current.
Sourcepub async fn redrive(
&self,
request_id: Option<&str>,
) -> Result<WorkflowRedriveResult>
pub async fn redrive( &self, request_id: Option<&str>, ) -> Result<WorkflowRedriveResult>
Continue this handle’s failed run without repeating completed activities.
Sourcepub async fn query<T: Serialize>(
&self,
query_name: &str,
input: T,
) -> Result<Value>
pub async fn query<T: Serialize>( &self, query_name: &str, input: T, ) -> Result<Value>
Execute a named, read-only query against this workflow.
pub async fn query_avro_value<T: Serialize>( &self, query_name: &str, input: T, ) -> Result<AvroValue>
pub async fn update<T: Serialize>( &self, update_name: &str, input: T, request_id: Option<&str>, ) -> Result<Value>
pub async fn update_avro_value<T: Serialize>( &self, update_name: &str, input: T, request_id: Option<&str>, ) -> Result<AvroValue>
Sourcepub async fn query_selected_run<T: Serialize>(
&self,
query_name: &str,
input: T,
) -> Result<Value>
pub async fn query_selected_run<T: Serialize>( &self, query_name: &str, input: T, ) -> Result<Value>
Query only if this handle’s selected run is still current.
Sourcepub async fn result(&self, options: WorkflowResultOptions) -> Result<Value>
pub async fn result(&self, options: WorkflowResultOptions) -> Result<Value>
Await the final terminal outcome of the current continue-as-new chain.
Sourcepub async fn result_avro_value(
&self,
options: WorkflowResultOptions,
) -> Result<AvroValue>
pub async fn result_avro_value( &self, options: WorkflowResultOptions, ) -> Result<AvroValue>
Await the final result without projecting Avro bytes through JSON.
Sourcepub async fn result_typed<T: DeserializeOwned>(
&self,
options: WorkflowResultOptions,
) -> Result<T>
pub async fn result_typed<T: DeserializeOwned>( &self, options: WorkflowResultOptions, ) -> Result<T>
Await the final result and decode it into a Serde application type.
Sourcepub async fn result_selected_run(
&self,
options: WorkflowResultOptions,
) -> Result<Value>
pub async fn result_selected_run( &self, options: WorkflowResultOptions, ) -> Result<Value>
Await only the run identity originally selected by this handle.
Sourcepub async fn result_selected_run_avro_value(
&self,
options: WorkflowResultOptions,
) -> Result<AvroValue>
pub async fn result_selected_run_avro_value( &self, options: WorkflowResultOptions, ) -> Result<AvroValue>
Await the selected run’s result on the lossless Avro Value surface.
Sourcepub async fn result_selected_run_typed<T: DeserializeOwned>(
&self,
options: WorkflowResultOptions,
) -> Result<T>
pub async fn result_selected_run_typed<T: DeserializeOwned>( &self, options: WorkflowResultOptions, ) -> Result<T>
Await the selected run and decode its result into a Serde type.
Trait Implementations§
Source§impl Clone for WorkflowHandle
impl Clone for WorkflowHandle
Source§fn clone(&self) -> WorkflowHandle
fn clone(&self) -> WorkflowHandle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more