Manual Trigger

Enables manual execution for Processes.

In order to specify parameters for running Processes manually, as well as for Subprocess executions, Manual Trigger is used.

You can learn more about Triggers in general here.

What is Manual Trigger?

Manual Trigger does not contain automation, instead the Trigger is executed only when user starts the Process. In Subprocesses, this is the only type of Trigger available, starting the Subprocess when called by a Process. Parameters can be added to the Trigger, which are then prompted from the user when running the Process, or in the Process development when Subprocess is added.

Usage

To use a Trigger in your Process, add it to your Process canvas, and connect it to the beginning of your Process using a Sequence flow. If you are using multiple Triggers in your Process, all Triggers must connect to the same shape, which is also the first non-Trigger shape in your Process.

Once added to your Process, you can change the Trigger's type to match your requirement and give it a unique name. By default, the Trigger's type will provide a corresponding name for the Trigger. You can then configure the parameters for the chosen Trigger type.

For Manual Trigger, you can configure as many input parameters as you need for your Process or Subprocess execution. Each parameter takes in a key, default value and description. You can use the parameter through Trigger reference values, for example #trigger.data.MyParameter for parameter named MyParameter.

When Process is started using Run once option from the Process list, the parameter values will be prompted from the user before executing the Process. When Call Subprocess shape is used to execute a Subprocess during Process execution, the parameters will be defined within the shape.

Configuration

To set up a Manual Trigger, add the shape to Process canvas and connect it as part of your Process. After that, you can select the Trigger type and configure the parameters for it.

The common parameters available for all Triggers are explained on the Trigger reference page. The following configuration parameters are available for Manual Trigger.

Use for Monitoring Rules

When enabled, this Process becomes selectable to be triggered by Monitoring Rules, whenever their conditions require alerting. Triggering a Process from Monitoring Rules is alternative to sending only an automated email message to alert recipients about a Monitoring Rule hit.

Also when enabled and triggered by Monitoring Rule, additional Trigger reference values are available to use, corresponding to values provided from the Monitoring Rule.

Only available for Processes, not Subprocesses. When used in Process, this replaces any additional input parameters that Manual Trigger normally provides.

Key

When adding a manual parameter to your Process, Key specifies the name for the parameter. It will be displayed as written for the user executing a Process manually or when Call Subprocess shape is used within a Process, and the parameter's value can be used through Trigger reference value as #trigger.data.MyParameter.

Default value

Default value for the parameter, suggested to user launching a Process manually, or when using Call Subprocess shape in a Process. If not replaced by the user, will be the value for the parameter during the execution.

Description

Explanation text field for the value's usage or format. Displayed to the user as a tooltip when exeucting a Process manually, and when using Call Subprocess shape.

Secret

Toggle option that when enabled, will hide the provided value for the parameter from Process Instance and logging. Default value and the input from user when parameter value is prompted will be shown to the user before execution, but logs do not show the value.

Reference Values

In addition to the default Trigger reference values, Manual Trigger provides the following additional values.

#trigger.data (Frends.ExecutableProcess.CaseInsensitivePropertyTree)

Object containing the data from input parameters. Any parameter defined in the Trigger will be accessible as #trigger.data.MyParameter.

#trigger.data.<MyParameter> (String)

When using Manual Trigger, the defined parameters will be available under #trigger.data reference value object as string values. Frends and Newtonsoft library working within the Process executions may deserialize the content in these parameters into other types implicitly, such as converting a date string into a date object automatically.

#trigger.data.monitoringRule (Frends.ExecutableProcess.CaseInsensitivePropertyTree)

When using Manual Trigger with Use for Monitoring Rules parameter enabled, this object will contain the parameters provided by the alerting Monitoring Rule. If Process is triggered manually, this will be null, otherwise it will contain the following fields.

emailRecipients (String[])

List of email recipients defined for the triggering Monitoring Rule.

error (String)

Error message from the Monitoring Rule, explaining why the Rule was triggered.

expectedValue (String)

Contains the Monitoring Rule's condition for triggering an alert, for example if number of matching Instances was expected to be below two, but was three.

name (String)

Name of the triggering Monitoring Rule.

triggeredProcesses (Object[])

List of objects, containing Process's GUID and Agent Group's name for all Processes triggered by the Monitoring Rule.

variableName (String)

Name of the Promoted value that the Monitoring Rule monitors.

Examples

You can learn more about Manual Trigger from the following guides and examples.

How to create integrations using Frends

Integration flows in Frends are referred to as Processes. Processes consist of elements such as Triggers, Tasks, Subprocesses, decisions and loops. Processes are created by connecting elements together and configuring their parameters.

Step by Step Tutorial Available

If you prefer more visual or interactive guidance on how to create Processes with Frends, you can find a step-by-step walkthrough from your own environment's home page, under Onboarding by selecting "Tutorial 1, Step 3: Creating my first Process" tutorial.

Creating New Process

The Process list displays the already created Processes in the Environment.

The view shows a list of Processes within Frends.
Example view of Process list.

In order to create a new Process, click on Create New button while in Process list view and having the Development Environment selected. All new Processes have to be created and edited in the Development Environment, from where they are then deployed to other Environments and Agent Groups for execution.

Showing where and how to create a new Process.
Integrations can be created from Process list view while having Development Environment selected.
Default view in Process Editor, when starting to create a new Process.
Process Editor for a new Process.

When creating a new Process, you can start by providing the Process a name and optionally a description. To use the latest versions in Frends, targeting .NET 8 is recommended, while .NET Framework 4.7.1 or .NET Standard 2.0 are only used to support legacy environments.

As an example, let's create a Process which is started manually without parameters, calls an API endpoint and then returns a result. Because the start element, called Trigger, is already provided, we can continue forward by adding a Task to the process.

You can drag or click and place the Task shape from the leftside toolbar to right of the Trigger shape.

Image shows where to select a Task shape and insert it to the canvas.
Adding a Task shape to the Process.

To make the Task perform an API call, click on the Select a Task field and search and select HTTP Request Task. When the Task type is selected, the right sidebar contents change to show the Task parameters. In here, enter the url as https://examplecrm.frends.com/api/customers and make sure Method is GET. Rest of the options can be left as-is for this example.

This image shows the parameters for the chosen Task, to perform an API call.
Parameters for the Task can be set after selecting its type.

Once the Task is configured for our use, we need to connect it to the earlier shape. To do this, click on the Connect tool from the left toolbar or from the quick toolbar next to the Trigger shape, and draw an arrow from the Trigger to the Task shape.

Here we show how to find and use Connect tool to connect shapes together.
Draw a connection from the Trigger to Task using the Connect tool.

Finally, we need to end the Process and save it. All Processes start with a Trigger, and end to a Return shape, or optionally to a Throw shape. Let's drag a Return shape to the right side of the Task, and connect it to the Task shape to create a complete Process flow.

Image showing a completed Process flow, with Return shape parameters.
Complete integration flow with return value.

For the example, we want to return the API response's body. We can do this by selecting the Return shape, and writing #result[HTTP Request].Body to the Expression field. Make sure the field's type is set to Expression, and not Text, in order to Frends consider the content as C# code and not text.

Utilizing the Auto-complete feature makes Process development faster.
Utilize the provided Auto-complete feature to fill in variable names and result objects' names quicker.

Once ready, we can validate and save the process. You can optionally provide a Description or a comment to version history, what was changed in this version. It's recommended to always include a short comment on what was done.

Saving and validating the Process is done at the bottom of the editor.
Saving and validating the Process is done at the bottom of the editor.

Validation at this point means that the Process is taken through C# compiler and checked for errors, but it does not save the Process in any way. To save the Process for testing and deployment, select Create new Process. Saving the Process also validates it for errors, but save is not done if any errors persist.

When editing a Process, the save button changes to Save changes. If you want to save your Process but not create a new version for use yet, you can instead select Create new draft from the small arrow menu. This way you can save your work even if the Process is not yet valid.

Once the saving and validation succeeds, you are taken back to Process list view with your new Process highlighted at the top of the list. From there, you can run it, deploy it or continue editing, among other options.

New Process hightlighted at the top of the Process list, with options for the Process shown.
New Process hightlighted at the top of the Process list, with options for the Process shown.
How to manually execute a Process

In order to run a Process when you need it, instead of relying on automation from the different Triggers, there's a useful action called Run once for the Processes and Subprocesses in Frends. This will execute the Process with the Manual Trigger commonly available in Processes.

Step by Step Tutorial Available

If you prefer more visual or interactive guidance on how to run Processes manually in Frends, you can find a step-by-step walkthrough from your own environment's home page, under Onboarding by selecting "Tutorial 1, Step 4: Running the Process" tutorial.

Requirements

To run a Process manually or automatically through Triggers, an Agent is required in the Agent Group the Process is deployed to. Agents are what actually perform the actions defined within Processes, so in addition to Environment and Agent Group, you will also need an Agent on a server or computer to run Processes.

Frends at a minimum comes with Development Environment with a Cloud Agent set up, so it's not required to have your own Agents running to follow this guide, but for other purposes than light testing or development, it's recommended to set up your own Agent as well.

Having a Manual Trigger in Process is not required. In case there is no Manual Trigger in a Process, an implicit Manual Trigger with no parameters will be used to trigger the Process. However, if the Process expects some values from an API Trigger for example, the values cannot be provided and the Process execution will likely fail.

How to run Process once

In order to run a Process manually, head over to Process list and select the Agent Group you would like to execute the Process in.

Use the Agent Group selection in Process list to change displayed Agent Group and its Processes.
Use the Agent Group selection in Process list to change displayed Agent Group and its Processes.

When correct Agent Group is selected, find your Process from the Process list and click on the ellipsis button to open Process actions.

You can then select Run once to launch the Process.

Picture highlighting the Run once option in Process actions.
Run once option is the first on the Process actions list.

In case there are any parameters defined in the Process's Manual Trigger, the values will be prompted from the user before starting the Process. If there are no parameters defined, the Process will launch immediately.

Once the Process has started execution, you can go ahead and open the Process Instances for the Process to see what is being done within the Process execution.

Picture shows an example of parameters being prompted in a modal dialog.
Example of parameters being prompted for manual execution.

Last updated

Was this helpful?