Workflow Engine — UAT Test Cases
Pre-requisites
- VPS services running: Editor, Gateway, AstraPBX, Workflow Engine, Redis, PostgreSQL
- Grand Estancia org configured with bots and extensions
- Zoiper registered on 1014/1015
TC-1: Webhook Page
| # | Test Case | Steps | Expected |
| 1.1 | View webhooks | Go to Webhooks in sidebar | Page loads, shows list or empty state |
| 1.2 | Create webhook | Click Add Webhook → enter URL, select events → Create | Webhook appears in list |
| 1.3 | Test webhook | Click Test button on webhook | Shows response status and body |
| 1.4 | Delete webhook | Click ⋯ → Delete | Webhook removed from list |
TC-2: Workflow CRUD (API)
| # | Test Case | Steps | Expected |
| 2.1 | Create workflow | POST /workflows with name, trigger_type, nodes | Returns workflow with UUID |
| 2.2 | List workflows | GET /workflows?org_id={org} | Returns array of workflows |
| 2.3 | Execute workflow | POST /workflows/{id}/execute with trigger_data | Returns execution_id, status=queued |
| 2.4 | Check execution | GET /workflows/{id}/executions | Shows completed status with step results |
| 2.5 | Webhook trigger | POST /trigger/{workflow_id} with JSON body | Execution created and queued |
TC-3: Hotel Guest Lifecycle Workflow
| # | Test Case | Steps | Expected |
| 3.1 | Booking webhook | POST booking data with guest_name, phone, checkin, checkout | Workflow triggered, welcome WhatsApp sent |
| 3.2 | Scheduled check-in call | Wait for checkin_date 2PM | AI phone call placed to guest |
| 3.3 | Daily wake-up call | Wait for 7AM between checkin and checkout | Wake-up call placed daily |
| 3.4 | Checkout reminder | Wait for checkout_date 10AM | WhatsApp + call reminder |
| 3.5 | Recurring job stops | After checkout date | No more wake-up calls |
TC-4: Channel Concurrency
| # | Test Case | Steps | Expected |
| 4.1 | View channel config | GET /orgs/{org}/automation-config | Shows limit=3, current=0 |
| 4.2 | Set channel limit | PUT /orgs/{org}/automation-config limit=2 | Updated to limit=2 |
| 4.3 | Place call within limit | Trigger workflow with place_call action | Call placed, current=1 |
| 4.4 | Exceed limit | Trigger 3 calls simultaneously with limit=2 | 2 calls placed, 1 requeued |
| 4.5 | Call ends | Call completes | current decrements |
TC-5: Restart Recovery
| # | Test Case | Steps | Expected |
| 5.1 | Schedule future job | Create job 10 minutes from now | Job queued in Bull + PostgreSQL |
| 5.2 | Restart workflow engine | systemctl restart workflow-engine | Service restarts, recovers jobs |
| 5.3 | Verify job fires | Wait for scheduled time | Job executes on time |
| 5.4 | Restart Redis | systemctl restart redis-server | Queue recovers from AOF |
| 5.5 | Other services unaffected | Check Editor, Gateway, AstraPBX | All return 200 |
TC-6: Template Resolution
| # | Test Case | Steps | Expected |
| 6.1 | Trigger data | Message: "Hello {trigger.guest_name}" | Resolves to "Hello Hari" |
| 6.2 | Step output | Message: "Ticket {step.n1.ticket_id}" | Resolves previous step output |
| 6.3 | Nested object | Body: { "phone": "{trigger.phone}" } | Resolves in JSON body |
| 6.4 | Missing variable | Message: "Hello {trigger.unknown}" | Keeps as literal "{trigger.unknown}" |
TC-7: Error Handling
| # | Test Case | Steps | Expected |
| 7.1 | Invalid webhook URL | Create HTTP action with bad URL | Step fails, error logged |
| 7.2 | Retry on failure | Set retries=3, action fails transiently | Retries 3 times with backoff |
| 7.3 | Stop on failure | Step fails, continue_on_error=false | Workflow stops, status=failed |
| 7.4 | Continue on failure | Step fails, continue_on_error=true | Next step still executes |
| # | Test Case | Steps | Expected |
| 8.1 | Automate section visible | Open any org dashboard | See "Automate" with Workflows + Webhooks |
| 8.2 | Workflows page | Click Workflows | Shows workflow list or placeholder |
| 8.3 | Webhooks page | Click Webhooks | Shows webhook configuration |
| 8.4 | Active highlighting | Click any menu item | Current page highlighted |
How to Test API (from terminal)
# Health check
curl http://localhost:3002/health
# Create workflow
curl -X POST http://localhost:3002/workflows -H "Content-Type: application/json" -d '{
"org_id": "ba50c665-7ab4-4f04-a301-eccc395dc42b",
"name": "Test",
"trigger_type": "webhook",
"nodes": [{"id": "n1", "type": "log", "data": {"config": {"message": "Test: {trigger.name}"}}}],
"edges": []
}'
# Trigger via webhook
curl -X POST http://localhost:3002/trigger/{WORKFLOW_ID} -H "Content-Type: application/json" -d '{"name": "Hari"}'
# Check executions
curl http://localhost:3002/workflows/{WORKFLOW_ID}/executions