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 of this tutorial is to guide you through the steps for completing a fully functional workflow comprised of common workflow components. In this tutorial, these components include the following:
When you have completed this tutorial, you should have 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 will do the following:
Now that the Lookup has been created and published, the next step is to create and publish the workflow form.
Now that the Lookup and form have been created and published, we can begin building the workflow.
Select Life Expectancy and Priority values. These values respectively determine the visibility timeframe for the [workflow instance process flow|EID:Workflow Process Flow View] information and the order of precedence for the workflow to be executed in the event that multiple workflows run at the same moment.
For this topic, you can leave the Life Expectancy and Priority values at their defaults. |
Workflow Studio creates the workflow and opens it in the Workflow Studio Designer.
Now that the workflow is created, the next step is to add the Lookup activity we created earlier to it, placing the activity directly below the Start activity. In this way, when the workflow starts, the first thing users will see is the Person lookup. |
Click the Lookup activity to activate its drawing points and then draw a line connecting the Lookup activity to the form activity.
Now that we have added the Lookup and form activities to the workflow, the next step is to add an Operation activity to it. Operation activities are protected blocks of code based on the EmpowerID workflow authorization framework used to determine if the current user in a given workflow process can execute the code contained in that activity against the workflow's target obect. Each operation activity is derived from the OperationWorkflowBaseactivity, which exposes a number of methods and other members implemented by the deriving activities. Workflow Studio provides templates that allow for the quick creation of several different types of operation activities, depending on the number of resources involved in the workflow process. In this tutorial, our workflow allows the attributes of a single resource—an EmpowerID Person—to be edited. Thus, to keep unauthorized users from being able to edit those attributes, we need to add a Single Multi-Operation Activity to the workflow. While you can create your own Multi-Operation activities, for the purpose of this tutorial, we will use the stock Edit Person Multi-Operations Operation Activity that EmpowerID provides for protecting unauthorized changes against EmpowerID people. |
Drag the Operation activity from Solution Explorer onto the Workflow Designer, placing it directly below the form activity.
If you cannot find the EditPersonMutliOperations Operation activity, you are most likely not displaying all the source control items in your view of Workflow Studio. If this is the case, click the Workspace tab, right-click the Source Control node and then select Show Source Control (Full View). |
Next, we need to bind some workflow and activity properties to each other to pass the right data values to the various components of our workflow. |
From the Workflow Designer, click the Bindings tab.
You should see two identical columns, each with a Workflow Properties node, as well as nodes for each of the activities in the workflow. These nodes provide access to the properties of the workflow and the activities of the workflow. These properties are categorized by type, such as Input and Output, allowing you easily pass the output of one activity to the input of another and so on.
For this tutorial, we want to pass the person selected in the lookup to the form, and from the form to the Operation activity. As mentioned earlier, this person is the target of the workflow. |
Now that we have completed the bindings, we are ready to publish and test the workflow. |
If you are unable to publish to your source control, you may have disabled the source control option the first time you opened Workflow Studio.
|
|