Have you ever wished that instead of failing, a workflow could prompt you for a missing value? That would be pretty cool, right? Today, we’ll discuss one of vRO’s often overlooked features: User Interaction. This feature is incredibly useful and has many practical applications. Two use cases, for example:
- If there’s a decision point in the workflow, someone should be able to approve it before it proceeds. This is especially important in environments where multiple people are involved in the decision-making process.
- If a variable has a null value, it would be helpful to allow someone to provide that value instead of causing the entire workflow to fail. This is particularly useful in cases where the workflow is triggered automatically and the required value is not available.
Enhancing user experience in this way would be a significant improvement!
Introduction
User Interaction is a feature introduced in vRO 5.5 that allows workflows to pause and request input from users. In vRO 8.x, it was significantly improved and involves web designer within the user interaction element. This feature is particularly useful for making workflows more interactive and user-friendly. A key aspect of User Interaction is its support for AD/LDAP groups and users, which enables the assignment of approval tasks to specific individuals or groups. If no one approves the task within a specified time frame, the workflow will fail after a predetermined duration that can be defined. For example, if a workflow may be triggered over the weekend and no one is available to approve the task, we can set it to fail after 48 hours.
If the workflow is in a
waiting
state, it will remain in that state even if vRO is powered off or restarted, as this information is stored in the database.
We will explore two methods for creating a workflow that involves user interaction. The first method utilizes the User Interaction element within the web client and REST API, while the second method involves JavaScript/Typescript coding to achieve the same goal. In this section, we will focus on the web client aspect.
How to use User Interaction
User Interaction is a canvas element that can be added to the workflow. It has the following properties:
Property Name | Type | Description |
---|---|---|
security_assignees | array/LdapUser (can be empty) | List of LDAP user/s allowed to respond to the user interaction |
security_assignee_groups | array/LdapGroup (can be empty) | List of LDAP group/s allowed to respond to the user interaction |
security_group | LdapGroup (can be empty) | LDAP group allowed to respond to the user interaction. |
timeout_date | Date (can be empty) | Absolute date, until which the workflow waits for a user to respond to a user interaction |
The workflow will pause at this element and wait for the user to provide their input. It can be integrated into the workflow with the capability for users to submit their input through the vRO web client or via the REST API.
Use case
We have a workflow that relies on a variable named var_0
. The workflow will terminate if the value of var_0
is not 123
. However, if var_0
is equal to 123
, the user will be prompted to provide a different value.
The following use case is simplified to illustrate the concept of User Interaction. In reality, it will be more complex and involve additional steps.
Standalone vRO
Using the Web Client
Let’s create a workflow and make it look like this:

Create a variable named var_0
and focus on it. In our example, we want to ensure that this variable does not hold the value 123
. If it does, we will prompt the user to provide a different value. To implement this, we will use a Decision element. Inside the Decision element, we will add straightforward logic:
if (var_0 === 123) {
return true;
} else {
return false;
}
In this scenario, we are stating that if the value of var_0
is 123
, we should return true
, allowing the workflow to proceed. Before initiating the User Interaction, it’s essential to inform users that they must provide value by emailing them. For this purpose, we will utilize a built-in vRO workflow called Send notification (TLSv1.2)
. While I won’t detail this workflow but use it, we need to supply a few values, such as the SMTP host and authentication credentials, if required. The only aspect I want to highlight is the content of the email.
Read the full story
Sign up now to read the full story and get access to all members-only posts.
Subscribe