Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

All workflow Workflow applications contain 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, 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 part of the workflow users see and interact with when running a workflow."presentation layer." 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 later subsequent activities. User input These forms are do not have "routing" routedcapabilities, " 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 contrast, you should use On the other hand, User Decision forms 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 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 , which a user can use utilize to approve or deny the leave request.

To create a User Input form.

.

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 Modified

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

    Image Modified

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 Modified

Edit the caption in the
  1. 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

created
  1. intended for.

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

    Image Modified

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

choose
  1. select a date

from
  1. through a calendar interface.

The MultiLineString control will enable
  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 Components tree under the Other Objects node, DateTime1DateTime2, and MultiLineString1 appear.

    Image Modified
  3. 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

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 Modified

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

    Image Modified

Page Properties
hiddentrue

Next, add a new section with a Captcha control to the form. You can add Captcha controls to any form to provide security by ensuring that the user interacting with the form is an actual person, 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 Modified

  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 from String1 to Captcha.

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

    Image Modified

  6. 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 Modified

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

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

    Image Modified

    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 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 Modified

    Next, we need to add a new section to the form that can bind the properties of the person initiating the request.

  4. Click the New Section button in the Workflow Studio Form Designer Commands menu to add the new section.

    Image Modified

  5. Change the section's name to Initiator of the Request by double-clicking the default text.

    Image Modified

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

    Image Modified

In the 
  1. 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 button.

You will see a dialog that allows
  1. 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

Clicking on Add button 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 Modified

  2. Double-click directly on the Person1 text to place it in Edit mode and change the object's name to Initiator. This data property represents the Person initiating the leave request.

    Image Modified

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

    Image Modified

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

  5. 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 Modified


    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 Modified

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

    Image Modified

  4. 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 Modified

  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
      Also, make sure to choose User Decision in FormType in the form properties window.

      Image Modified

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