Portal Community

Any Strategy

Approval: The first actor to approve immediately completes the approval — all remaining HIL tasks are cancelled. Execution resumes on the approved port.

Rejection: A single rejection does NOT abort. The workflow waits for an approval from any remaining actor. Only if ALL actors reject does the approval fail.

// ApprovalStateTracker.EvaluateAny()
bool isApproved = decisions.Any(d => d.Decision == ApprovalDecision.Approved);
bool isRejected = decisions.All(d => d.Decision == ApprovalDecision.Rejected);

Use case: Approval pool where any available manager can sign off — the fastest responder wins.

All Strategy

Approval: All actors must approve. The approval completes only when every actor has voted Approved.

Rejection: Any single rejection immediately fails the approval. Remaining tasks are cancelled.

// ApprovalStateTracker.EvaluateAll()
bool isApproved = decisions.Count == totalApprovers
                  && decisions.All(d => d.Decision == ApprovalDecision.Approved);
bool isRejected = decisions.Any(d => d.Decision == ApprovalDecision.Rejected);

Use case: Regulatory compliance where Finance AND Legal AND Management must all sign off.

Quorum Strategy

Approval: N of M actors must approve. Configure quorumCount (absolute) or quorumPercent (fraction).

Rejection: If enough rejections make quorum mathematically impossible — e.g., with 3 of 5 required and 3 already rejected — the approval fails early.

// ApprovalStateTracker.EvaluateQuorum()
int required  = settings.QuorumCount ?? (int)Math.Ceiling(totalApprovers * settings.QuorumPercent!.Value);
int approved  = decisions.Count(d => d.Decision == ApprovalDecision.Approved);
int rejected  = decisions.Count(d => d.Decision == ApprovalDecision.Rejected);
int remaining = totalApprovers - decisions.Count;

bool isApproved = approved >= required;
bool isRejected = (approved + remaining) < required;  // cannot reach quorum

Use case: Board committee where 3 of 5 board members must vote approve.

Strategy Comparison

Scenario (5 approvers)AnyAllQuorum (3/5)
1 approves, 4 pendingApprovedStill waitingStill waiting
1 rejects, 4 pendingStill waitingRejectedStill waiting
3 approve, 2 pendingApprovedStill waitingApproved
3 reject, 2 pendingStill waitingRejectedRejected (impossible)
5 rejectRejectedRejectedRejected