Web Client Workflow Types
This page documents the web client workflow subsystem: the Angular route registration, the controllers that manage workflow views and wizard steps, the workflow service layer, and the mapping from each named workflow type to its wizard state and controller.
For the desktop workflow platform (WorkflowController, WorkflowWizard, desktop task views), see Workflow Platform.
Overview
The web client workflow subsystem lets users start, monitor, and execute workflow processes from the browser. It spans:
- A workflow dashboard listing active and completed processes
- A workflow process detail view showing a single process and its diagram
- A task list for the current user
- A wizard with sub-states for each workflow type (sign, review, upload, form completion)
All routes are registered under the base state app.network.workflow.
Route Registration
File: SC/suredms-web-client/src/main/webapp/app/js/state/app-states-workflow.js
Top-Level States
| State | URL | Template | Controller |
|---|---|---|---|
app.network.workflow | /workflow?studyId | network/workflow/workflow.html | (abstract parent) |
app.network.workflow.categories | /categories?page | network/workflow/workflow-categories.html | WorkflowCategoriesController |
app.network.workflow.category | /category?entity&page | network/workflow/workflow-category.html | WorkflowCategoryController |
app.network.workflow.processes | /processes?page&reset&initiator… | network/workflow/workflow-dashboard.html | WorkflowDashboardController |
app.network.workflow.process | /process?entity | network/workflow/workflow-process.html | WorkflowProcessController |
app.network.workflow.network-process | /network-process?entity | network/workflow/workflow-process.html | WorkflowProcessController |
app.network.workflow.tasks | /tasks?rejectUserTask&page&completedPage | network/workflow/workflow-tasks.html | WorkflowTasksController |
app.network.workflow.wizard | /wizard?items&contentTypes… | network/workflow/wizard/workflow-wizard.html | WorkflowWizardController |
Workflow Wizard Sub-States
Each named workflow type is a sub-state of app.network.workflow.wizard. The user is routed to the appropriate sub-state when a workflow task is assigned to them.
| Sub-State | URL Segment | Template | Controller |
|---|---|---|---|
…wizard.review-document | /review-document?siteId | workflow-wizard-review-item.html | ReviewItemWorkflowWizardController |
…wizard.review-form | /review-form | workflow-wizard-review-item.html | ReviewItemWorkflowWizardController |
…wizard.sign-document | /sign-document?siteId | workflow-wizard-sign-document.html | SignDocumentWorkflowWizardController |
…wizard.sign-form | /sign-form | workflow-wizard-sign-form.html | SignFormWorkflowWizardController |
…wizard.upload-document | /upload-document | workflow-wizard-upload-document.html | UploadDocumentWorkflowWizardController |
…wizard.upload-document-and-sign | /upload-document-and-sign | workflow-wizard-upload-document-and-sign.html | UploadDocumentAndSignWorkflowWizardController |
…wizard.review-document-and-sign | /review-document-and-sign?siteId | workflow-wizard-review-item-and-sign.html | ReviewItemAndSignWorkflowWizardController |
…wizard.review-form-and-sign | /review-form-and-sign | workflow-wizard-review-item-and-sign.html | ReviewItemAndSignWorkflowWizardController |
…wizard.complete-form | /complete-form | workflow-wizard-complete-form.html | CompleteFormWizardController |
…wizard.complete-form-and-sign | /complete-form-and-sign | workflow-wizard-complete-form-and-sign.html | CompleteFormAndSignWorkflowWizardController |
…wizard.monitor-visit-letter | (varies) | workflow-wizard-monitor-visit-letter.html | MonitorVisitLetterWorkflowWizardController |
…wizard.monitor-visit-report | /monitor-visit-report?siteId… | workflow-wizard-complete-form-and-sign.html | CompleteFormAndSignWorkflowWizardController |
…wizard.complete-survey-form | /complete-survey-form | workflow-wizard-complete-survey-form.html | CompleteSurveyFormWorkflowWizardController |
…wizard.complete-quiz | /complete-quiz?workflowType… | workflow-wizard-complete-quiz.html | CompleteQuizWorkflowWizardController |
Help Workflow Type Mapping
The 10 SureDrive workflow types documented in the Help system map to these wizard sub-states:
| Help Workflow Type | Wizard Sub-State |
|---|---|
| Reviewing Documents | …wizard.review-document — ReviewItemWorkflowWizardController |
| Reviewing Forms | …wizard.review-form — ReviewItemWorkflowWizardController |
| Signing Documents | …wizard.sign-document — SignDocumentWorkflowWizardController |
| Signing Forms | …wizard.sign-form — SignFormWorkflowWizardController |
| Uploading Documents | …wizard.upload-document — UploadDocumentWorkflowWizardController |
| Uploading and Signing Documents | …wizard.upload-document-and-sign — UploadDocumentAndSignWorkflowWizardController |
| Reviewing and Signing Documents | …wizard.review-document-and-sign — ReviewItemAndSignWorkflowWizardController |
| Reviewing and Signing Forms | …wizard.review-form-and-sign — ReviewItemAndSignWorkflowWizardController |
| Completing Forms | …wizard.complete-form — CompleteFormWizardController |
| Completing, Reviewing, and Signing Forms | …wizard.complete-form-and-sign — CompleteFormAndSignWorkflowWizardController |
Controllers and Services
WorkflowDashboardController
File: SC/suredms-web-client/src/main/webapp/app/js/network/workflow/workflow-dashboard.js
Manages the workflow process list view. Responsibilities:
| Method | Purpose |
|---|---|
reloadWorkflowDashboard | Fetches the process list with current filters applied |
refreshData | Re-fetches data while preserving the current navigator state |
applyFilters | Updates the query parameters (process type, status, KPI, initiator) and reloads |
openWorkflowWizard | Navigates to app.network.workflow.wizard to start a new process |
Supports filtering by: process type, process status, KPI flag, and initiator user. Also manages Workflow Categories — the user can rename, delete, and detach processes from categories.
WorkflowProcessController
File: SC/suredms-web-client/src/main/webapp/app/js/network/workflow/workflow-process.js
Manages the process detail view for a single workflow instance. Responsibilities:
| Method | Purpose |
|---|---|
reloadWorkflowProcess | Reloads the current process and its task list |
doStartProcess | Starts the process via the remote workflow service |
doSuspendProcess | Suspends an active process |
doCancelProcess | Cancels the process |
doDeleteProcess | Deletes the process record |
Also handles: inline comments, process BPMN diagram rendering, process reminder scheduling, and category management for the current process.
Shared by both app.network.workflow.process and app.network.workflow.network-process — the network-process variant is used for processes initiated from the network level rather than a specific study.
WorkflowTasksController
File: SC/suredms-web-client/src/main/webapp/app/js/network/workflow/workflow-tasks.js
Manages the "My Tasks" and "Completed Tasks" views for the current user.
| Method | Purpose |
|---|---|
reloadUserTasks | Fetches pending tasks assigned to the current user |
enrichEntities | Augments task objects with display-ready metadata |
The rejectUserTask URL param allows deep-linking to a specific task with a pre-populated rejection flow.
WorkflowWizardController
File: SC/suredms-web-client/src/main/webapp/app/js/network/workflow/wizard/workflow-wizard.js
Base controller for initiating and coordinating workflow creation. Determines which wizard sub-state to route to based on the workflow type, content items, and content type parameters passed via URL.
Workflow and WorkflowService (Angular Services)
File: SC/suredms-web-client/src/main/webapp/app/js/network/workflow/workflow.js
| Service | Responsibilities |
|---|---|
Workflow | REST client for process CRUD: getInitiatorProcesses, start, suspend, complete, cancel, delete |
WorkflowProcess | REST client for task-level operations and process details |
WorkflowProcessTask | REST client for individual task completion and rejection |
WorkflowService | Client-side business logic: progress calculation, type enrichment, KPI status resolution |
WorkflowCategoriesController / WorkflowCategoryController
Files: workflow-categories.js / workflow-category.js in the workflow/ folder.
Manage the workflow category grouping feature. Users can create categories to group related workflow processes, rename categories, and remove categories. Individual processes can be attached to or detached from a category.
Email Templates
File: SC/suredms-web-client/src/main/webapp/app/js/network/workflow/workflow-email-templates.js
Registers WorkflowEmailTemplatesController, which manages the library of email notification templates used when workflow tasks are assigned, completed, or rejected.