Skip to main content

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

StateURLTemplateController
app.network.workflow/workflow?studyIdnetwork/workflow/workflow.html(abstract parent)
app.network.workflow.categories/categories?pagenetwork/workflow/workflow-categories.htmlWorkflowCategoriesController
app.network.workflow.category/category?entity&pagenetwork/workflow/workflow-category.htmlWorkflowCategoryController
app.network.workflow.processes/processes?page&reset&initiator…network/workflow/workflow-dashboard.htmlWorkflowDashboardController
app.network.workflow.process/process?entitynetwork/workflow/workflow-process.htmlWorkflowProcessController
app.network.workflow.network-process/network-process?entitynetwork/workflow/workflow-process.htmlWorkflowProcessController
app.network.workflow.tasks/tasks?rejectUserTask&page&completedPagenetwork/workflow/workflow-tasks.htmlWorkflowTasksController
app.network.workflow.wizard/wizard?items&contentTypes…network/workflow/wizard/workflow-wizard.htmlWorkflowWizardController

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-StateURL SegmentTemplateController
…wizard.review-document/review-document?siteIdworkflow-wizard-review-item.htmlReviewItemWorkflowWizardController
…wizard.review-form/review-formworkflow-wizard-review-item.htmlReviewItemWorkflowWizardController
…wizard.sign-document/sign-document?siteIdworkflow-wizard-sign-document.htmlSignDocumentWorkflowWizardController
…wizard.sign-form/sign-formworkflow-wizard-sign-form.htmlSignFormWorkflowWizardController
…wizard.upload-document/upload-documentworkflow-wizard-upload-document.htmlUploadDocumentWorkflowWizardController
…wizard.upload-document-and-sign/upload-document-and-signworkflow-wizard-upload-document-and-sign.htmlUploadDocumentAndSignWorkflowWizardController
…wizard.review-document-and-sign/review-document-and-sign?siteIdworkflow-wizard-review-item-and-sign.htmlReviewItemAndSignWorkflowWizardController
…wizard.review-form-and-sign/review-form-and-signworkflow-wizard-review-item-and-sign.htmlReviewItemAndSignWorkflowWizardController
…wizard.complete-form/complete-formworkflow-wizard-complete-form.htmlCompleteFormWizardController
…wizard.complete-form-and-sign/complete-form-and-signworkflow-wizard-complete-form-and-sign.htmlCompleteFormAndSignWorkflowWizardController
…wizard.monitor-visit-letter(varies)workflow-wizard-monitor-visit-letter.htmlMonitorVisitLetterWorkflowWizardController
…wizard.monitor-visit-report/monitor-visit-report?siteId…workflow-wizard-complete-form-and-sign.htmlCompleteFormAndSignWorkflowWizardController
…wizard.complete-survey-form/complete-survey-formworkflow-wizard-complete-survey-form.htmlCompleteSurveyFormWorkflowWizardController
…wizard.complete-quiz/complete-quiz?workflowType…workflow-wizard-complete-quiz.htmlCompleteQuizWorkflowWizardController

Help Workflow Type Mapping

The 10 SureDrive workflow types documented in the Help system map to these wizard sub-states:

Help Workflow TypeWizard Sub-State
Reviewing Documents…wizard.review-documentReviewItemWorkflowWizardController
Reviewing Forms…wizard.review-formReviewItemWorkflowWizardController
Signing Documents…wizard.sign-documentSignDocumentWorkflowWizardController
Signing Forms…wizard.sign-formSignFormWorkflowWizardController
Uploading Documents…wizard.upload-documentUploadDocumentWorkflowWizardController
Uploading and Signing Documents…wizard.upload-document-and-signUploadDocumentAndSignWorkflowWizardController
Reviewing and Signing Documents…wizard.review-document-and-signReviewItemAndSignWorkflowWizardController
Reviewing and Signing Forms…wizard.review-form-and-signReviewItemAndSignWorkflowWizardController
Completing Forms…wizard.complete-formCompleteFormWizardController
Completing, Reviewing, and Signing Forms…wizard.complete-form-and-signCompleteFormAndSignWorkflowWizardController

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:

MethodPurpose
reloadWorkflowDashboardFetches the process list with current filters applied
refreshDataRe-fetches data while preserving the current navigator state
applyFiltersUpdates the query parameters (process type, status, KPI, initiator) and reloads
openWorkflowWizardNavigates 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:

MethodPurpose
reloadWorkflowProcessReloads the current process and its task list
doStartProcessStarts the process via the remote workflow service
doSuspendProcessSuspends an active process
doCancelProcessCancels the process
doDeleteProcessDeletes 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.

MethodPurpose
reloadUserTasksFetches pending tasks assigned to the current user
enrichEntitiesAugments 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

ServiceResponsibilities
WorkflowREST client for process CRUD: getInitiatorProcesses, start, suspend, complete, cancel, delete
WorkflowProcessREST client for task-level operations and process details
WorkflowProcessTaskREST client for individual task completion and rejection
WorkflowServiceClient-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.


Key Source Files Reference

FileComponentPurpose
SC/suredms-web-client/src/main/webapp/app/js/state/app-states-workflow.jsRoute registrationAll workflow state definitions
SC/suredms-web-client/src/main/webapp/app/js/network/workflow/workflow-dashboard.jsWorkflowDashboardControllerDashboard, filters, category management
SC/suredms-web-client/src/main/webapp/app/js/network/workflow/workflow-process.jsWorkflowProcessControllerProcess detail, start/suspend/cancel/delete
SC/suredms-web-client/src/main/webapp/app/js/network/workflow/workflow-tasks.jsWorkflowTasksControllerMy Tasks and completed task list
SC/suredms-web-client/src/main/webapp/app/js/network/workflow/wizard/workflow-wizard.jsWorkflowWizardControllerWizard entry point, sub-state routing
SC/suredms-web-client/src/main/webapp/app/js/network/workflow/workflow.jsWorkflow, WorkflowServiceREST and business logic for workflow lifecycle
SC/suredms-web-client/src/main/webapp/app/js/network/workflow/workflow-email-templates.jsWorkflowEmailTemplatesControllerNotification email templates