Process

Main integration flow in Frends.

Processes are the integrations flows within Frends, meaning that all end-to-end integrations are called Processes, regardless of whether they are run on schedule or not, and act as an API or any other integration pattern.

What are Processes?

All orchestrations or integration flows in Frends are done through Processes. While parts of the execution flow may be embedded inside Subprocesses, everything starts and ends with a Process.

Processes are started by Triggers, which define the starting event for all Processes. Frends Agent is responsible for handling the start of the Processes according to the Triggers activated on the Agent. You can learn more about the technical details of how this works from the Architecture section.

Processes are built using BPMN 2.0 notation that is enhanced with C# programming. Frends includes a subset of BPMN 2.0 notation in the Process Editor, providing key shapes to creating cohesive process flows that are easy to understand by both non-technical personnel as well as for developers.

Process Editor is built in to the Frends Control Panel.

Frends includes functionality built in to the BPMN shapes, making them perform actions instead of being purely visualization notation. Task shapes can be used to perform singular actions, such as making a HTTP request or parsing CSV file into JSON. Decision shapes can be used to create conditional execution paths within Processes by using boolean expressions. Iterative Scope shapes can be used to create loops and iterations.

And in order to add programming into the low-code method of development, parameters for each shape allow using C# code to provide the input and alter their functionality to suit your use case. Specific shapes also allow including custom C# code, allowing you to perform more complex actions in smaller space.

Code Task can be used to execute C# code.

When a Process is created, it is converted into C# code and compiled using .NET. The .NET platform is used to run both the Frends Agent as well as the Processes triggered by the Agent. Processes are executed in their own execution context by the Agent, but running in the same .NET runtime instance as the Agent.

Usage

How to create and use Processes in Frends.

Creating Processes

Processes can be created through Processes view in Frends. The view itself lists all the Processes created in your Frends Tenant, in the chosen Agent Group. Development Environment and Agent Group are usually the default selection, where all Process development is also done before deploying the Processes to other Agent Groups. Thus, the default Development Agent Group also includes all the Processes created in your Frends Tenant.

Default Processes view in Frends.

In order to create a Process, make sure you have your default Agent Group selected from the Environment and Agent Group selector, and click Create new button to open the Process Editor for a new Process.

In order to edit an existing Process, search for it on the list of Processes, and click on Edit or on the Process' name in order to launch the Editor for it.

Note that at least Editor role or Process.Edit permission is required to create and edit Processes. Without editing permission, you can only view the existing Processes in the Editor, but not work on them. Create new button will also not be shown without the permission.

Learn more here on how to create Processes with Frends.

Using Processes

Usage of Processes depends on the Triggers chosen for them, or in other words the Trigger or the starting event defines how the Process can and will be used.

At its simplest, each Process can be executed manually by selecting Run Once option in Process list view. By defining a Manual Trigger for the Process you can give the manual execution parameters that were defined for the Trigger.

Other Trigger types provide an automated method of starting a Process when the conditions are met. Schedule Trigger enables starting a Process based on time, while a File Trigger enables launching a Process when a file is added to a folder.

You can learn more about available Triggers from here.

APIs and API Trigger are tied to the API Management feature of Frends, allowing the Process to be triggered when an incoming API request calls for it. Each API endpoint in Frends is tied to a Process that implements the API endpoint.

In order to have the Triggers perform automation, they need to be deployed to and activated on a Frends Agent. Activation is controlled from the Process list view on a per Process level.

Process Logging & Monitoring

Monitoring and logging for Processes are based on Process Instances, which are singular executions of Processes. Each Process Instance by default contains the provided input parameters and data for the Process, resulting data for each shape in the Process for this execution, as well as the return values from the Process, if any.

Process Instance shows the execution details for each shape.

Amount of logged data can be adjusted using log level settings, available for each Process separately as well as on Environment level options. Logged data can be increased to log also the input parameters for each shape, or decreased by logging only errors arising from the Processes, while skipping the rest of the data.

In addition to general log level options, specific data points can also be logged by defining Promoted Values in a Process. Defining the values is done during Process development, and can include anything that is deemed necessary for the analysis of Process execution. All Promoted Values are shown in the Process Instance logs, and the values will be logged even if the log level is decreased to errors only.

Process Instance list view shows the executions for each Process.

Process Variables

Process Variables can be used to initialize and set default values to be used within Processes. The variables are initialized right after the Process is triggered and the Triggers have been executed, and before anything else in the Process has been done. As such, the Process Variable values are available to use in the Process right after the Triggers, but not within the Triggers.

Much like the variables created using Assign Variable shape, Process Variables provide the #var reference value for each variable created.

Configuration

The following parameters and configuration options are available for Processes in Frends. Note that more options tightly related to Process trigger conditions and return values are contained in each Trigger and Return shape, instead of directly on a Process.

Name

Displayed name for the Process in Frends UI. Has to be unique within the Frends Tenant, but can be changed whenever if necessary.

Each version of each Process will receive a unique ID that is being used to reference the Process in the backend, instead of the name.

Version

Version number of the Process. Versioning for Processes follow the semantic versioning scheme, with the build number being automatically incremented for each time a Process is changed and saved. Major and Minor version numbers do not contain automatic incrementing, and can be changed by the developer if needed, for example whenever a new version with major changes is started.

Last modified

Shows when and who edited the Process last time.

Description

Short description field available to provide more information about the Process in the Process list view. Any content provided here will be shown as subtitle for the Process in the Process list.

Links to external content will be functional.

Documentation

Frends provides a built in method to create and save documentation for each Process. Markdown formatting can be used to write the documentation, and Frends AI Assistant can be used to generate the documentation automatically.

AI generated documentation for a Process.

Subprocess to call on unhandled error

Enables execution of a chosen Subprocess in case the Process execution ends in an unhandled error. This can be used to automate error reporting into a ticketing system, or to perform mandatory cleanup actions in case something undefined happened during an execution.

Subprocess to call on unhandled error will be executed only after a Process execution has failed and is about to end, and thus cannot be used to recover or continue the Process execution. You can use for example Try, Catch and Scope shapes in the Process logic instead to perform error handling within the Process flow.

If the Subprocess to call on unhandled error has included any parameters in its Trigger, these can be defined for the Process. When using reference values (#var, #env, #process or #result) from the Process to define these parameters, make sure the values have been created in the Process before the error can occur, otherwise the error handling Subprocess will fail to execute. #process, #env and specifically #var.error reference values are always available to use for error handling Subprocess.

Target framework

Each Process can be compiled using different .NET versions that Frends supports.

All the latest features are provided for the newest .NET platform, version 8.0, which is the current default target framework for Frends Process development.

.NET Framework 4.7.1 is provided for supporting legacy Frends environments, which do not yet support .NET 8.0 or use functionality that is no longer available in newer Frends versions.

.NET Standard 2.0 is the third alternative, that can be used to migrate legacy versions of Frends and Frends Processes to newer platforms. Older and legacy versions of Frends support both .NET Framework 4.7.1 and .NET Standard 2.0, and .NET Standard 2.0 is also supported by the newer Frends versions.

While supported, note that no new development is being made for targeting .NET Standard 2.0, so it is only useful for allowing migration to newer platform, while retaining the old functionality.

Disable caller cancellation

When enabled, the Process execution continues even if the caller or Trigger cancels the request.

For example if a HTTP request to Frends is cancelled due to timeout or user action, the Process execution would be stopped as well, unless this option is enabled.

Process Actions

In addition to configuration options and parameters, Processes also include some additional actions that you can use.

Import BPMN

The Process Editor in Frends supports importing BPMN 2.0 diagrams using the Import BPMN function in Process parameters. BPMN diagrams can be imported in text, xml or bpmn formats.

Note that Frends does not support full range of BPMN 2.0 shapes, and any non-supported shapes will either not be imported, or will be replaced by their more simple form that Frends supports.

Also note that exporting and importing Frends Processes is not done through BPMN diagram files. Exporting and importing Frends Processes uses instead a proprietary JSON format file to include both the BPMN diagram as well as related C# code and parameters defined for each shape, which are not part of the BPMN standard.

Export BPMN XML

Enables exporting the BPMN diagram for the Frends Process in XML format. Note that only the BPMN diagram will be exported, but none of the Frends Process functionality will be included. This feature is solely for including the BPMN in documentational use cases.

Save as picture

Exports the Frends Process diagram as an SVG file.

Show changelog

Shows the version history for the Process.

Diff

Comparison tool to compare different versions of the Process. The diff tool highlights any changes, additions and deletions between the versions.

Reference values

Processes include #var and #process reference values to be used in the Process.

#var

Representing a variable in Frends Processes, #var reference values can be created as Process Variables from the Process's general parameters, or during Process flow using Assign Variable or Code Task shapes with Assign variable parameter enabled.

All methods to create variables in Frends Processes require defining a name for the variable. The variable can then be used as #var.MyVariable, if MyVariable is set as the variable's name.

#process

Process reference values are set for each Process Instance, and contain information about that Process Instance as well as about the Process in general. The Process reference values also contain objects that are related to the execution flow of the Process.

#process.agent (String)

Name of the Frends Agent that executed the Process.

#process.agentGroup (String)

Name of the Agent Group where the Process was executed in.

#process.cancellationToken (System.Threading.CancellationToken)

Enables cancellation of a longer operation within the Process, such as loops, if the Process execution needs to be terminated. Without using cancellation token some executions could not be terminated before they are complete.

#process.environment (String)

Name of the Environment where the Process was executed in.

#process.executionId (String)

Unique ID for the Process Instance.

#process.id (String)

Unique ID for the Process, for the specific version of the Process that was executed.

#process.name (String)

Name of the Process that was executed.

#process.uri (String)

URI for the Process that was executed. Contains the Process type (Process or Subprocess), its unique identifier, as well as the build version.

#process.version (String)

Version of the Process that was executed.

Last updated

Was this helpful?