Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
All workflow applications contain

Workflow applications comprise several layers of technology that work together collaborate to create a composite application. When a workflow requires human interaction with a workflow is necessary, then the workflow must have , it must include a layer that allows for facilitates user input, known referred to as the "presentation layer." The presentation layer is that part of the workflow that users see and interact with when running a workflow. In Workflow Studio, the main primary element of this presentation layer is the form, which can be of comes in two types:   User Input  and and User Decision.

User Input forms allow users to enter information and submit the data back to the workflow for use in later subsequent activities. User input These forms are do not have "routedrouting" capabilities, meaning that they appear to any user currently running the workflow at that the point in the process where the User Input form is placed.

In contrastOn the other hand, User Decision forms are should be used when a form needs to be routed to someone to fill out the provide information or make a decision. User Decision These forms offer routing options and , create a workflow task for any "approvers" for at that form step stage in the workflow. User Decision forms also provide , and send email notifications to the users that when the form is being routed to an approver for a decision.

Forms provide include components that allow enable users to enter input information into a workflow and allow you, as a workflow developer, to capture data for use throughout the workflow. You design forms Forms are designed in the Form Designer and compile and publish those forms then compiled and published to the Workflow Server. Workflow Studio creates generates a special unique activity for compiled forms , known as called a "Form activity." When a form is compiled into an activity, you can drop place the resultant resulting activity onto the workflow's design surface of a workflow, making its properties—known properties, known as "dependency properties," —available accessible for use throughout the workflow.

Info

In Workflow Studio, form components comprise two category types: 

  • Primitives — allow  – allow you to place simple objects such as booleans, datetime controls, and string-based objects (i.e., fields, labels, etc.) on a form

  • RBAC components allow you to place the properties of any type of component or view (e.g., First and Last names of a Person) on a form


This topic demonstrates how to create tutorial will guide you through the process of creating forms in Workflow studio by creating both a Studio, including both User Input and a User Decision formforms, and adding multiple component types to each. Specifically, we will create a simple We will start by creating a basic User Input form that could can be used in a "Leave Request" workflow and then use that form to create . Then, we will use this form as a basis for creating a related User Decision form that could be used , which a user can utilize to approve or deny the leave request.

To create a User Input form

In the

The steps for this are as follows:

  1. Create a User Input form:

    1. In Workflow Studio, create a new form and choose the User Input form type.

    2. Name the form, for example, "LeaveRequestForm."

    3. Add components to the form, such as text fields for the leave request's start date, end date, and reason, as well as any other necessary fields.

  2. Configure the User Input form components:

    1. Set the properties for each component, such as labels, validation rules, and default values

    2. Bind the form components to the appropriate attributes or variables that will be used in the workflow.

  3. Create a User Decision form:

    1. In Workflow Studio, create a new form and choose the User Decision form type.

    2. Name the form, for example, "LeaveRequestApprovalForm."

    3. Add the same components as in the User Input form, as well as an additional component for the approver's decision (e.g., a dropdown list or radio buttons for "Approve" and "Deny").

  4. Configure the User Decision form components:

    1. Set the properties for each component, such as labels, validation rules, and default values.

    2. Bind the form components to the appropriate attributes or variables that will be used in the workflow.

    3. Configure the routing options and task assignment for the approver.

  5. Compile and publish the forms

Create a User Input form

  1. In the Workspace tree of Solution Explorer, right-click the Package node in which you want to create the form and select New User Interface > Form from the context menu.

Image Removed
  1. Image Added

  2. A form will appear in the workspace with some default naming.

Image Removed
  1. Image Added

Click on
  1. In the Properties pane,

Enter
  1. enter a name for the form in

the 
  1. the Name

 field
  1. field,

Enter
  1. and provide a title and description for the form in

the 
  1. the Title and Description

 fields
  1. fields, respectively.

Image RemovedEdit the caption in the
  1. Image Added

  2. Double-click directly on the default form tab

by double-clicking directly on the
  1. 's caption text to edit it. Change the caption

from Tab1 to 
  1. from "Tab1" to "Request for Leave.


Next
  1. " After that, add primitive controls to the form

to allow
  1. , which will enable users to

enter
  1. input information relevant to the workflow

for which
  1. the form is

being created
  1. intended for.

From
  1. Click the Add Object button from the Workflow Studio Form Designer Commands menu

, click the Add Object button
  1. .

Image Removed
  1. Image Added

  2. In

the 
  1. the "Add Object

 window
  1. " window that appears,

select the DateTime and MultiLineString objects from the Primitives tab
  1. navigate to the Primitives tab. Select the DateTime and MultiLineString objects, and then click

the 
  1. the Add

 button
  1. button.

The DateTime object uses
  1. The "DateTime" object utilizes a Calendar template, allowing users to select a date

from
  1. through a calendar interface.

The MultiLineString control allows
  1. The "MultiLineString" control enables users to

enter
  1. input multiple lines of text.

    Image Modified

  2. Open the Add Object window again and add a second DateTime object to the form's Components tree.
    In the

form's
  1. Components tree under the Other Objects node, DateTime1DateTime2, and MultiLineString1 appear.

    Image Modified
  2. To

help you
  1. make it easier to identify the purpose

for
  1. of each primitive object you just added to the form's Component tree, double-click each object name to

put the label in
  1. enable Edit mode and

change
  1. modify the names

of each
  1. to something more meaningful. For

example
  1. instance, you can change:

 
    • DateTime1 to StartDate 

    • MultiLineString1 to ReasonForLeave 

    • DateTime2 to EndDate

Add
  1. Place the components

to
  1. onto the form by dragging them from the Components tree and dropping them onto the form

in
  1. within the Form Designer.

  2. Right-click the text control and

then click 
  1. select Edit

 to
  1. to open

the 
  1. the Field Configuration

 window
  1. window.

Select the 
  1. Check the Is Double ColumnSpan

 option
  1. option and

click 
  1. click OK.

Image RemovedThis
  1. Image Added

    As shown below, the above action allows the field to spread across the form

, as shown by the below image
  1. .

Image Removed
  1. Image Added

Page Properties
hiddentrue

Next, add a new section with a Captcha control to the form. You can add Captcha controls

can be added

to any form to provide

added

security by ensuring

that

that the user interacting with the form is an actual person

and

, not a computer program or bot. The Captcha control is added to the form first as a string control and then edited to select Captcha as the type of string control to use.

To add a new section with a Captcha control.


  1. From the Workflow Studio Form Designer Command menu, click the New Section button.

Image Removed
  1. Image Added

  2. Double-click the default caption text and change it to something meaningful, such as Enter the text displayed in the below image.

  3. From the Workflow Studio Designer Commands menu, click Add Object, select String, then click the Add button.

    Image Modified

  4. In the Components tree, change the object's name

of the object
  1. from String1 to Captcha.

  2. Drag the Captcha control from the Components tree onto the new section and then right-click on it select Edit.

Image Removed
  1. Image Added

  2. In the Field Configuration dialog, deselect Use Default Control Template in the Control Types tab and click Captcha. Deselect the Show Label property and click OK.

Image Removed

From the Components tree, expand

  1. Image Added

  2. Expand the Approval Decisions node from the Components tree and select Submit and Canceled. This action adds buttons to the form that allow the request initiator to submit or cancel the request.

Image Removed
  1. Image Added

  2. Set the FormType property for the form in the Properties grid to UserInput.

Image Removed
  1. Image Added

    Once you have completed adding controls to the form, you can publish the form by clicking the Build >Publish menu following the Form Publishing wizard. When you publish the form, Workflow Studio converts it to an activity that can be placed within the workflow.

To create a

Create the User Decision form

Tip

In the following example, we use the example User Input form shown above to create an Approval or User Decision form that can be linked to it in a workflow.

  1. Open the User Input form you created above, click the Common menu, and

then
  1. click the Save As button.

  2. In the Save As dialog that appears, name the form appropriately, saving it in the package of your choice.

  3. Right-click the Enter the text displayed in the image below section and click Delete Section.

Image Removed
  1. Image Added

    Next, we need to add a new section to the form that can

be used for binding
  1. bind the properties of the person initiating the request.

To add the new section, click
  1. Click the New Section button in the Workflow Studio Form Designer Commands menu to add the new section.

Image Removed
  1. Image Added

  2. Change the section's name

of the section
  1. to Initiator of the Request by double-clicking the default text.

Image Removed

From

  1. Image Added

  2. Click the Add Object button from the Workflow Studio Form Designer Command menu

, click the Add Object button
  1. .

Image Removed

In the 

  1. Image Added

  2. IIn the "Add Object

 window
  1. " window that appears,

click the 
  1. navigate to the Rbac Components

 tab, scroll to and select Person
  1. tab. Locate and select the Person component, and then

click 
  1. click the Add

. This allows
  1. button. A dialog will appear, allowing you to drag any attributes

of
  1. associated with an EmpowerID Person onto

a
  1. the form as

a
  1. dependency

property
  1. properties.

    Image Modified

This adds

  1. After clicking the "Add" button, a component

,
  1. named "Person1

,
  1. " will be added to the Components tree located

to
  1. on the left side of the form. The "Person1" component contains the attributes

or
  1. and properties

of the
  1. related to EmpowerID Person

component
  1. objects.

Image Removed
  1. Image Added

  2. Double-click directly on the Person1 text to place it in Edit mode and change the object's name

of the object
  1. to Initiator. This data property represents the

person
  1. Person initiating the leave request.

Image Removed
  1. Image Added

  2. Expand the Initiator object node, locate the FriendlyName attribute, and drag it onto the Initiator section of the form.

Image Removed
  1. Image Added

  2. Edit the FriendlyName label, changing the text from FriendlyName to Name.

  3. From

the 
  1. the Initiator

 object
  1. object node

, locate and drag the DepartmentTitleEmail, and Telephone attributes
  1. in the Components tree, find the "Department", "Title", "Email", and "Telephone" attributes. Drag each attribute onto the form, arranging them

so that they look like the below image
  1. to resemble the image provided below.

Image Removed
  1. Image Added


    Now we want to make all of the fields on the approval form read-only as we don't want the approver to have the ability to alter the original request data. In this scenario, the fields in the Request Details section of the form will receive their values from the information entered in the Request Details section of the Leave Request form by the request initiator, while the fields in the Initiator of the Request section will receive their values from the binding that occurs between the request initiator and the initiator component we just added to the form.

  2. Right-click the Start Date field and select Edit from the context menu.

Image Removed
  1. Image Added

  2. In the Field Configuration window that appears, select Read Only from the lower pane and then click OK to close the window.

    Image Modified

  3. Repeat the above two steps for the rest of the objects in both sections of the form. Once completed, you should see only the object labels, as shown

by
  1. in the below image.

Image Removed
  1. Image Added

  2. From the Components tree, expand the Approval Decisions node and do the following to add buttons to the form that allow the approver to make a decision about the request.

    • Select Approved

    • Select Rejected

    • Select Delegated

    • Select ReturnedToSender

    • Deselect Submit

    • Deselect Canceled

Image Removed
    • Also, make sure to choose User Decision in FormType in the form properties window.

      Image Added

  1. Save your changes and publish the form to make it available to workflows as a From activity.

To publish

Publish the forms


The forms developed above will have to be deployed to make them available to workflows. Build and deployment topics are detailed in the articles below,

Batch deploy to a local folder
Deploy Publish Workflow Studio Items to EmpowerID Environment

Div
stylefloat: left; position: fixed; padding: 5px;
idtoc
classtopicTOC

In this article

Table of Contents
stylenone






Insert excerpt
IL:External Stylesheet
IL:External Stylesheet
nopaneltrue