Decision Steps
Binary and multi-outcome approval scenarios in Aptiwise workflows
Decision Steps
Decision steps are the most fundamental workflow component in Aptiwise, requiring human approval with either binary (approve/reject) or multi-outcome decision paths. They form the backbone of most approval processes.
📋 Overview
Decision steps pause workflow execution and wait for a designated approver to make a choice. The workflow then continues based on the decision made, allowing for flexible routing and process control.
🔄 Simple Binary Decision
The most common pattern: approve or reject with different outcomes for each choice.
Implementation
manager_approval:
name: "Manager Approval"
type: "decision"
description: "Manager reviews and approves request"
approver: "${requestor.manager}"
on_approve:
continue_to: "FinanceReview"
on_reject:
notify_requestor: "Request denied by manager"
end_workflow: trueKey Properties
approver: Who makes the decision (role, email, or dynamic reference)on_approve: Action when approved (continue to next step)on_reject: Action when rejected (typically end workflow)timeout: Optional SLA for decision making
🎯 Multi-Outcome Decisions
For complex scenarios requiring more than simple approve/reject choices:
Advanced Decision Implementation
triage_step:
name: "Triage Support Ticket"
type: "decision"
description: "Classify and route support request"
approver: "support_lead"
# Custom outcome options
on_technical:
text: "Assign to Technical Team"
continue_to: "TechnicalReview"
style: "primary"
on_billing:
text: "Assign to Billing"
continue_to: "BillingReview"
style: "secondary"
on_escalate:
text: "Escalate to Senior Support"
continue_to: "SeniorReview"
style: "warning"
on_close:
text: "Close as Duplicate"
style: "destructive"
notify_requestor: "Ticket closed as duplicate"
end_workflow: true👥 Approver Assignment Strategies
Static Role Assignment
finance_approval:
name: "Finance Approval"
type: "decision"
approver: "finance_manager" # Specific roleDynamic Hierarchy References
manager_approval:
name: "Manager Approval"
type: "decision"
approver: "${requestor.manager}" # User's direct managerEmail-Based Assignment
specialist_review:
name: "Specialist Review"
type: "decision"
approver: "specialist@company.com" # Specific emailConditional Approver Assignment
department_approval:
name: "Department Approval"
type: "decision"
approver: |
{% if department == 'engineering' %}
cto
{% elif department == 'finance' %}
cfo
{% else %}
department_head
{% endif %}⚡ Advanced Features
Approval Types
Different approval behaviors for various scenarios:
signature_required:
name: "Contract Signature"
type: "decision"
approval_type: "needs_to_sign" # Requires digital signature
approver: "legal_counsel"
recommendation_step:
name: "Advisory Review"
type: "decision"
approval_type: "needs_to_recommend" # Cannot block workflow
approver: "advisor"
acknowledgment_step:
name: "FYI Notification"
type: "decision"
approval_type: "needs_to_acknowledge" # Simple acknowledgment
approver: "stakeholder"Delegation and Backup Approvers
primary_approval:
name: "Primary Approval"
type: "decision"
approver: "primary_approver"
backup_approvers:
- "backup_approver_1"
- "backup_approver_2"
delegation_enabled: true
auto_delegate_after: "48_hours"Comments and Feedback
review_with_feedback:
name: "Review with Feedback"
type: "decision"
approver: "reviewer"
require_comments: true # Force comment on rejection
allow_comments: true # Allow optional comments
on_approve:
continue_to: "implementation"
on_request_changes:
text: "Request Changes"
continue_to: "revision"
require_comments: true
on_reject:
end_workflow: true🔄 Real-World Examples
Purchase Approval Chain
workflow:
# Step 1: Manager approval for all purchases
manager_approval:
name: "Manager Approval"
type: "decision"
approver: "${requestor.manager}"
on_approve:
continue_to: "amount_check"
on_reject:
notify_requestor: "Purchase request denied by manager"
end_workflow: true
# Step 2: Additional approvals based on amount
amount_check:
name: "Amount-based routing"
type: "conditional_split"
choices:
- conditions: "amount > 10000"
continue_to: "director_approval"
default:
continue_to: "procurement"
# Step 3: Director approval for high-value items
director_approval:
name: "Director Approval"
type: "decision"
approver: "${requestor.department_head}"
on_approve:
continue_to: "procurement"
on_reject:
notify_requestor: "High-value purchase denied by director"
end_workflow: trueHR Leave Request
leave_approval:
name: "Leave Request Approval"
type: "decision"
approver: "${requestor.manager}"
on_approve:
text: "Approve Leave"
continue_to: "hr_notification"
on_approve_partial:
text: "Approve with Modifications"
continue_to: "modification_review"
require_comments: true
on_reject:
text: "Deny Leave Request"
notify_requestor: "Leave request denied"
require_comments: true
end_workflow: true📊 Best Practices
Decision Step Design
- Clear Outcomes: Each decision path should have a clear, unambiguous purpose
- Meaningful Labels: Use descriptive text for custom outcome buttons
- Appropriate Styles: Use visual cues (colors) to indicate action severity
- Required Comments: Force explanations for rejections or complex decisions
Performance Optimization
- Timeout Settings: Set realistic SLAs for decision making
- Escalation Paths: Define backup approvers and delegation rules
- Notification Strategy: Balance urgency with notification fatigue
- Audit Trail: Ensure all decisions are properly logged
User Experience
- Mobile-Friendly: Ensure decision interfaces work on all devices
- Context Awareness: Provide sufficient information for informed decisions
- Batch Processing: Allow approvers to handle multiple similar requests efficiently
- Preview Mode: Let approvers see the full request before deciding
Next Steps:
- Learn about Conditional Routing for intelligent workflow paths
- Explore Parallel Approval for committee-based decisions
- See Real-World Examples of decision steps in action