Versions Compared

Key

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

This tutorial demonstrates how to create a simple EmpowerID workflow that can be deployed in your environment to update the attributes of an EmpowerID Person. The purpose objective of this tutorial is to guide walk you through the steps for completing to build a fully functional workflow comprised of containing common workflow components. In this tutorial, these components include the followingconsist of:

  • A Lookup Control — Lookup  – Lookup Controls are User Interface user interface elements that can be placed in incorporated into a workflow to allow , enabling users to search for EmpowerID objects. In this tutorial, we will 'll create a Lookup that can be used to search for a person.

  • A Form — Forms are User Interface elements that you place in a workflow to allow users to provide information to the workflow – Forms are user interface elements that can be added to a workflow, allowing users to input information. In this tutorial, we will 'll create a form that allows for users to enter information details about the person they searched for in using the Lookup.

  • An Operation Activity — Operation  – Operation activities are protected secure workflow shapes that you place on the workflow to perform the actions of the workflow. Workflows can contain Depending on the complexity, workflows can have multiple Operation activities, depending on their complexity. In this tutorial, we will 'll use a single Operation activity that when executed updates to update an attribute on of a person. In EmpowerID, this person is known , known as the "target person" in EmpowerID."

When you have completed this tutorial, you should have a foundational understanding of the various components and principles involved with creating EmpowerID workflows that can be used as a basis for creating more complex workflows.

To create the workflow, we you will do the following:

  • Create a project folder. In Workflow Studio, a project folder is a container that provides a logical structure through which you can manage workflow applications and all the components associated with them.

  • Create and publish a Lookup Control that allows users to search for a person

  • Create and publish a form with fields bound to an EmpowerID Person

  • Build the workflow, adding to it the Lookup Control and form, as well as a Multi-Operation Operation Activity that verifies whether the current person attempting to edit the person has the appropriate access to do so.

  • Bind the appropriate properties of the workflow activities to one another to ensure that the workflow data remains consistent throughout its ' relevant properties to maintain consistent data throughout the workflow's lifecycle.

  • Publish and test the workflow.

Create project folders

  1. In Workflow Studio,

click on
  1. select the Solution Explorer tab to the left of the IDE.

Image Removed
  1. Right click the parent source control node and select New Folder from the context menu.

Image Removed
  1. Image Added

  2. Enter a name for the folder and click OK.

Image Removed
  1. In the Folders dialog that appears, select

Workflow>Applications and then click OK.Image Removed

Right click the new folder node and select Add Item Folders.

Image Removed

Select User Interface>Forms and User Interface > Lookup Controls and then click OK.

Image RemovedAfter Source Control updates, you should see the folders in your tree.Image RemovedCreate and publish a lookup for the workflow
  1. the following subfolders to organize the items you create in this tutorial:

    • User Interface > Forms

    • User Interface > Lookup Controls

    • Workflows > Activities

    • Workflows > Applications

  2. Click OK to add the subfolders and close the dialog.


    The Workflow Studio Source Control updates to show the new folder in the Source Control tree.

Image Removed
  1. Image Added

Create and publish a lookup for the workflow

  1. Expand the New folder > User Interface folders.

  2. Right-click

on
  1. the Lookup Controls folder

you just created
  1. and

select 
  1. select New User Interface > Lookup

Control
  1. .

Image Removed
  1. Image Added


    This opens the new Lookup Control in the Workflow Studio Lookup Designer.

Image Removed
  1. Image Added

  2. In the Properties grid, set the Title property to Hello World Person Lookup and the Description property to Search for a Person.

Image Removed
  1. Image Added

  2. In the Properties grid, set the Type property to Single. Setting the Type to Single allows users to select only one person.

Image Removed
  1. Image Added


    Next, we need to bind the Lookup Control to the PersonView component object to allow us to add grid columns related to that component.

  2. In the Lookup Control Data Pane located at the bottom of the designer, do the following to set the Lookup Control to return a list of people.

    1. Click the Component Object drop-down list and select PersonView. The Component Object drop-down list contains a list of class definitions that relate to the objects EmpowerID protects, and the PersonView object provides a consolidated view of all the data fields associated with EmpowerID people.

    2. Click the Data Method drop-down list and select the GetAllSearch(string columnsToSearch, string textToSearch) method. This method returns all people contained in the EmpowerID Identity Warehouse to the Lookup Control.

      The following image shows what the Lookup Control Data Pane looks like with the above selections made.

Image Removed
    1. Image Added

Now that the component object for the Lookup Control has been set, click the Set Grid Type button in the Lookup Designer ribbon to set
  1. In the Properties grid, set the GridType property to Person. Setting the grid type for

the designer.Image RemovedIn the Set Grid Type window that appears, select Person from the drop-down and click OK. Setting the grid type for Lookup Controls in this way automatically adds the columns associated with the In the Confirm dialog that appears, click Yes to continue.
  1. Lookup Controls in this way automatically adds the columns associated with the component object you are binding to the Lookup Control. This allows you to provide a consistent look to your Lookups and makes it easier for localization as the default grid-type columns are already localized.

Image Removed
  1. Image Added

  2. Click the Save button above the designer and browse to the User Interface > Lookup Controls folder.

  3. Enter HelloWorldPersonLookup as the file name and then click Save.

Image Removed
  1. Image Added

  2. Next, do the following to publish the Lookup to your local file system

by following the below steps
  1. . When you publish the Lookup, Workflow Studio converts it to an activity that can be placed within the workflow.

    1. From the toolbar located above the Workflow Studio Designer, click the Compile and Publish button.

Image Removed
    1. Image Added

    2. In the Lookup Publishing wizard that appears, click the Next button.

Image Removed
    1. Image Added

    2. Select the server to which you want to publish the Lookup and click Next.

Image Removed
    1. Click OK to close the Publishing action completed successfully!

 messagebox
    1.  message box

Image Removed
    1. Select Yes when prompted to restart Workflow Studio. 

    2. Select Yes to save changes to any opened files.

Now that the Lookup has been created and published, the next step is to create and publish the workflow form.

Create and publish a form for the workflow

  1. Right-click the Forms folder you created earlier and select 

Add
  1. New

Item >
  1. User Interface >

EmpowerID
  1. Form.

Image Removed
  1. Image Added


    This opens the form with the default tab in the Workflow Studio Form Designer.

Image Removed
  1. Image Added

  2. Edit the caption in the form tab by double-clicking directly on the caption text.

  3. Change the caption from Tab1 to Person.

  4. Repeat the process for the form section text, changing it from Tab1 Section1 to Name Information.

    The tab and section caption should look like those

depicted
  1. shown in the below image.

Image Removed
  1. Image Added

  2. When a user runs the Hello World workflow,

we want
  1. it is desirable for the form to

have certain
  1. display specific fields pre-populated with attribute data, such as the target person's name information. This

is accomplished through adding 
  1. can be achieved by adding Form Data

 components
  1. components to the form. To

do
  1. accomplish this, click

the 
  1. the Workflow Studio Form Designer Commands tab and select Add Object

 button in the Form Designer ribbon
  1. .

Image Removed
  1. Image Added

  2. In the Add Object window that appears, click the Rbac Components tab, select the Person component, and then click the Add button.

Image Removed
  1. Image Added


    This adds a component, named Person1, to the Components tree located to the left of the form. The Components tree

contains
  1. holds bound objects and other types that can be

used when
  1. utilized while designing forms. The Person1 component

contains
  1. comprises attributes and properties

related to
  1. associated with the EmpowerID people in your environment.

Image Removed
  1. Image Added

  2. Double-click the Person1 component text and change the name to TargetPerson.

  3. Expand the TargetPerson node to reveal the attributes available for the Person component.

Image Removed
  1. Image Added

  2. From the TargetPerson node in the Components tree, scroll to the FirstName object and drag it onto the form's design surface

of the form
  1. .

When
  1. As you

are dragging
  1. drag the object, you'll notice

that 
  1. that FirstName

 becomes
  1. is outlined by a green rectangle, and the mouse cursor icon changes,

indicating
  1. signifying that you are

performing
  1. executing a drag-and-drop operation. The blue rectangle indicates the location where you are dropping

the 
  1. the FirstName

 object
  1. object.

Image Removed
  1. Image Added

  2. From the TargetPerson node in the Components tree, drag the LastName attribute onto the form. You should see both fields on the form.

Image Removed
  1. Image Added

  2. On the form, double-click directly on the field names and edit them to read First Name and Last Name, respectively.

  3. Add

an
  1. a new section to the form by clicking the Workflow Studio Form Designer Commands button and selecting New Section

 button in the Form Designer ribbon
  1. .

Image Removed
  1. Image Added

  2. Double-click the new section caption and edit it so that it reads Address Information

  3. From the TargetPerson node in the Components tree, drag the following components onto the Address Information section of the form:

    • StreetAddress

    • City

    • State

    • PostalCode

  4. Add spacing to the StreetAddress and PostalCode field names. Your form should look like the following image.

Image Removed
  1. Image Added

  2. Click the Save button above the designer and browse to the User Interface > Forms folder you created earlier.

  3. Enter HelloWorldEditPerson as the file name and then click Save.

Image Removed
  1. Image Added

  2. Next, publish the form by following the below steps. When you publish the form, Workflow Studio converts it to an activity that can be placed within the workflow.

    1. Click the Compile and Publish button located above the Form Designer.

Image Removed
    1. Image Added

    2. In the Form Publishing wizard that appears, click the Next button.

Image Removed
    1. Select the server to which you want to publish the form and click Next.

Image Removed
    1. Click OK to close the Publishing action

competed
    1. completed successfully!

 messagebox
    1.  message box

Image Removed
    1. Wait for the toolbox to load and then select Yes when prompted to restart Workflow Studio.

    2. Select Yes to save changes to any opened files.

Now that the Lookup and form have been created and published, we you can begin building build the workflow.

Build the workflow

  1. In Workflow Studio, right-click the Workflows > Applications folder you created earlier and select New Workflow > Flow Chart Workflow.

Image Removed
  1. Image Added


    Workflow Studio creates the workflow and opens it in the Workflow

Studio
  1. Designer.

Image Removed
  1. Image Added

  2. On the Source Control tree, expand the User Interface > Lookup Controls folders you created earlier and locate the Person Lookup activity you just created. 

  3. Drag the Person Lookup activity onto the Workflow Designer and drop it below the Start activity.

Image Removed
  1. Image Added

  2. Click the Start activity to activate its drawing points and then draw a line connecting the Start activity to the Lookup activity.

Image Removed
  1. Next, drag the HelloWorldEditPerson form activity onto the Workflow Designer and drop it below the Lookup activity.

  2. Click the Lookup activity to activate its drawing points and then draw a line connecting the Lookup activity to the form activity.

Image Removed
  1. Image Added


    Insert excerpt
    IL:Operation Activity Snippet
    IL:Operation Activity Snippet
    nopaneltrue

  2. From Solution Explorer, search for EditPersonMultiOperations.

  3. Drag the Operation activity from Solution Explorer onto the Workflow Designer, placing it directly below the form activity. Note that the activity shows as Operation Base Activity.

    Image Added

  4. Click the form activity to activate its drawing points and then draw a line connecting the activity to the Operation Base activity.

  5. Next, click the Operation Base activity to activate its drawing points and then draw a line from the activity to the End activity. This ensures that the workflow exits after the Operation activity executes.

    Image Added

  6. Next, to ensure that the Multi-Operation Activity executes the desired operation, we need to enable that operation for the workflow by doing the following:

    1. Right-click on the Multi-Operation Activity and select Enable/Disable Executing Operations from the context menu.

Image Removed
    1. Image Added

    2. In the Enable/Disable Resource Operations dialog that appears, select Edit Address from the Disabled Operations columns and move it to the Enabled Operations column by clicking the Right Arrow button.

Image Removed
    1. Image Added

    2. Click Close to close the Enable/Disable Resource Operations dialog.

Image Removed
    1. Image Added

  1. Finally, to use the Multi-Operation Activity in the workflow, we need to add to the workflow project a reference to the OperationBaseActivity assembly:

    1. On the Workflow Studio toolbox to the right of the Workflow Designer, click the Solution tab and in the Code Tree right-click the project name and select Add Reference > Add Assembly Reference from the context menu.

Image Removed
    1. Image Added

    2. In the GAC Assembly Reference window that appears, select the OperationBaseActivity assembly and then click the Add selected items button.

Image Removed
    1. Image Added

    2. From the Code Tree, expand the Reference > Assemblies nodes. You should see the OperationBaseActivity assembly.

Image Removed
    1. Image Added

Next, we you need to bind some workflow and activity properties to each other to pass the right data values to the various components of our your workflow.


Bind workflow properties

  1. From the Workflow Designer, click the Bindings tab.

    You should see two identical columns, each

with
  1. containing a Workflow Properties node

, as well as
  1. and nodes for each of the activities in the workflow. These nodes

provide
  1. grant access to the properties of the workflow and

the
  1. its activities

of the workflow
  1. .

These
  1. The properties are categorized by type, such

as 
  1. as Input

 and 
  1. and Output,

allowing
  1. enabling you to easily pass the output of one activity to the input of another and so on.

Image Removed
  1. Image Added

For

  1. In this tutorial,

we want
  1. our goal is to pass the person selected in the lookup on the form

,
  1. and

the
  1. then from the form to the Operation activity. As mentioned earlier, this person is the target of the workflow.

  2. In the left column of the Bindings tab, expand the Lookup activity and then expand the Output node for that activity. You should see three properties, CommentsSelectedValue, and SelectedValueAsComponent. The property we are interested in is SelectedValueAsComponent. The property represents the EmpowerID Person selected in the lookup.

  3. In the right column of the Bindings tab, expand the Form activity and then expand the Input/Output node for that activity. You should see a TargetPerson property. As indicated by the type (Input/Output), the target person is passed to the form, where edits are made to the available attributes and then passed to the Multi-Operation activity.

Image Removed
  1. Image Added

  2. From the left column of the Bindings tab, drag the SelectedValueAsComponent property onto the TargetPerson property. This binds the person selected in the lookup to the form.

Image Removed
  1. Image Added

  2. Collapse the nodes in both columns. This makes it easier to make the next binding.

  3. In the left column of the Bindings tab, expand the form activity and then expand the Input/Output node for that activity. You should see the TargetPerson property.

  4. In the right column of the Binding tab, expand the Multi-Operation activity (OperationBaseActivity) in our example, and then expand the Input node. You should see a number of properties prefixed with Form_. The property we are interested in is the Form_TargetPerson property.

Image Removed
  1. Image Added

  2. From the left column of the Bindings tab, drag the form TargetPerson property onto the Multi-Operation activity Form_TargetPerson property.

Image Removed
  1. Image Added

Tip

Now that we have completed the bindings, we are ready to deploy the workflow.

Deploy and test the workflow

  1. Click the Save button above the designer and in the Save As dialog that appears, enter HelloWorld as the file name and click Save.

Image Removed
  1. Image Added

  2. Next, click the Compile and Publish button above the Workflow Designer.

Image Removed
  1. Image Added

  2. In the Workflow Publishing wizard that appears, click the Next button.

Image Removed
  1. Select the appropriate workflow server(s) and click Next.

Image Removed
  1. Click OK to close the Publishing action completed successfully! dialog.

    Workflow Studio adds the .pub file for the workflow to the WFS > _PublishedItems folder on your local file system

Image Removed
  1. . You should also see .pub files for the lookup and form you published earlier.

    Image Added


    Insert excerpt
    IL:Deploy WF Message
    IL:Deploy WF Message
    nopaneltrue

  2. Log in to the EmpowerID web application as a user with the appropriate access to run the PublishWorkflowStudioItem workflow.

  3. On the navbar, expand Object Administration > Workflows and click the Publish Workflow Studio Item action link.

    Image Added

  4. Click Choose File, navigate to the

URL for the workflow. The URL should be 
  1. _PublishedItems folder and select HelloWorld.pub

  2. Click Submit.

    Image Added

  3. Reset IIS.

  4. In the address bar of your browser, append #w/HelloWorld to the base URL for your site. The full URL should look similar to https://

YourEmpowerIDWebServer.com/UI/#w/PublishWorkflowStudioItem.Image Removed
  • Click Choose File, navigate to the _PublishedItems folder and select HelloWorld.pub

  • Click Submit.

    Image RemovedAfter the publishing operation completes,
    1. sso.empoweriam.com/ui/#w/HelloWorld where sso.empoweriam.com is the FQDN of your EmpowerID server.

      EmpowerID starts the workflow. You should see the

    Person
    1. Lookup for the workflow.

    Image Removed
    1. Image Added

    2. Search for a person, click the record returned and then click Submit.

      Image Modified

    3. In the Address Information section of the Update Person Form that appears, type an address in the Street Address field and click Submit.

      Image Modified

    4. Finally, verify the change by searching for the person whose address you updated. You should see your change beside the Street Address label.

    Insert excerpt
    IL:External Stylesheet
    IL:External Stylesheet
    nopaneltrue

    Div
    stylefloat:left; position:fixed;
    idarticleNav

    IN THIS ARTICLE

    Table of Contents
    maxLevel4
    minLevel2
    maxLevelstyle4none
    styleprintablenonefalse