Step 2: Add States and Transitions

Prerequisites:

You completed the steps in Step 1: Create an Application Workflow.

In this exercise, you add an "active" state called Assigned and a "completed" state called Closed to MyAppWorkflow. Then you create transitions between the New state and the Assigned state and between the Assigned state and the Closed state.

To add states and transitions in MyAppWorkflow:

  1. In App Explorer, under the Application Workflows heading, select MyAppWorkflow.
  2. Set the Manager role as the owner of the New state. This determines which users will own items as they are submitted.
    1. Select the New state in the workflow.
    2. Launch the Add Owner Field wizard by selecting <Add Owner> in the Owner field of the General tab of the Property Editor.
    3. On the Select or Add Roles panel, enter the following information for the fields then click Add Role.
      • NameManager
      • TemplateAdministrator
    4. Click Next, select Create new field, and then click Finish. A new role and new field have now been created. The Manager role has all permissions. These permissions will be reduced in Step 4: Define Security.
  3. From the States section of the Workflow Palette, drag an "active" state onto the application workflow editor and drop it to the right of the New state.
  4. In the Property Editor, change the Name to Assigned and for Owner, select <Add Owner>. This time in the Select or Add Roles panel, select the User role and click Next.
  5. On the Field Selection panel, choose to create a new field called Employee, and then click Finish.
  6. From the States section of the Workflow Palette, drag a "completed" state onto the application workflow editor and drop it to the right of the Assigned state. Change the Name to Closed.
  7. From the Transitions section of the Workflow Palette, drag a "regular" transition onto New, release the mouse button, and then click the Assigned state.

    This creates a transition from the New state to the Assigned state.

  8. Change the Name to Assign, and then press the Enter key.
  9. Add another regular transition from the Assigned state to the Closed state, and change the transition name to Close.
  10. Continue to Step 3: Define Fields.