pub struct ActionIntent {Show 17 fields
pub id: String,
pub tenant_id: TenantId,
pub instance_id: InstanceId,
pub run_id: RunId,
pub capability: CapabilityPin,
pub idempotency_key: String,
pub state: ActionState,
pub input: Value,
pub effect: Effect,
pub retry_class: IdempotencyMode,
pub control_epochs: ControlEpochs,
pub resource_scope_id: String,
pub lease_epoch: i64,
pub action_epoch: i64,
pub deadline: Option<DateTime<Utc>>,
pub reservation: Option<ResourceReservationRef>,
pub created_at: DateTime<Utc>,
}Expand description
Durable intent to perform one external effect, created inside a fenced transition.
Fields§
§id: StringStable identifier of this record.
tenant_id: TenantIdTenant that owns this record.
instance_id: InstanceIdWorkflow instance this record refers to.
run_id: RunIdRun this record belongs to.
capability: CapabilityPinPinned capability (id, contract version, content digest).
idempotency_key: StringCaller-supplied key that makes repeated submissions return the first result.
state: ActionStateCurrent lifecycle state.
input: ValueStructured input handed to the provider.
effect: EffectSide-effect class of the action.
retry_class: IdempotencyModeIdempotency class that decides whether automatic retry is safe.
control_epochs: ControlEpochsControl epochs at creation.
resource_scope_id: StringResource the effect targets; empty when unscoped.
lease_epoch: i64Instance lease version at creation.
action_epoch: i64Bumped on every claim; fences claim owners.
deadline: Option<DateTime<Utc>>Latest time by which the work must finish.
reservation: Option<ResourceReservationRef>Fenced reservation for funds actions.
created_at: DateTime<Utc>When the record was created (database time).
Implementations§
Source§impl ActionIntent
impl ActionIntent
Sourcepub fn validate(&self) -> Result<(), ContractError>
pub fn validate(&self) -> Result<(), ContractError>
Check this contract’s invariants; returns the first violation.
Sourcepub fn validate_prepared(&self) -> Result<(), ContractError>
pub fn validate_prepared(&self) -> Result<(), ContractError>
Validate an intent at the only creation boundary. Later states are reached exclusively through the fenced store transition.
Trait Implementations§
Source§impl Clone for ActionIntent
impl Clone for ActionIntent
Source§fn clone(&self) -> ActionIntent
fn clone(&self) -> ActionIntent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more