Skip to main content

update_workflow_attributes

Function update_workflow_attributes 

Source
pub fn update_workflow_attributes<'a, E: DurableError + 'a>(
    workflow_id: &'a str,
    attributes: Option<&Map<String, Value>>,
) -> PendingStep<'a, (), E> ⓘ
Expand description

Replaces a workflow’s attributes, or clears them with None, from inside another workflow.

The free form of DBOS::update_workflow_attributes, for a workflow body with no DBOS to call it on — see cancel_workflow for why it should not capture one. Checkpointed under DBOS.updateWorkflowAttributes, as the method is, so a refusal for a missing workflow replays as the same refusal. A replacement, not a merge: merge_workflow_attributes adds keys.

Error::NotInWorkflow outside a workflow; plain inside a step. The error is the workflow’s channel.