Introducing a new way to review your PRs.

Read the announcement

elsa-workflows / elsa-core

The Workflow Engine for .NET

View on GitHub

32 documents · Updated Oct 7, 2026

docs / studio-platform

Studio application platform

Elsa Studio is a Blazor application platform for operating and authoring Elsa workflows against a remote Elsa backend. It combines a shared shell with independently registered feature modules, so the same product model can run as a full web app, a WebAssembly client, or embeddable custom elements.

Platform model

Studio shell

The Studio shell provides the application frame around every feature. It owns route discovery, authorization-aware page display, the main layout, navigation, app-bar actions, and common error states. Feature assemblies are added to the router through registered feature modules, so a host does not need to maintain a separate route list for each page.

The shell keeps the normal path protected by authentication. A host can disable that check for a controlled scenario, but the default is to require authorization and to show a clear unauthorized state when access is not available.

References: src/…/App.razor• L1-31 src/…/App.razor.cs• L12-29 src/…/ShellOptions.cs• L6-11

Feature composition

Studio features are self-contained modules that add a product capability to the shared platform. A module can contribute pages, navigation, services, widgets, editors, and remote API clients. Hosts compose the product by calling module registration methods rather than by changing the shell.

The standard hosts enable workflow authoring and monitoring together with dashboards, settings, security, secrets, user tasks, diagnostics, localization, and other operational features. The workflow authoring and monitoring page explains the workflow-focused surfaces in more detail.

The bundle at src/studio/bundles/Elsa.Studio/Elsa.Studio.csproj groups the common shell and feature packages for consumers that want the standard Studio set. A host remains free to register a smaller set when it needs a focused experience.

References: src/…/Program.cs• L118-175 src/…/Program.cs• L105-147 src/…/ServiceCollectionExtensions.cs• L30-78 src/…/Elsa.Studio.csproj• L8-26

Host variants

Studio keeps its feature model stable across several hosting choices. The host changes where the UI runs and how it receives backend credentials, not the main product boundary.

HostProduct roleMain connection shape
Elsa.Studio.Host.ServerFull server-rendered Studio applicationThe server configures authentication, calls the remote backend, and serves the Blazor app.
Elsa.Studio.Host.WasmFull browser-run Studio applicationThe browser calls the remote backend through a selected authentication handler.
Elsa.Studio.Host.HostedWasmWeb server for a WebAssembly deploymentThe host serves the WebAssembly assets and fallback page. The client application supplies the Studio features.
Elsa.Studio.Host.CustomElementsEmbeddable workflow UI for another web applicationCustom elements receive backend endpoint and credential values and expose selected workflow components.

The server and WebAssembly hosts compose nearly the same full application. The custom-element host composes only the shared shell and the workflow, secrets, user-task, localization, and designer capabilities needed by its wrappers. Its BackendProvider lets an embedding application establish the backend context before those components make remote calls.

References: src/…/Program.cs• L46-66 src/…/Program.cs• L45-53 src/…/Program.cs• L4-41 src/…/Program.cs• L22-62 src/…/BackendComponentBase.cs• L10-35

Backend connection model

Remote backend boundary

Studio treats the Elsa backend as the source of workflow data, runtime state, server capabilities, and expression information. The platform holds one current backend endpoint and creates typed API clients for modules from that endpoint. This keeps feature code independent of whether the endpoint comes from host configuration or from an embedding application.

The same connection boundary also supports live operations that use SignalR. Authentication modules provide the request and connection settings, while feature modules use the shared backend and connection contracts. This lets workflow lists, editors, and operational views use one backend context.

In the custom-element host, the backend context includes an endpoint plus optional API key, access token, tenant ID, and tenant-header name. The embedding page therefore controls the connection without rebuilding the Studio client.

References: src/…/ServiceCollectionExtensions.cs• L97-117 src/…/DefaultRemoteBackendAccessor.cs• L8-24 src/…/DefaultBackendApiClientProvider.cs• L8-23 src/…/IBackendApiClientProvider.cs• L5-20 src/…/BackendService.cs• L11-64

Backend capability discovery

The backend can advertise optional features. Studio loads that feature catalog after the user is authenticated and uses it to decide which backend-dependent controls and pages are available. The catalog is tied to the current backend URL, so a change of backend does not reuse the old backend's capability result.

Studio also obtains expression descriptors from the backend. This keeps authoring choices aligned with the server that will run the workflow instead of assuming that every client supports the same expression set.

If the feature catalog is missing or access is not allowed, Studio treats the optional catalog as empty. This supports a useful limited UI instead of turning an unavailable optional endpoint into an application-wide error.

References: src/…/MainLayout.razor.cs• L49-60 src/…/RemoteFeatureProvider.cs• L10-75 src/…/RemoteExpressionProvider.cs• L7-28

Presentation and shared UI

Theme selection

Studio presents one application-wide theme pack through the shared layout. A theme pack supplies the visual theme used by MudBlazor, while the theme service manages the active theme and light or dark mode. The selected theme is configured by a stable ID under Presentation:Theme and is validated at startup.

The framework registers the built-in theme packs and selects the one named by configuration. A custom pack must register a unique ID and a provider that implements the theme contract. The layout exposes the selected ID on the shell so shared CSS and feature styling can follow the same visual choice.

References: src/…/StudioThemeOptions.cs• L5-17 src/…/ServiceCollectionExtensions.cs• L23-44 src/…/StudioThemeRegistry.cs• L9-34 src/…/StudioThemeRegistrationRules.cs• L6-47 src/…/MainLayout.razor• L3-8

Shared interaction layer

The shared framework gives feature modules common UI behavior instead of making each module build its own application frame. The main layout supplies navigation, app-bar actions, dialogs, popovers, notifications, branding, error handling, and theme updates. Shared services also cover time display, branding, code editing, content visualization, and browser interaction.

Navigation is assembled from menu contributions supplied by registered modules. The app bar follows the same pattern, so a feature can add an action without taking ownership of the global layout. Shared CSS maps the MudBlazor palette to Studio surfaces, controls, navigation, and editor affordances.

References: src/…/MainLayout.razor• L3-53 src/…/MainLayout.razor.cs• L20-82 src/…/NavMenu.razor• L1-33 src/…/ServiceCollectionExtensions.cs• L17-43 src/…/ServiceCollectionExtensions.cs• L12-37 src/…/shell.css• L16-49

Workflow product surfaces

Studio uses the platform to expose two connected workflow experiences. Authoring pages create and change workflow definitions through the remote backend, while operational pages inspect definitions, instances, execution state, and related runtime data. Both experiences share the shell, theme, backend boundary, authentication, and module services.

Read Workflow authoring and monitoring for the workflow editor, definition management, instance views, and live operational behavior.

Change checklist

When these files or sections are changed, remember to consider these:

  • When adding or removing a feature module, check host registration, route discovery, menu contributions, and the matching entry in the standard bundle.
  • When changing backend authentication or endpoint handling, keep HTTP API clients and SignalR connection configuration aligned in every supported host.
  • When adding a backend-dependent control, connect it to capability discovery so an older or limited backend does not expose a broken action.
  • When adding a theme pack, keep its provider registration, stable theme ID, Presentation:Theme configuration, and shell styling contract consistent.
  • When changing custom-element connection inputs, preserve the handoff from wrapper parameters to endpoint, credential, and tenant state before remote services are created.

Important failure modes

TriggerConsequenceGuard
Presentation:Theme is blank or does not match a registered theme IDStudio fails during startup because it cannot select an application theme.Register the theme provider and use its stable ID in the host presentation settings.
A host uses an authentication handler that does not match its selected providerBackend API or live connection calls fail with unauthorized responses.Select the provider and its matching HTTP and SignalR configuration together.
An optional backend feature is absent or returns 404Feature-gated controls are unavailable.Use the remote feature catalog and treat an absent catalog as no optional features.
A custom element receives no usable backend endpoint or credential contextEmbedded workflow components cannot load or update backend data.Set the backend context through the wrapper parameters or BackendProvider before use.

Key files

FileWhy to read it
src/studio/framework/Elsa.Studio.Shell/App.razorShows the application routing, authorization, layout, and not-found boundary.
src/studio/framework/Elsa.Studio.Shared/Layouts/MainLayout.razorShows the shared application frame and its theme, navigation, and error surfaces.
src/…/MainLayout.razor.csShows how features, themes, branding, and app-bar actions enter the frame.
src/…/ServiceCollectionExtensions.csShows the core service boundary, theme registration, and remote backend setup.
src/…/DefaultBackendApiClientProvider.csShows how feature API clients use the current backend endpoint.
src/…/RemoteFeatureProvider.csShows how backend capability state gates optional Studio behavior.
src/…/Program.csShows full server-host composition and its authentication and backend choices.
src/…/Program.csShows full WebAssembly-host composition and browser authentication choices.
src/…/Program.csShows the reduced embeddable host and its custom-element surface.
src/…/ServiceCollectionExtensions.csShows how the workflow authoring and monitoring module joins the platform.
src/studio/bundles/Elsa.Studio/Elsa.Studio.csprojShows the standard set of packages used by a complete Studio application.