pub struct WebhookSuccessCondition {
pub integration_rid: String,
pub delivery_config: Option<WebhookDeliveryConfig>,
pub event_type: String,
pub payload_template: String,
}Expand description
A webhook success condition that waits for external system approval via HTTP webhook. The step succeeds when the external system responds with 2xx status code.
Failure behavior:
- 4xx responses: Permanent failure, no retry (CLIENT_ERROR)
- 5xx responses: Retry with exponential backoff until max_retries (SERVER_ERROR_MAX_RETRIES_EXCEEDED)
- Network errors: Retry until max_retries (NETWORK_ERROR_MAX_RETRIES_EXCEEDED)
- Timeout: Retry until timeout_seconds exceeded (OVERALL_TIMEOUT_EXCEEDED)
- Redirects: Followed automatically, fails if redirect loop detected (REDIRECT_LOOP)
Fields§
§integration_rid: StringRID reference to a WebhookIntegration (the advanced integration type with HMAC signing)
delivery_config: Option<WebhookDeliveryConfig>Webhook delivery configuration. If not provided, server uses documented defaults.
event_type: StringEvent type to send (e.g., “procedure.step_waiting”)
payload_template: StringJSON payload template using Handlebars syntax (https://handlebarsjs.com/) Supports variable references using {{variable_name}} syntax:
- {{execution_rid}} - Procedure execution RID
- {{step_id}} - Current step ID
- {{step_name}} - Current step name/title
- {{procedure_name}} - Procedure name
- {{field_id}} - Any global form field value (e.g., {{environment}}, {{approval_level}})
- {{asset_rid}} - Asset RID if step has asset context
- {{asset_name}} - Asset name if step has asset context
Advanced features:
- Conditionals: {{#if environment}}production mode{{/if}}
- Loops: {{#each tags}}{{this}}{{/each}}
- Comparisons: {{#if (eq priority “HIGH”)}}urgent{{/if}}
- Default values: {{default environment “unknown”}}
Example template: { “event”: “approval_required”, “execution_id”: “{{execution_rid}}”, “step”: “{{step_name}}”, “environment”: “{{environment}}”, {{#if asset_name}} “asset”: “{{asset_name}}”, {{/if}} “is_production”: {{#if (eq environment “production”)}}true{{else}}false{{/if}} }
Variables that cannot be resolved will be replaced with empty string. Invalid JSON after template evaluation will cause the condition to fail with PAYLOAD_ERROR reason.
Trait Implementations§
Source§impl Clone for WebhookSuccessCondition
impl Clone for WebhookSuccessCondition
Source§fn clone(&self) -> WebhookSuccessCondition
fn clone(&self) -> WebhookSuccessCondition
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WebhookSuccessCondition
impl Debug for WebhookSuccessCondition
Source§impl Default for WebhookSuccessCondition
impl Default for WebhookSuccessCondition
Source§impl Message for WebhookSuccessCondition
impl Message for WebhookSuccessCondition
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for WebhookSuccessCondition
impl PartialEq for WebhookSuccessCondition
impl StructuralPartialEq for WebhookSuccessCondition
Auto Trait Implementations§
impl Freeze for WebhookSuccessCondition
impl RefUnwindSafe for WebhookSuccessCondition
impl Send for WebhookSuccessCondition
impl Sync for WebhookSuccessCondition
impl Unpin for WebhookSuccessCondition
impl UnwindSafe for WebhookSuccessCondition
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
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>
T in a tonic::Request