Applications
Application entity
An Application is the central work item in AMS. It tracks the lifecycle of an underwriting request.
Key fields:
| Field | Type | Notes |
|---|---|---|
| title | String | Human-readable name |
| slug | String | Unique within workspace |
| applicationType | Enum | TAX, PAYROLL, FINANCIAL |
| applicationTemplateId | UUID | Template this app was created from |
| currentApplicationStatusId | UUID | FK to current status — read-only via JPA join |
| currentWorkflowStepId | UUID | Nullable; current workflow step |
| clientApprovalConfirmedAt | Instant | Set when client approves via portal |
Application types
| Type | Use case |
|---|---|
| TAX | Tax-related applications (returns, audits, certificates) |
| PAYROLL | Payroll processing applications |
| FINANCIAL | General financial/mortgage applications |
Application types are currently informational — they do not drive different business logic automatically.
Current status
currentApplicationStatus is a read-only JPA join. To change the status:
- Set
currentApplicationStatusId(the UUID column) - Never set
currentApplicationStatusdirectly ApplicationInputintentionally omits any status field — status is managed by the workflow engine only
// Correct
application.setCurrentApplicationStatusId(newStatusId);
// Wrong — will not persist
application.setCurrentApplicationStatus(statusObject);
Creating an application
Applications are created via a 5-step wizard:
- Select
ApplicationTemplate - Set title, description, type
- Add applicants (link to client profiles, assign types and roles)
- Review document slots (inherited from template as snapshots)
- Confirm and submit
On creation:
- Document slots are copied as snapshots from the template — they are not live-linked
- The initial workflow status (if defined) is assigned
- Applicants are linked
Application lifecycle
The exact statuses and transitions depend on the ApplicationTemplate configuration. This is a representative flow; actual statuses are custom-defined per template.
Application detail page tabs
| Tab | Content |
|---|---|
| Overview | Title, applicants summary, document completion, current status |
| Applicants | List of applicants with profile details; CRUD |
| Documents | Document slots, file uploads, review actions |
| Messages | Comments (application-level + document-level) |
| Decision | Decision recording |
| Workflow | Read-only workflow visualization + status history |
Client approval
When clientApprovalConfirmedAt is set on an application, the client-approval-check system handler can auto-advance the workflow step. This enables automated progression when a client explicitly approves their application via the client portal.