pub struct ModifyProcessInstanceRequest<T: ModifyProcessInstanceState> { /* private fields */ }Expand description
Request to modify a process instance by activating/terminating elements
This struct represents a request to modify a process instance in the Zeebe workflow engine. It allows for building and sending instructions to activate specific elements or terminate specific element instances within a process instance.
The request goes through different states during its construction:
Initial: The initial state where the process instance key is not yet set.WithProcessInstance: The state where the process instance key is set, and instructions can be added.
§Example
ⓘ
client
.modify_process_instance()
.with_process_instance_key(12345)
.with_activate_instruction("element_id".to_string(), 67890)
.with_variable_instruction("scope_id".to_string(), serde_json::json!({"key": "value"}))?
.build()
.with_terminate_instruction(54321)
.with_operation_reference(98765)
.send()
.await?;Implementations§
Source§impl ModifyProcessInstanceRequest<Initial>
impl ModifyProcessInstanceRequest<Initial>
Sourcepub fn with_process_instance_key(
self,
process_instance_key: i64,
) -> ModifyProcessInstanceRequest<WithProcessInstance>
pub fn with_process_instance_key( self, process_instance_key: i64, ) -> ModifyProcessInstanceRequest<WithProcessInstance>
Source§impl ModifyProcessInstanceRequest<WithProcessInstance>
impl ModifyProcessInstanceRequest<WithProcessInstance>
Sourcepub fn with_activate_instruction(
self,
element_id: String,
ancestor_element_instance_key: i64,
) -> ActivateInstructionBuilder
pub fn with_activate_instruction( self, element_id: String, ancestor_element_instance_key: i64, ) -> ActivateInstructionBuilder
Sourcepub fn with_terminate_instruction(self, element_instance_key: i64) -> Self
pub fn with_terminate_instruction(self, element_instance_key: i64) -> Self
Sourcepub fn with_terminate_instructions(
self,
element_instance_keys: Vec<i64>,
) -> Self
pub fn with_terminate_instructions( self, element_instance_keys: Vec<i64>, ) -> Self
Sourcepub async fn send(self) -> Result<ModifyProcessInstanceResponse, ClientError>
pub async fn send(self) -> Result<ModifyProcessInstanceResponse, ClientError>
Sourcepub fn with_operation_reference(self, operation_reference: u64) -> Self
pub fn with_operation_reference(self, operation_reference: u64) -> Self
Trait Implementations§
Source§impl<T: Clone + ModifyProcessInstanceState> Clone for ModifyProcessInstanceRequest<T>
impl<T: Clone + ModifyProcessInstanceState> Clone for ModifyProcessInstanceRequest<T>
Source§fn clone(&self) -> ModifyProcessInstanceRequest<T>
fn clone(&self) -> ModifyProcessInstanceRequest<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> !Freeze for ModifyProcessInstanceRequest<T>
impl<T> !RefUnwindSafe for ModifyProcessInstanceRequest<T>
impl<T> Send for ModifyProcessInstanceRequest<T>where
T: Send,
impl<T> Sync for ModifyProcessInstanceRequest<T>where
T: Sync,
impl<T> Unpin for ModifyProcessInstanceRequest<T>where
T: Unpin,
impl<T> !UnwindSafe for ModifyProcessInstanceRequest<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request