- domains
- blueprint
- employment-services
- processes
Processes and Flows¶
This document describes end-to-end workflows for the Employment Services SaaS domain: hiring a squad, running an engagement, and billing. It is written for architects, engineers, and product managers understanding business processes.
Business processes define how the Employment Services SaaS operates end-to-end. Understanding these processes helps design event flows, API interactions, and user experiences.
Note
All important business actions are expressed as events to drive agent activation, orchestration, and integration. This aligns with ConnectSoft's event-driven architecture principles.
Core Business Processes¶
The Employment Services SaaS domain includes these core processes:
- Customer Onboards and Creates First Engagement - Customer signs up, creates project, hires squad
- Squad Staffing and Kickoff - Squad assigned to engagement, kickoff meeting, work begins
- Delivery and Progress Tracking - Work execution, progress tracking, milestone completion
- Billing and Renewals - Invoice generation, payment processing, engagement renewal
Process 1 – Customer Onboards and Creates First Engagement¶
Steps¶
- Customer Signs Up
- Customer creates account via portal
- Tenant created in Tenant Management
- Customer organization created in Customer Accounts
-
User authenticated via Identity Platform
-
Customer Creates Project
- Customer creates new project via portal
- Project created in Project & Engagement context
-
Project linked to customer organization
-
Customer Browses Squads
- Customer browses available squads
- Customer views squad profiles and capacity
-
Customer selects squad for engagement
-
Customer Creates Engagement
- Customer creates engagement with selected squad
- Contract terms defined (scope, pricing, timeline)
- Engagement created in Project & Engagement context
- Domain event:
EngagementCreated
Flow Diagram¶
flowchart LR
A[Customer Signs Up] --> B[Create Tenant]
B --> C[Create Customer Org]
C --> D[Create Project]
D --> E[Browse Squads]
E --> F[Select Squad]
F --> G[Create Engagement]
G --> H[EngagementCreated Event]
style A fill:#e1f5ff
style B fill:#fff4e1
style C fill:#e8f5e9
style G fill:#f3e5f5
style H fill:#e1f5ff
Process 2 – Squad Staffing and Kickoff¶
Steps¶
- Squad Assignment
- System assigns squad to engagement
- Assignment created in Squad & Staffing context
- Squad capacity checked and reserved
-
Domain event:
SquadAssignedToEngagement -
Kickoff Preparation
- Project requirements refined
- Initial epics and user stories created
-
Sprint planning initiated
-
Kickoff Meeting
- Kickoff meeting conducted
- Project scope confirmed
- Communication channels established
-
Engagement status: Draft → Active
-
Work Begins
- Engagement activated
- Work items created in Work Management
- Domain event:
EngagementActivated
Flow Diagram¶
flowchart LR
A[EngagementCreated Event] --> B[Assign Squad]
B --> C[Check Capacity]
C --> D{Squad Available?}
D -->|Yes| E[Create Assignment]
D -->|No| F[Notify Customer]
E --> G[SquadAssignedToEngagement Event]
G --> H[Kickoff Meeting]
H --> I[Activate Engagement]
I --> J[EngagementActivated Event]
style A fill:#e1f5ff
style E fill:#fff4e1
style G fill:#e8f5e9
style J fill:#f3e5f5
Process 3 – Delivery and Progress Tracking¶
Steps¶
- Work Execution
- Squad executes work using Factory
- Factory generates code and deliverables
- Work items updated in Work Management
-
Progress tracked via events
-
Milestone Completion
- Milestones completed as work progresses
- Domain event:
MilestoneCompleted -
Customer notified of progress
-
Deliverable Review
- Deliverables reviewed by customer
- Feedback incorporated
-
Domain event:
DeliverableAcceptedorDeliverableRejected -
Engagement Completion
- All work completed
- Final deliverables accepted
- Engagement status: Active → Completed
- Domain event:
EngagementCompleted
Flow Diagram¶
flowchart LR
A[Engagement Active] --> B[Squad Executes Work]
B --> C[Factory Generates Code]
C --> D[Update Work Items]
D --> E[Milestone Completed?]
E -->|Yes| F[MilestoneCompleted Event]
E -->|No| B
F --> G[Customer Reviews]
G --> H{Accepted?}
H -->|Yes| I[DeliverableAccepted Event]
H -->|No| J[DeliverableRejected Event]
J --> B
I --> K{All Work Done?}
K -->|Yes| L[EngagementCompleted Event]
K -->|No| B
style A fill:#e1f5ff
style C fill:#fff4e1
style F fill:#e8f5e9
style L fill:#f3e5f5
Process 4 – Billing and Renewals¶
Steps¶
- Invoice Generation
- Invoice generated based on engagement terms
- Invoice created in Billing & Invoicing context
-
Domain event:
InvoiceIssued -
Payment Processing
- Customer receives invoice
- Payment processed via payment gateway
- Payment recorded in Billing & Invoicing
-
Domain event:
PaymentReceived -
Engagement Renewal
- Engagement renewal considered
- New engagement created if renewed
- Domain event:
EngagementRenewed
Flow Diagram¶
flowchart LR
A[MilestoneCompleted Event] --> B[Generate Invoice]
B --> C[InvoiceIssued Event]
C --> D[Send Invoice]
D --> E[Customer Pays]
E --> F[PaymentReceived Event]
F --> G{Engagement Ending?}
G -->|Yes| H{Renew?}
G -->|No| A
H -->|Yes| I[Create New Engagement]
H -->|No| J[Engagement Completed]
style A fill:#e1f5ff
style C fill:#fff4e1
style F fill:#e8f5e9
style I fill:#f3e5f5
Event and Command Overview¶
Commands¶
Commands are actions initiated by users or external systems:
| Type | Name | Produced By | Consumed By |
|---|---|---|---|
| Command | CreateEngagement |
Portal / API | Project & Engagement Service |
| Command | AssignSquad |
Portal / API | Squad & Staffing Service |
| Command | CreateInvoice |
Billing Service | Billing & Invoicing Service |
| Command | ProcessPayment |
Payment Gateway | Billing & Invoicing Service |
Domain Events¶
Domain events represent important state changes:
| Type | Name | Produced By | Consumed By |
|---|---|---|---|
| Event | EngagementCreated |
Project & Engagement Service | Squad & Staffing, Billing, Work Management |
| Event | SquadAssignedToEngagement |
Squad & Staffing Service | Work Management, Billing, Notifications |
| Event | EngagementActivated |
Project & Engagement Service | Work Management, Notifications |
| Event | MilestoneCompleted |
Work Management Service | Billing, Reporting, Notifications |
| Event | DeliverableAccepted |
Project & Engagement Service | Billing, Reporting |
| Event | EngagementCompleted |
Project & Engagement Service | Billing, Reporting, Notifications |
| Event | InvoiceIssued |
Billing & Invoicing Service | Notifications, Reporting |
| Event | PaymentReceived |
Billing & Invoicing Service | Reporting, Notifications |
Integration Events¶
Integration events for cross-context communication:
| Type | Name | Produced By | Consumed By |
|---|---|---|---|
| Integration Event | TenantCreated |
Tenant Management Service | All services (tenant context) |
| Integration Event | CustomerCreated |
Customer Accounts Service | Project & Engagement, Billing |
| Integration Event | SquadCapacityChanged |
Squad & Staffing Service | Project & Engagement, Reporting |
See: Event-Driven Mindset for event-driven principles.
See: Webhooks and Events for event patterns.
Related Documents¶
- Domain Overview - Domain overview
- Bounded Contexts and Context Map - Domain boundaries
- Domain Model and Aggregates - Domain model
- API and Integration View - API design
- Event-Driven Mindset - Event patterns
- Factory Overview - Factory capabilities