Forms
Forms offer components that enable users to input information into a workflow, which can subsequently be collected and utilized throughout the workflow. Workflow Studio incorporates form data into a workflow through a compilation and publication process, creating a specific type of activity called a "Form activity." Upon publication, Form activities can be integrated into workflows, where Workflow Studio's drag-and-drop property binding capabilities facilitate the transfer of form data to and from other workflow objects during runtime.
Form Objects
Form Objects in Workflow Studio are divided into two categories: Primitives and RBAC Components. Primitives enable the inclusion of simple objects, such as drop-downs, calendar controls, and fields, on a form. Conversely, RBAC Components allow for the incorporation of properties from objects bound to EmpowerID-protected resources on a form. Each of these RBAC components can be employed to retrieve the properties of protected resources for use within a workflow.
For instance, if you need to capture data specific to a Person, you can add an RBAC Component for a Person object to a form. This allows you to integrate only the relevant properties (person attributes) into your form design, according to your data requirements.
Form Types
Workflow Studio offers two types of forms for workflow usage: User Input forms and User Decision forms. The choice of form depends on the desired functionality at a specific point in the workflow.
User Input forms – These forms allow users to input information and submit the data back to the workflow for use in subsequent activities. User Input forms appear to any user running the workflow at the point in the process where the form is placed. They can be used anywhere within a workflow and are often the first form encountered. For example, in a workflow that enables users to request resources or other actionable events, you can add a shape derived from a User Input form, allowing users to enter and submit their request details back to the workflow. The workflow then moves to the next step as dictated by the business requirements.
User Decision forms – These forms appear within a workflow when the process requires further user input or approval to proceed. User Decision forms should be used when a form needs to be routed to someone to provide information or make a decision. These forms offer routing options, create a workflow task for any "approvers" at that stage in the workflow, and send email notifications to the users when the form is routed to an approver for a decision.
Form Designer: The Form Designer enables you to visually design forms by dragging and dropping user interface components and controls onto the canvas. No coding is necessary, and you can create forms for various data types, from primitive types like strings to more complex types based on registered RBAC components. Once a form is published, a "Form activity" is generated and published to the EmpowerID Identity Warehouse, allowing you to use the form within a workflow.
Â
Workflow Studio Form Designer Commands
Commands | Descriptions | Image |
---|---|---|
New Tab | Adds a new tab to the form that is actively being edited. | |
New Section | Adds a new section to the form that is actively being edited. | |
Mask | Opens the Add New Mask dialog, which allows you to add a new Mask to the Components tree of the form that is actively being edited. | |
Validation | Opens the Add New Validation dialog, which allows you to add a new Validator to the Components tree of the form that is actively being edited. Validators force users to enter data in the format specified by the Validation Expression of the Validator. | |
Data Source | Opens the Add New Data Source dialog, which allows you to add a new Data Source object to the Components tree of the form that is actively being edited. Data Source objects allow you to bind form controls to objects in the EmpowerID Identity Warehouse. | |
Add Object | Opens the Add Object dialog, which allows you to add Primitives (Strings, Booleans, DateTime, etc) and Rbac Components (Account, AccountStore, Person, etc) to the Components tree of the form that is actively being edited. Once added to the Components tree, these objects can be dropped onto a form as properties for use in data binding. |
Form Components
Form Data: Primitives (Other Objects) – primitive properties defined for use in a form. It allows you to place simple objects such as booleans, datetime controls, and string-based objects (i.e., fields, labels, etc.) on a form.
Form Data: RBAC Objects – EmpowerID component objects added to a form in order to drag their properties onto the designer.
Data Sources – EmpowerID objects and methods defined for use as data sources for form controls such as dropdown lists.
Validators – regex expressions that can be applied to form fields to validate data input – e.g., email format.
Masks – defined to allow masking values from view.
Approval Decisions – the decision buttons to enable for the form activity.
Adding Fields to the Form
You can place the Primitive or RBAC Objects onto the form by dragging them from the Components tree and dropping them onto the form within the Form Designer. By default, all the fields you place on a form will render as textbox field.
You can also move tabs, fields, and sections around on the form by dragging them.
Form Field Options
EmpowerID ships an ever-growing list of control types.
Each control type has different settings / standard properties.
Many control types support data sources such as dropdown lists and auto-completes.
Forms fields can apply complex logic to determine the conditions when they should be shown or hidden.
As a matter of default, the fields integrated within a form are initially set as text fields. To transform these fields into alternative controls, such as dropdown menus or radio buttons, follow these steps: right-click on the designated text field and proceed to select the Edit option. This action will prompt the emergence of the Field Configuration dialog box. Within this dialog box, navigate to the Control Types tab, whereupon you can opt for the desired control type. Certain controls are compatible with external data sources, exemplified by the dropdown control. When binding the dropdown control with a data source, it is imperative to establish its Standard Properties, which can be accomplished by accessing the Standard Properties tab.
Likewise, if you'd like to connect your control to a datasource, you can achieve this by heading to the Datasources tab. If you wish to put validation on your control, you can accomplish that by going to the Validators tab.
Type Of Data Sources
There are three types of data sources that Form supports.
Custom List
Generated
Static
1) Custom List
Utilize a custom list datasource when you are certain that the data within the custom list will remain unchanged over time or across different environments. For example, consider the number of months in a year or the count of days in a week. The Custom List datasource option is the most straightforward to implement. Assign a meaningful name to your Data Source Name, then select 'Custom List' from the DataSource Type dropdown and click the Add button. Input the value you wish to display to the user in the 'Name' column, and in the 'Value' column, insert the value destined for utilization within the code editor or saving it in the database.
2) Generated
We use Generated type of datasource when our intention is to retrieve data from a centralized location and link it to the controls on our form. Within the EmpowerID Web UI, we have the capability to create lists and associate these lists with our datasource, subsequently connecting the datasource to dropdown controls. Consider, for instance, a scenario where we have a department dropdown containing IT, Finance, and Marketing departments. If a future requirement arises to include an additional department, such as HR, into this dropdown control, we can seamlessly achieve this by directly accessing the List in EmpowerID Web UI and appending the new department (HR). Consequently, this alteration will seamlessly propagate to our dropdown control. Conversely, if we were utilizing a Custom List type of datasource, incorporating the new department would necessitate opening the form within the workflow studio, editing it, and subsequently publishing the changes—a comparatively more extensive process.
Now let’s understand how we can create a generated datasource.
Expand | ||
---|---|---|
| ||
Admin → Miscellaneous → Lists
|
Parameter Type
There are three Parameter types that are supported.
LinkedControl
Custom Text
Activity Primitive
LinkedControl
We utilize this parameter type to transfer data from any control within our form. In the image below, we are configuring the method parameter using a FirstName text box control on your form. Thus, any value entered in the FirstName text box will be assigned to the selected parameter.
Custom Text
When this option is selected, you can directly set the parameter from within the dialog box. Enter your value in the Custom Value textbox, as shown in the image below.
Activity Primitive
Activity Primitive → Will generate two properties on the Form which can be access from the Form’s properties tab after you place your form in a workflow and the naming convention goes like this DataSource_DatasourceName_SelectedParameterName. We have seen this above in Generated Datasource Demo.