Workflow Automation¶
Archivus workflow automation uses DAG (Directed Acyclic Graph) orchestration to power complex intelligence pipelines. Combine AI processing, human review, and external integrations in reliable, scalable workflows.
What Are DAG Workflows?¶
Team+
Directed Acyclic Graph (DAG):
- Directed: Steps flow in specific order
- Acyclic: No circular dependencies
- Graph: Visual representation of workflow
Benefits:
- Automatic dependency management
- Parallel execution when possible
- Fail-fast error handling
- Complete audit trails
- Scalable to enterprise volumes
24 Production Node Types¶
Workflows combine different node types:
AI Nodes (6 types)¶
- AI Analyze: Structured analysis with custom prompts
- AI Summarize: Generate summaries (quick or comprehensive)
- AI Extract: Pull specific fields or entities
- AI Classify: Determine document type or category
- AI Compare: Side-by-side document comparison
- AI Generate: Create reports or documents
Human Interaction (3 types)¶
- Human Approval: Yes/no decision with timeout
- Human Review: Detailed review with comments
- Human Assign: Task assignment with deadlines
MCP Integration (1 type)¶
- MCP Tool: Invoke external tools via Model Context Protocol
Control Flow (14 types)¶
- Conditional Branch: Route based on criteria
- Parallel Split: Execute multiple paths simultaneously
- Join: Wait for parallel paths to complete
- Loop: Iterate over items
- Delay: Pause for specified duration
- Trigger Workflow: Invoke another workflow
- Action Store: Save to specific location
- Action Notify: Send notifications
- Action Tag: Apply tags
- Action Route: Move documents
- Transform Data: Modify workflow variables
- HTTP Request: Call external APIs
- Database Query: Query internal databases
- Webhook: Send event notifications
Human-in-the-Loop¶
Team+
Workflows can pause for human decisions:
Approval Node
type: human_approval
config:
question: "Approve invoice payment?"
assigned_to: finance-manager
timeout: 24h
escalate_to: finance-director
on_approve: route_to_payment
on_reject: route_to_review
Features:
- Real-time WebSocket notifications
- Mobile-friendly approval interface
- Bulk approval for similar items
- Rejection reason tracking
- Auto-reject on timeout (optional)
Review Node
type: human_review
config:
instructions: "Verify extracted contract terms"
reviewer: legal-team
required_fields: [party_names, amounts, dates]
allow_edits: true
timeout: 48h
Example Workflows¶
Contract Review Pipeline¶
graph TD
A[Contract Uploaded] --> B[AI Extract Terms]
B --> C[Compare to Template]
C --> D{Risk Score}
D -->|High| E[Partner Review]
D -->|Low| F[Auto-Approve]
E --> G[Approval Decision]
G -->|Approved| H[File in Active]
G -->|Rejected| I[Return to Sender]
F --> H Workflow Definition:
{
"name": "contract_review_pipeline",
"nodes": [
{
"id": "extract",
"type": "ai_extract",
"config": {
"fields": ["parties", "obligations", "dates", "amounts"]
}
},
{
"id": "compare",
"type": "ai_compare",
"config": {
"template_id": "standard-contract-v2"
}
},
{
"id": "risk_branch",
"type": "conditional",
"config": {
"condition": "risk_score > 70"
}
},
{
"id": "partner_review",
"type": "human_approval",
"config": {
"assigned_to": "partner",
"timeout": "24h",
"escalate": true
}
},
{
"id": "file_document",
"type": "action_store",
"config": {
"destination": "/Contracts/Active"
}
}
],
"edges": [
{"from": "extract", "to": "compare"},
{"from": "compare", "to": "risk_branch"},
{"from": "risk_branch", "to": "partner_review", "condition": "high"},
{"from": "risk_branch", "to": "file_document", "condition": "low"},
{"from": "partner_review", "to": "file_document", "condition": "approved"}
]
}
Invoice Processing¶
name: invoice_processing
trigger: document_upload
conditions:
- document_type: INVOICE
nodes:
- id: extract_data
type: ai_extract
config:
fields: [vendor, amount, date, items]
- id: validate_po
type: mcp_tool
config:
server: erp_system
tool: validate_purchase_order
- id: amount_branch
type: conditional
config:
field: amount
operator: greater_than
value: 5000
- id: auto_approve
type: action_route
config:
destination: /Approved-Invoices
notify: accounting-team
- id: manager_approval
type: human_approval
config:
assigned_to: finance-manager
timeout: 48h
context: "Large invoice requiring approval"
Patient Record Intake¶
name: patient_record_intake
trigger: fax_received
nodes:
- id: ocr_document
type: ai_extract
config:
ocr_mode: true
fields: [patient_name, dob, mrn]
- id: match_patient
type: mcp_tool
config:
server: ehr_system
tool: find_patient_by_identifiers
- id: match_confidence
type: conditional
config:
field: match_score
operator: greater_than
value: 95
- id: auto_file
type: action_store
config:
destination_template: "/Patients/{patient_mrn}"
notify_ehr: true
- id: human_review
type: human_review
config:
assigned_to: medical-records
instructions: "Manual patient matching required"
timeout: 4h
Conditional Branching¶
Route documents based on AI analysis or extracted data:
Condition Types:
- Field comparisons:
amount > 5000,confidence >= 90 - Text matching:
vendor contains "Acme" - Date logic:
expiration_date within_days 30 - AI decisions:
risk_score,sentiment,classification
Example Branch:
type: conditional
config:
branches:
- condition: "document_type == 'INVOICE' && amount > 10000"
next_node: high_value_approval
- condition: "document_type == 'INVOICE' && amount > 1000"
next_node: manager_approval
- condition: "document_type == 'INVOICE'"
next_node: auto_process
- default: true
next_node: manual_review
Parallel Execution¶
Run independent operations simultaneously:
- id: parallel_split
type: parallel
config:
paths:
- [entity_extraction, knowledge_graph_update]
- [sentiment_analysis, compliance_check]
- [duplicate_detection, dedup_merge]
- id: join
type: join
config:
wait_for: all # or 'any', 'majority'
Benefits:
- Faster workflow completion
- Efficient resource utilization
- Independent failure isolation
Workflow Scheduling¶
Enterprise
Schedule workflows to run automatically:
Schedule Types:
- Cron expressions:
0 9 * * MON(Every Monday 9am) - Intervals: Every 1 hour, 1 day, 1 week
- One-time: Specific date/time
- Event-driven: On document upload, tag added, etc.
Use Cases:
- Daily compliance reports
- Weekly document cleanup
- Monthly invoice processing
- Quarterly audit preparation
Error Handling¶
Workflows handle failures gracefully:
Retry Logic
Failure Actions
- Continue to next node (log error)
- Retry with backoff
- Route to error queue
- Notify administrator
- Rollback transaction
Dead Letter Queue
Failed workflows move to review queue:
- View failure reason and stack trace
- Retry manually after fixing
- Modify workflow definition
- Skip failed node and continue
Workflow Analytics¶
Team+
Track workflow performance:
Metrics:
- Total executions
- Success/failure rate
- Average duration
- Node-level performance
- Credit consumption
- Human approval SLAs
Optimization Insights:
- Bottleneck identification
- Parallel execution opportunities
- Cost reduction suggestions
- SLA compliance tracking
MCP Integration¶
Team+
Connect workflows to external systems:
Supported Integrations:
- GitHub: Create issues, update PRs
- Slack: Send notifications, post updates
- Databases: Query records, update status
- ERP Systems: Validate POs, sync data
- CRM Platforms: Create contacts, log activity
- Custom APIs: Any MCP-compatible service
Example MCP Node:
type: mcp_tool
config:
server: github
tool: create_issue
params:
title: "{{extracted_bug_title}}"
body: "{{bug_description}}"
labels: ["bug", "from-archivus"]
Use Cases by Industry¶
Legal
- Contract review with partner approval
- Discovery document processing
- Privilege log generation
- Deadline tracking and alerts
Healthcare
- Patient record intake and matching
- HIPAA compliance workflows
- Clinical document classification
- Insurance claim routing
Finance
- Invoice processing with approvals
- Regulatory filing workflows
- Audit trail generation
- Compliance reporting
Real Estate
- Transaction pipelines
- Closing checklist automation
- Commission approval flows
- Document package assembly
Getting Started¶
Visual Workflow Designer (Roadmap Q2 2026)
- Drag-and-drop interface
- Node library with templates
- Real-time validation
- Test mode with sample data
Current: API-Based
- Define workflow in JSON/YAML
- Create via API or admin interface
- Test with sample documents
- Activate and monitor
- Iterate based on analytics