Skip to main content

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."

How Forms Work

When you create and publish a form in Workflow Studio:

  1. The form is compiled into a Form activity
  2. Form fields become dependency properties on the activity
  3. The Form activity is published to the EmpowerID Identity Warehouse
  4. The activity becomes available in the Activity Toolbox for use in workflows

Once published, 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 Components

Form components in Workflow Studio are divided into two categories: Primitives and RBAC Components.

Primitives

Primitives enable the inclusion of simple objects on a form for capturing standard data types:

  • String fields for text input
  • Drop-down lists for selection
  • Calendar controls for date/time input
  • Boolean checkboxes
  • Numeric fields for numbers
  • Email fields for email addresses

Use primitives when you need basic data collection without connection to EmpowerID resources.

RBAC Components

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 workflow initiator with an EmpowerID identity, 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.

Common RBAC Components include:

  • Person (for user attributes)
  • Account (for account information)
  • Group (for group properties)
  • Business Role (for role data)
  • Location (for organizational location)

Use RBAC Components when your form needs to interact with or display data from EmpowerID-managed resources.

Form Types

Workflow Studio offers two types of forms for workflow usage. The choice of form depends on the desired functionality at a specific point in the workflow.

User Input Forms

User Input 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.

Common use cases:

  • Resource request forms where users specify what they need
  • Profile update forms where users edit their information
  • Search forms where users enter criteria to find resources

For example, in a workflow that enables users to request resources, you can add 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

User Decision forms appear within a workflow when the process requires further user input or approval to proceed. Typically, User Decision forms derive their data from a User Input form and are used when a response to that data is necessary.

Based on the User Decision Form Base Activity developed by EmpowerID, these forms offer routing options, create workflow tasks for approvers, and send email notifications about the request to all relevant parties. When a workflow encounters a User Decision Form activity, it enters an idle state until a response or escalation occurs.

Key characteristics:

  • Create tasks for designated approvers
  • Send email notifications automatically
  • Support approval routing logic
  • Put workflows in idle state until decision is made

Continuing the previous example, after a user submits a resource request via a User Input form, you could add a User Decision form as the next step, requiring approval for the workflow to advance.

Form Data Objects

When working with forms in workflows, form data is represented by data objects that follow a specific naming convention. To name the data object for a form, always begin with the word "Target" followed by the resource type.

Examples:

  • TargetPerson - for forms working with Person data
  • TargetAccount - for forms working with Account data
  • TargetExchangeMailbox - for forms working with Exchange mailbox data

This naming convention ensures consistency across your workflow development and makes it clear what type of resource the form is manipulating.

Form Activities

When a form is published in Workflow Studio, a unique "Form activity" is generated and published to the EmpowerID Identity Warehouse. In this activity type, form fields are created as dependency properties, allowing you to leverage the drag-and-drop property binding capabilities of Workflow Studio to send data to and from the form.

Using Form Activities in Workflows

To incorporate an existing published form in a workflow:

  1. Search for the form activity in the Activity Toolbox
  2. Drag the form activity onto the Workflow Designer
  3. Use the Bindings tab to bind form properties to workflow properties
  4. Connect the form activity to other activities with flow lines

The form's properties become available for binding to other workflow components, enabling seamless data flow throughout your workflow process.

Accessing Form Data in Code

Form data can be accessed in code through the form activity's properties. For example, if you have a form with a FirstName field:

// Access form data
string firstName = this.MyFormActivity.FirstName;

// Set form data
this.MyFormActivity.FirstName = "John";