Applies to version: 2022.1.x and above, author: Krystyna Gawryał
Introduction
Users who participate in a business process take on specific roles: there are those responsible for creating documentation, registrants, acceptants, and employees who carry out tasks assigned to them or who are otherwise affected by the process.
In WEBCON BPS, the form fields that store information about a person are:
One of the data sources for some of these fields can be Domain users. This article provides a definition and instructions for creating this data source, its comparison with the BPS users data source, and a proposal for practical use based on a prepared business case.
Definition and creation of a data source
The Domain users data source allows you to retrieve current user profile data from the hierarchical AD (Active Directory) database. The data retrieval is performed dynamically and directly, i.e. it bypasses internal resources (cache) and takes place independently of data synchronization. As a result, it is also possible to retrieve such information about AD users that would not otherwise be returned.
In order to retrieve user data directly from AD, an appropriate query must be defined. To do this, use one of the existing query kinds or create your own query.
A new Domain users data source can be created by selecting the Data sources tab in WEBCON BPS Designer Studio, then the Domain users branch and New .
Then the following window opens in the program:
Source configuration requires entering basic properties, such as Name or Connection properties. If a custom query kind is selected, it is crucial to enter a filtering Active Directory query that will return specific data source items.
The source configuration also allows you to specify the primary Organizational Unit (OU) under which users will be searched, and to select the columns returned by the source.
BPS users vs. Domain users
Table 1 below shows the basic differences between the BPS users source and the AD-based source.
Table 1. A compilation of the differences between the selected data retrieval sources
As can be seen from the table above, the Domain users source should be used only in cases where it is absolutely necessary and the user cannot obtain the data of interest using the BPS users source.
Business case
A process will be created in which selected WEBCON BPS users will be informed about the scheduled webinar “WEBCON BPS – What's New”. Their task in the process will be to confirm their participation. The process will be of statistical nature – it will allow the organizers to obtain information on the estimated number of participants in the event.
For this purpose, the following workflow is created:
The subject of the workflow will be a webinar registration form with an attachment, on which only a person from the group of active users – that is, those who have recently logged on to their accounts (since 11/4/2022 inclusive) – can be indicated as a webinar participant.
Accordingly, a new Domain users data source called “Most current user profiles” will be created for the process. This will reduce the number of results received and prevent situations where an inactive user is selected from the list by mistake.
Data source configuration
When configuring the data source, you need to specify the Query kind. In the present case, it will be Custom (from selected OU).
Then, to get the data of only those users who logged on to their accounts from 11/4/2022 (from 8:00 AM) inclusive, create the following query to the LDAP source:
Examples of other LDAP filters are given in Table 2 later in this article.
You have also the option to specify exactly which columns will be returned from AD. To do this, check the boxes next to the preferred values in the Columns returned from Active Directory section.
In addition, to add a non-default column with an attribute value from Active Directory, click on the plus icon located on the bottom bar in the source configuration window, and then enter its name and description.
During configuration, the attributes “title” (Position) and “employeeid” (ID, in which the employee ID from the external ERP system is stored, were added. Other columns have also been specified (e.g., “manager,” “descirption,” etc.), which will not be used in the present workflow; however, they may prove useful in other processes in the future, facilitating the search for users.
Table 3 later in the article shows examples of attributes from AD that can be used to create Domain users data sources.
Making the above changes allowed to configure the following data source:
Using the source
The newly configured source can be used to feed:
Due to performance considerations, it is not recommended to use this type of source as a dictionary for the Dropdown list.
As previously mentioned, an appropriate form has been prepared for the process. One of the workflow instance fields is a Choice field named “Participant” fed with the newly configured data source “Most current user profiles”, set as a Popup search window :
The Advanced configuration of the form field, on the other hand, allows you to define a column with a unique person identifier and its name displayed on the form. Here you can also specify the names of other columns available in the Popup search window, based on which it will be possible to search for a webinar participant.
Moreover, indicating the appropriate fields in the Target field column will cause the corresponding controls on the form to be automatically filled in with the user's data from AD. In the example discussed here, these will be “E-mail address” and “Position”.
The form in the “Webinar registration” start step looks as follows:
According to the figure above, only the “Participant information” section requires completion. After clicking on the Choice field icon marked in red, a dialog box is displayed, where the registrant can now easily and quickly indicate a person from among the users who meet the query criteria – users who last logged on at least on November 4, 2022 at 8:00 AM.
After selecting an employee, the related fields on the form will be automatically filled in with data returned from Active Directory.
The workflow is configured so that the "Participant" is the person who will receive the form after going through the "Notify" path. Once the required fields are correctly filled in, the form in the final positive step “Particiaption confirmed” will look as follows:
Other application examples and data filtering by LDAP queries
The Domain Users data source can be helpful in many cases when it is reasonable to retrieve data of users assigned to a specific group (domain) in AD, for example, a subsidiary, a local branch of an enterprise, a company's board of directors, employees, interns. With a properly defined function returning data, it is possible to narrow down the results received from AD, such as a list of devices, a list of inactive/blocked user accounts, or accounts that were logged on x times – see Table 2.
Table 2. Examples of LDAP queries that filter data
Active Directory attributes
The section Columns returned from Active Directory of the Domain users data source window contains specific attributes that, when checked, will be retrieved from AD. The selected attributes with their explanations are shown in Table 3.
Table 3. Examples of attributes for Active Directory users