Activity Shapes

Performing all the logic for you in processes.

Activity shapes are the elements which perform actual computation in Processes. While in Frends the Task name is used most often specifically for our pre-made connectors or activities that can be used to do a lot of tasks without any extra programming required, Task also means the other shapes used to perform predefined actions in a Process.

In addition to Tasks, activity shapes in Frends include Call Subprocess to execute Subprocesses within the Process, Code Task and Assign Variable shapes to run your own C# code, as well as Shared State Task and DMN Task, to use local cache and to perform complex decisions using Decision Model and Notation syntax, respectively.

Example picture showcasing different activity types in Frends.
Tasks and Subprocesses can be used for quickly creating functionality.

Task

Tasks are the bread and butter of Frends, providing pre-defined functionality as a drag and drop shape to the Processes. They can be used for general actions, such as making HTTP requests and converting CSV to JSON, as well as for more specific tasks, such as uploading an object to Amazon S3 or deleting an SObject from Salesforce.

Minimum viable Process using HTTP Request Task to perform data request or sending to website or API.
HTTP Request Task can be used to send or request data from websites or APIs.

Many types of Tasks are included in Frends out of the box, and more can be obtained by importing other premade Task Packages as well as your own custom Tasks to your Frends Tenant.

The Tasks are essentially pieces of C# code that are packaged and interfaced so that they can be placed into the Processes, so in case you need functionality that is not yet offered by the official or other Task Packages, it's possible to create your own Custom Tasks, or make a request for a Task to be made for you.

Call Subprocess

Call Subprocess shape is used to execute a Subprocess from within a Process or another Subprocess. Subprocesses themselves are reusable Processes, that cannot be started from outside Frends, but that other Processes in your Frends can use over and over.

Image shows a Subprocess call being used in a Frends Process.
Repetitive actions can be simplified in Process by making them into a Subprocess.

Instead of embedding the Subprocess into your Process, Call Subprocess shape sends a message over Azure Service Bus, requesting the execution of the specified Subprocess with provided parameters or data. Once finished, a response is sent back to your Process. This way the Subprocesses stay separate from your Processes, and if the Subprocess is updated, the changes are reflected to your Process as well, without requiring changes there.

Assign Variable

Assign Variable shape, also known as Expression shape, can be used to execute a single C# expression, and optionally save the result to a variable. The shape is useful for initializing values for a variable, updating value in existing variable, or performing small "oneliner" C# code expressions that modifies an object.

It is similar in function to variable assignment or single line of C# code in programming, supporting the same use cases as what can be used in such a situation. Instead of returning a value to a variable, the value the expression evaluates to will be assigned to the variable specified in the shape.

Example showing a single C# expression being used in Assign Variable shape.
A single C# expression can be executed in Assign Variable shape.

Code Task

Code Task shape, also known as Code Block or C# Statement shape, allows execution of custom C# code in Frends Processes. The code follows the styling of an anonymous function, that either simply performs operations without explicitly returning a value like a void function, or returns a value that will be saved to a variable, like the Assign Variable shape does.

Image shows Code Task being used to map a response in C# code.
Even complex C# code can be included in a Code Task.

Unlike Assign Variable shape, more than one line or expression of C# code can be used here, without clearly defined upper limit on the amount. It essentially fulfils the role of a Task more than the Assign Variable, being able to do many of the things a simple custom Task could do.

Shared State Task

Shared State can be used as a local cache in Frends Processes, to save string values into a database for specified duration, using a key to identify the value later. It can be chosen by the developer whether the value is available for all Processes in the same Agent Group, or only to the current Process being developed.

Same shape can be adjusted to perform different operations on the Shared State. One Shared State Task can then be used to read a value from Shared State using the specified key, and another can be used to store a value for that key. Other operations also include extending the Time To Live (TTL) value for the key, as well as update or delete the key and value with it.

Picture shows an example Subprocess to fetch and cache an auth token.
Shared State Task can be used to cache auth tokens for their lifetime.

DMN Task

Decision Model and Notation (DMN) Task can be used to perform business decisions and rules using easy to understand notation called DMN.

The DMN allows creation of decision models, where you specify the input variable, rules for the input, and results when a rule is matched. This is useful when different results can be obtained from a single or combination of input values, such as translating a numeric value for age to different age groups, or assigning a result value depending on different combinations of boolean input values. The rules can also result in multiple different values being returned for a single hit.

Simple example of DMN Task being shown in Frends Process Editor.
Mapping numerical value to ranges is easy with DMN Task. Multiple input values can be used for the rules.

Intelligent AI Connector

For embedding AI operator into your Processes, a new shape called Intelligent AI Connector has been introduced to Frends Processes. AI Connector allows specifying the prompt or prompts for the AI to follow, and it is able to take in and understand what came before it in the Process and what data it has available, and can then perform smart operations and deductions from the data to provide consistent and traceable results for further handling in the Process.

Example of Native AI Task being used as part of a Frends Process.
AI Connector can be used to perform single but complex operations within the Process.

While the AI Connector will not, and should not, replace most of the integration logic by itself, it is essential tool to perform more complex and fuzzy logic and operations as part of the Process, taking in some input values and then providing some output that does not require natural language processing to handle further. Rather, it will handle that NLP operation and provide you the answer in format that is easy to handle with programming.

Last updated

Was this helpful?