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   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 you to place simple objects such as booleans, datetime controls, and string-based objects (i.e., fields, labels, etc.) on a form

  • RBAC

     components —

     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

Add
  1. In the Workspace tree of Solution Explorer, right-click the Package node in which you want to create the form and select

 
  1. New

Item >
  1. User Interface >

EmpowerID
  1. Form

 from In the New EmpowerID Form wizard that appears, click Next.
Image Removed
Enter
  1.  from the context menu.

Image Removed
  1. Image Added

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

    Image Added

  3. In the Properties pane, enter a name for the form in the

 
  1. Name

 
  1. field

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

 
  1. Title and Description

 fields and click Next.
  • Enter Forms in the Select or enter group here field and click Next to finish the wizard.
  • Edit the caption in the default form tab by double-clicking directly on the caption text
    1. fields, respectively.

      Image Added

    2. Double-click directly on the default form tab's caption text to edit it. Change the caption from

     
    1. "Tab1

     
    1. " to

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

    Command ribbon, click the Add Object button
    1. Commands menu.

    Image Removed
    1. Image Added

    2. In the

     
    1. "Add Object

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

     
    1. button. The

     
    1. "DateTime

     
    1. " object

    uses
    1. utilizes a Calendar template, allowing users to select a date

    from
    1. through a calendar interface. The

     
    1. "MultiLineString

     
    1. " control

    allows
    1. enables users to

    enter
    1. input multiple lines of text.

      Image Modified

    2. Open

    the 
    1. the Add Object

     window
    1.  window again and add a

    second 
    1. second DateTime

     object
    1.  object to the form's Components tree.
      In the

    form's
    1. Components tree under the Other Objects node, DateTime1, DateTime2,

    and 
    1. and MultiLineString1

     appear
    1.  appear.

    To help you identity
    1. Image Added
    2. To 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 
      •  to StartDate 

      • MultiLineString1

     to 
      •  to ReasonForLeave 

      • DateTime2

     to 
      •  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

     
    1. to open the

     
    1. Field Configuration

     
    1. window.

    Select
    1. Check the

     
    1. Is Double ColumnSpan

     
    1. option and click

     
    1. OK.

    Image Removed
    This
    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

    ribbon
    1. menu, click

    the 
    1. the New Section button.

    Image Removed
    1. Image Added

    2. Double-click the default caption text and change it to something meaningful, such

    as 
    1. as Enter the text displayed in the below image.

    2. From the Workflow Studio Designer

    Command ribbon, click 
    1. Commands menu, click Add Object, select String, then click the Add button.

      Image Modified

    2. In the Components tree, change the

    name of the object from String1 to 
    1. object's name from String1 to Captcha.

    2. Drag

    the 
    1. the Captcha

     control
    1.  control from the Components tree onto the new section and then right-click on it

    select 
    1. select Edit.

    Image Removed
    1. Image Added

    2. In

    the 
    1. the Field Configuration

     dialog
    1.  dialog,

    deselect 
    1. deselect Use Default Control Template

     in the 
    1.  in the Control Types

     tab
    1.  tab and

    click 
    1. click Captcha. Deselect

    the 
    1. the Show Label

     property
    1.  property and

    click From
    1. click OK.

    Image Removed
    1. Image Added

    2. Expand the Approval Decisions node from the Components tree

    , expand the Approval Decisions node and select Submit and 
    1. 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 
    1. the FormType

     property
    1.  property for the form in the Properties grid

    to 
    1. to UserInput.

    Image Removed
    1. Image Added

      Once you have completed adding controls to the form, you can publish the form by clicking

    the Compile and Publish button located above the Form Designer and
    1. 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 tab in the Workflow Studio ribbon and then click the Save As button.
    Image Removed
    In the Save As dialog
    1. 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 
    1. the Enter the text displayed in the image below

     section
    1.  section and

    click 
    1. 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 the 
    1. Click the New Section

     button
    1.  button in the Workflow Studio Form Designer Commands

    ribbon
    1. menu to add the new section.

    Image Removed
    1. Image Added

    2. Change the

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

    Image Removed
    1. Image Added

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

    ribbon, click the Add Object button
    1. menu.

    Image Removed
    1. Image Added

    In
    1. IIn the

     
    1. "Add Object

     
    1. " window that appears,

    click
    1. navigate to the

     
    1. Rbac Components

     
    1. tab

    , scroll to
    1. . Locate and select

     
    1. the Person component, and then click

     
    1. 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 
    1. the Person1

     text
    1.  text to place it

    in 
    1. in Edit

     mode
    1.  mode and change the

    name of the object to 
    1. object's name to Initiator. This data property represents the

    person
    1. Person initiating the leave request.

    Image Removed
    1. Image Added

    2. Expand

    the 
    1. the Initiator

     object
    1.  object node, locate

    the FriendlyName attribute
    1. the FriendlyName attribute, and drag it onto

    the 
    1. the Initiator

     section
    1.  section of the form.

    Image Removed
    1. Image Added

    2. Edit

    the 
    1. the FriendlyName

     label
    1.  label, changing the text

    from FriendlyName to 
    1. from FriendlyName to Name.

    2. From the

     
    1. Initiator

     
    1. object node

    , locate and drag the Department, Title, Email, 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 
    1. form read-only

     as
    1.  as we don't want the approver to have the ability to alter the original request data. In this scenario, the fields in

    the 
    1. the Request Details

     section
    1.  section of the form will receive their values from the information entered in

    the 
    1. the Request Details

     section
    1.  section of

    the 
    1. the Leave Request

     form
    1.  form by the request initiator, while the fields in

    the 
    1. the Initiator of the Request

     section
    1.  section will receive their values from the binding that occurs between the request

    intiator
    1. initiator and the initiator component we just added to the form.

    2. Right-click

    the 
    1. the Start Date

     field
    1.  field and

    select 
    1. select Edit

     from
    1.  from the context menu.

    Image Removed
    1. Image Added

    2. In

    the 
    1. the Field Configuration

     window
    1.  window that appears,

    select 
    1. select Read Only

     from
    1.  from the lower pane and then

    click 
    1. click OK

     to
    1.  to close the window.

      Image Modified

    2. 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 
    1. the Approval Decisions

     node
    1.  node and do the following to add buttons to the form that allow the approver to make a decision about the request.

    Select 
      • Select Approved

    Select 
      • Select Rejected

    Select 
      • Select Delegated

    Select 
      • Select ReturnedToSender

    Deselect 
      • Deselect Submit

    Deselect Canceled
    Image Removed
      • Deselect Canceled
        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 forms

  • Open the form you want to publish.
  • From the Workflow Studio toolbar located above the Form Designer, click the Compile and Publish button.
    Image Removed
    In the Form Publishing wizard that appears, click the Next button.
    Image Removed
    Select the server to which you want to publish the form and click Next.
    Image Removed
  • Click Next again and wait for the wizard to compile the form and publish it to the hosting server.
  • Select Yes when prompted to restart one or more services.
    Image Removed
    In the Active Services window, select Web Role Service on the hosting server and click the Restart button.
    Image Removed
  • Click Yes when prompted to restart Workflow Studio.
  • Click Yes to save changes to any opened files.
  • Infoiconfalse

    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
    Publish Workflow Studio Items to EmpowerID Environment

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

    Divstylefont-size: 1rem; margin-bottom: -65px; margin-left: 40px;text-transform: uppercase;

    In this article

    Table of Contents
    stylenone






    Insert excerpt
    IL:External Stylesheet
    IL:External Stylesheet
    nopaneltrue