Skip to main content

approve_current

Function approve_current 

Source
pub async fn approve_current(
    pool: &Pool,
    state: &mut WorkflowState,
    tasks: &[WorkflowTask],
    decided_by: i64,
    comment: &str,
) -> Result<ApproveOutcome, ExecError>
Expand description

Approve the current task on a WorkflowState. Marks the in-flight TaskState Approved, advances to the next task (or finishes the workflow when no next task exists).

ยงErrors

Driver / query failures.