Workflow Platform
This page documents the desktop workflow platform layer: the controller, wizard flow, task views, remote service access, and the model objects that drive workflow creation and task execution.
Purpose
The workflow platform is the desktop-side workflow engine used to start processes, present wizard steps, and coordinate workflow tasks. It is separate from the SureDrive creation wizard and from the web client’s workflow routes.
Scope
This page covers the desktop workflow module and its supporting model packages. It does not document the web workflow route registration, which is part of the browser client page.
Entry Points
SC/suredms-workflow-platform/src/main/java/com/sureclinical/suredms/workflow/platform/gadgets/WorkflowController.javaSC/suredms-workflow-platform/src/main/java/com/sureclinical/suredms/workflow/platform/wizard/WorkflowWizard.javaSC/suredms-workflow-platform/src/main/java/com/sureclinical/suredms/workflow/platform/utils/WorkflowServiceLocator.javaSC/suredms-workflow-platform/src/main/java/com/sureclinical/suredms/workflow/platform/model/entitiesSC/suredms-workflow-platform-core
Primary Components
WorkflowControllerowns the main workflow UI shell. It loads configuration, creates the navigator and viewer, registers view panels, keeps a timer running for refresh, and listens for entity-data updates.WorkflowWizardbuilds the step sequence for a workflow process. It selects different wizard step combinations based onWorkflowProcessType, including review, sign, upload, and complete-form flows.WorkflowServiceLocatorprovides the remote workflow service and workflow configuration used by the desktop client.WorkflowProcess,WorkflowProcessType,WorkflowUserTaskType,WorkflowUserAction, and related model classes define the process and task contract passed between the UI and the service layer.WorkflowForm,WorkflowProcessForm, andWorkflowTaskFormare the desktop forms embedded into the workflow viewer.
Flow Overview
WorkflowControllerstarts up and loads the workflow configuration and remote service.- The controller creates the navigator and viewer models, then wires the workflow forms into the UI.
- A refresh timer keeps the workflow state current and responds to entity updates.
- When the user starts a process, the controller calls the remote workflow service and then reloads local data.
WorkflowWizardassembles the step list for the chosen process type and writes the result into the process model before completion.
Wizard Behavior
- The wizard supports process families such as review content, review forms, upload-only, signing, combined upload-and-sign, and complete-form flows.
- A summary step is always added at the end and is populated with the steps that came before it.
- The wizard can be constructed from an existing process or from a builder that selects the process type up front.
- Workflow-specific helper classes provide step titles, resources, and model wiring so each process family stays consistent.
Dependencies and Integrations
- The workflow UI uses the desktop client’s
EntityDataSourceand related listeners to respond to repository changes. WorkflowServiceRemotehandles the server-side workflow calls.NuxeoHelperis used to create the system user context for remote workflow actions.WorkflowResourcescentralizes UI resource ids, labels, and wizard step names.
Edge Cases and Constraints
- The controller keeps a shared singleton instance and owns the refresh timer lifecycle.
- Some process types require feature checks before the user can access the workflow UI.
- Process handling is intentionally split between UI composition, remote calls, and data models so the wizard remains reusable.