Skip to main content

Angular project requirements

Your app MUST be created using Angular CLI ~20 and MUST use SCSS for styling.
To install the npm libraries provided by FlowX.AI you will need to obtain access to the private FlowX.AI Nexus registry. Please consult with your project DevOps.
The library requires Angular ~20, npm β‰₯ 11.0.0 and node β‰₯ 24.0.0.

Installing the library

Use the following command to install the renderer library and its required dependencies:
Replace <version> with the correct version corresponding to your platform version.To find the right version, navigate to: Release Notes β†’ Choose your platform version β†’ Deployment guidelines β†’ Component versions.
A few configurations are needed in the project’s angular.json. To successfully link the PDF viewer, add the following declaration in the assets property:

Initial setup

Once installed, FlxProcessModule is imported in the AppModule as FlxProcessModule.withConfig({}).

Theming

Component theming is done through the @flowx/angular-theme library. The theme id is a required input for the renderer SDK component and is used to fetch the theme configuration. The id can be obtained from the admin panel in the themes section.

Authorization

It’s the responsibility of the client app to implement the authorization flow (using the OpenID Connect standard). The renderer SDK expects the authToken to be passed to flx-process-renderer as an input.
The withConfig() call is required in the app module where the process will be rendered. It accepts a config object where you can register custom components, services, and custom validators. Custom components are referenced by name in the template config for a user task. Custom validators are referenced by name (currentOrLastYear) in the template config panel under the validators section of each generated form field.

Custom interceptors

Starting from FlowX SDK version 4.6, the Angular HttpClientModule is no longer used internally for HTTP requests. A new mechanism allows you to create custom interceptors.

Request interceptors

Response interceptors

Interceptors that use dependency injection

If you need to use a service in your interceptor, use provider factories with the deps property:

Using custom icons

Analytics

The SDK provides a mechanism for collecting analytics events through a unified CustomEvent system. These events can be used to track screens and action events.
To use analytics features, import the necessary SDK module:

Emitting analytics events

Analytics events are dispatched using the pushAnalyticsData(payload: AnalyticsData) method. The SDK defines two event types:
Each analytics event should be an object of type AnalyticsData:
The value property represents the identifier set in the process definition.For ACTION type events there are additional properties:
  • component - the type of component triggering the action
  • label - the label of the component
  • screen - the identifier of the screen containing the component, if set

Listening for analytics events

Ensure that you remove the event listener on component destruction to avoid memory leaks.

Custom payload

This allows you to capture and send custom data alongside standard analytics events. When analytics custom payload is configured in FlowX Designer, the renderer automatically processes variable substitution and includes the resulting data in analytics events.
1

Receive custom payload configuration

The renderer receives the analytics configuration as a JSON string with variable placeholders:
2

Process variable substitution

The SDK replaces variables with actual values from the process data store:
3

Add to analytics event

The processed payload is included in the analytics event under the customPayload property:

Starting a process

Prerequisites

  • Process name: You need to know the name of the process you want to start. This name identifies the process in the system.
  • FlowX Project UUID: You need the UUID of the FlowX Project that contains the process. Obtain it from the FlowX Dashboard.
  • Locale: You can specify the locale to apply date, currency, and number formatting to data model values.
  • Language: You can specify the language used to localize enumerations inside the app.

Getting the project UUID

The project UUID can be obtained from the FlowX Dashboard. Navigate to the Projects section and select the project you want to start a process in. The UUID can be copied from the project actions popover.

Getting the process identifier

Open the FlowX Designer, navigate to the process, and copy the process name from the breadcrumbs. Use this value as processName.

Initializing the process renderer

The entry point of the library is the <flx-process-renderer> component. A list of accepted inputs is found below:
Parameters:

projectInfo shape


Custom components

Custom components receive data through the data$ signal input and are registered via FlxProcessModule.withConfig({ components: {} }).
The object keys passed in components MUST match the custom component names defined in the FlowX process.
data$ is a signal holding an Observable that emits a FlxCustomComponentData object each time the process model updates:
To add a custom component in the template config tree, you need its unique identifier and the data it should receive from the process model. The properties that can be configured are:
  • Identifier - enables the custom component to be displayed within the component hierarchy and determines available actions.
  • Input keys - specify the path to process data that components will use to receive their information.
  • Event Handlers - actions defined here will be made available to the custom component.

Prerequisites (before creation)

  • Angular knowledge: Custom components are created and imported using Angular.
  • Development environment: Node.js and npm set up for Angular development.
  • Component identifier: A unique identifier used to reference the component within the app.

Creating a custom component

  1. Create a new Angular component.
  2. Implement the HTML structure, TypeScript logic, and SCSS styling to define the appearance and behavior.

Importing the component

Register the component in FlxProcessModule.withConfig():

Using the custom component

Once declared, you can configure it in the FlowX Designer.

Data input and actions

The custom component receives input data from processes and can include actions extracted from a process. These allow you to configure and interact with the component dynamically.
Make sure that the Angular action names match the names of the process actions.

Custom component validation

Custom components can validate their own status using the FLX_VALIDATOR_SERVICE injection token. The service exposes:
  • validate(isValid: boolean) - validates the component
  • saveData(data: any) - saves data
  • validated$ - Observable for monitoring external submission from the process

Custom validators

You may define custom validators in your FlowX processes and pass their implementation via FlxProcessModule.withConfig({ validators: {} }).
The object keys passed in validators MUST match the custom validator names defined in the FlowX process.
The error that the validator returns MUST match the validator name.

Process end handling

The SDK provides a mechanism for handling process completion events through the (processEnd) output event. This allows you to implement custom logic when a main process reaches an end state, such as redirecting users or triggering cleanup operations. The processEnd event is triggered when the main process (not subprocesses) reaches any terminal state:
  • FINISHED - process completed successfully
  • FAILED - process encountered an error
  • ABORTED - process was manually terminated
  • Other terminal states
Only the main process triggers this event. Subprocess completions do not trigger it to avoid unnecessary interruptions during complex process flows.

Implementation


Process start handling

The SDK provides a mechanism for reacting to process start events through the (processStart) output event. It emits the new processInstanceUuid once the main process instance has been created - useful for tracking, deep linking, or storing the instance reference for later resume.

Implementation


Custom loader

The SDK provides a mechanism for customizing the loader UI displayed during process execution.

Configuration

Register custom loaders via FlxProcessModule.withConfig({ customLoader: {} }):

API specification

The custom loader configuration accepts an object of type CustomLoader:

Loader types

  • startProcess - displayed when starting or resuming a process
  • reloadProcess - displayed when reloading a process
  • defaultAction - default loader for actions when loaderType is 'action'. Used when no specific action loader is found in the actions record
  • defaultUpload - default loader for file uploads when loaderType is 'upload'
  • actions - record mapping specific action identifiers to custom loaders. When an action is executed, the SDK checks this record before falling back to defaultAction

Fallback behavior

If no custom loader is provided for a specific type, the SDK automatically falls back to the built-in FlowX loader. This ensures your app continues to function even with partial custom loader configuration.
You can use substitution tags and media library assets within your custom loader components to create rich, branded loading experiences that match your app’s design system.

Chat component

To use the FlxChatRendererComponent, import the module in your project:

Usage

Include the component in your template:
Parameters:

chatConfig parameters

The chatConfig object accepts the following properties:

Task management component

To use the FlxTasksManagementComponent, import the module in your project:

Usage

Include the component in your template:
Parameters:

Task management public API

The Angular SDK provides a comprehensive public API for building custom task management interfaces. This API allows you to fetch tasks, manage comments, handle task actions, and interact with task data programmatically.

Importing the service

Inject PublicTasksService from @flowx/angular-sdk:

Available types

Initialization

Before using the task management API, initialize the task manager resources. This fetches the view configuration, enumerations, and filter operators.
Parameters: Returns: Observable emitting an object containing:
  • view: The view configuration object (TMView)
  • enumerations: Available enumeration options for filters (TMEnumerations)
  • filterOperators: Available filter operators for each column (TMFilterOperators)

Fetching tasks

getViewTasks

Fetches tasks for a specific view with support for sorting, filtering, pagination, and search.
Parameters: Returns: Observable emitting TMPaginatedResponse<TMViewTask> with content, totalElements, totalPages.

getViewTask

Fetches a specific task by ID and token UUID.
Parameters: Returns: Observable emitting a TMViewTask object.

Task details

getTaskComments

Fetches all comments for a specific task.
Parameters: Returns: Observable emitting an array of TMTaskComment objects.

getTaskHistory

Fetches the history/audit trail for a specific task.
Parameters: Returns: Observable emitting an array of TMTaskHistory objects.

getAssignees

Fetches available assignees for a task, with optional search filtering.
Parameters: Note: The keyword must be at least 4 characters long. If shorter, the Observable will emit an error. Returns: Observable emitting an array of TMUser objects.

getBulkAssignees

Fetches available assignees for multiple tasks in bulk.
Parameters: Returns: Observable emitting an array of TMUser objects.

Task actions

executeTaskAction

Executes an action on a specific task (e.g., assign, complete, cancel).
Parameters: Available actions:
  • TaskActions.ASSIGN - assign task to a user
  • TaskActions.COMPLETE - mark task as complete
  • TaskActions.CANCEL - cancel the task
  • TaskActions.CHANGE_PRIORITY - change task priority
  • TaskActions.VIEW - view task details

bulkUpdate

Applies an action to multiple tasks at once.
Parameters:

updatePriority

Updates the priority of a specific task.
Parameters:

Comments management

addComment

Adds a new comment to a task.
Parameters: Returns: Observable emitting the created TMTaskComment object.

deleteComment

Removes a comment from a task.
Parameters:

Service state management

getView

Gets the current view configuration.

getEnumerations

Gets the current enumerations.

setView

Sets the view configuration manually.
Parameters:

Real-time updates (SSE)

initSse

Initializes an SSE connection for real-time task updates. Call after getTaskManagerResources().

getSseEvents

Gets an Observable stream of SSE events.
Returns: Observable emitting MessageEvent<string> objects.

closeSseConnection

Closes the SSE connection.
Always close the SSE connection when your component is destroyed to prevent memory leaks.

UI Flow renderer

FlxUiFlowRendererComponent renders a full UI Flow (multi-view navigation, breadcrumbs, embedded processes, and an optional chat widget) from a single component.

Usage

Parameters

Angular uses separate projectId and optional appVersionId? inputs rather than a nested appInfo object.

Starting a UI Flow

Prerequisites

  • UI Flow name: The name of the UI Flow to start, passed as uiFlowName.
  • FlowX Project ID: The projectId value, which identifies which project the UI Flow belongs to. Obtain it the same way as for processes: FlowX Dashboard β†’ Projects β†’ copy UUID from the project actions popover.
  • Process API path: The processApiPath subpath used by the embedded process renderer when the UI Flow navigates into a full-screen process.

Getting the UI Flow name

Open FlowX Designer and navigate to UI Flows. The flow name displayed in the list is the value to pass as uiFlowName.

Initializing the UI Flow renderer

Minimal working example:

Passing initial parameters: startParams

Use startParams to inject query-string key/value pairs into the UI Flow at startup. The values are available inside the flow as URL query parameters.
startParams is read once at initialization. To trigger a full re-initialization, change one of the required inputs such as uiFlowName.

Utility API

These functions and pipes are exported from @flowx/angular-sdk and can be used independently of the renderer components.
These methods should only be used inside custom components and within a process context, because internal requests depend on the presence of running project details.

getEnumeration

Async function to fetch enumeration values.

getStaticAsset

Resolves a static asset URL by its key.

getSubstitutionTag

Resolves a substitution tag value by its key.

FlxLocalizePipe

Standalone pipe for managing translations. Import it in the module or component where you want to use it:
Use in a template:
Use in a component class:

Custom CSS

The renderer SDK allows you to pass custom CSS classes on any component inside the process. These classes are applied to the component’s root element. To add a CSS custom class to a component, define the class in the process designer by navigating to the styles tab of the component, expanding the Advanced accordion and writing the CSS class.
The classes will be applied last on the element, so they override the classes already defined on the element.

Storybook

Below you find a Storybook which demonstrates how components behave under different states, props, and conditions. It allows you to preview and interact with individual UI components in isolation, without the need for a full-fledged app:

Storybook

Last modified on June 4, 2026