Skip to main content

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.java
  • SC/suredms-workflow-platform/src/main/java/com/sureclinical/suredms/workflow/platform/wizard/WorkflowWizard.java
  • SC/suredms-workflow-platform/src/main/java/com/sureclinical/suredms/workflow/platform/utils/WorkflowServiceLocator.java
  • SC/suredms-workflow-platform/src/main/java/com/sureclinical/suredms/workflow/platform/model/entities
  • SC/suredms-workflow-platform-core

Primary Components

  • WorkflowController owns 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.
  • WorkflowWizard builds the step sequence for a workflow process. It selects different wizard step combinations based on WorkflowProcessType, including review, sign, upload, and complete-form flows.
  • WorkflowServiceLocator provides 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, and WorkflowTaskForm are the desktop forms embedded into the workflow viewer.

Flow Overview

  1. WorkflowController starts up and loads the workflow configuration and remote service.
  2. The controller creates the navigator and viewer models, then wires the workflow forms into the UI.
  3. A refresh timer keeps the workflow state current and responds to entity updates.
  4. When the user starts a process, the controller calls the remote workflow service and then reloads local data.
  5. WorkflowWizard assembles 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 EntityDataSource and related listeners to respond to repository changes.
  • WorkflowServiceRemote handles the server-side workflow calls.
  • NuxeoHelper is used to create the system user context for remote workflow actions.
  • WorkflowResources centralizes 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.