generalbots/bottemplates/multiagent/order-processing.gbai/order-processing.bas
Rodrigo Rodriguez (Pragmatismo) 037db5c381 feat: Major workspace reorganization and documentation update
- Add comprehensive documentation in botbook/ with 12 chapters
- Add botapp/ Tauri desktop application
- Add botdevice/ IoT device support
- Add botlib/ shared library crate
- Add botmodels/ Python ML models service
- Add botplugin/ browser extension
- Add botserver/ reorganized server code
- Add bottemplates/ bot templates
- Add bottest/ integration tests
- Add botui/ web UI server
- Add CI/CD workflows in .forgejo/workflows/
- Add AGENTS.md and PROD.md documentation
- Add dependency management scripts (DEPENDENCIES.sh/ps1)
- Remove legacy src/ structure and migrations
- Clean up temporary and backup files
2026-04-19 08:14:25 -03:00

40 lines
1.1 KiB
QBasic

' E-commerce Order Processing Workflow
USE KB "order-policies"
USE TOOL "validate-payment"
USE TOOL "reserve-inventory"
USE TOOL "send-confirmation"
ORCHESTRATE WORKFLOW "order-processing"
STEP 1: BOT "fraud-detector" "analyze transaction"
' AI-powered fraud detection
STEP 2: BOT "inventory-checker" "verify availability"
' Check stock levels and reserve items
IF fraud_score > 0.8 THEN
STEP 3: HUMAN APPROVAL FROM "security@store.com"
TIMEOUT 900 ' 15 minutes for high-risk orders
ON TIMEOUT: REJECT ORDER
END IF
IF payment_method = "credit_card" THEN
STEP 4: BOT "payment-processor" "charge card"
ELSE
STEP 4: BOT "payment-processor" "process alternative"
END IF
STEP 5: PARALLEL
BRANCH A: BOT "shipping-optimizer" "select carrier"
BRANCH B: BOT "inventory-updater" "update stock"
BRANCH C: BOT "notification-sender" "send confirmation"
END PARALLEL
' Share successful processing patterns
BOT SHARE MEMORY "fraud_indicators" WITH "fraud-detector-backup"
BOT SHARE MEMORY "shipping_preferences" WITH "logistics-bot"
' Publish completion event
PUBLISH EVENT "order_processed"
TALK "Order processed successfully!"