Versions Compared

Key

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

This guide takes you through step by step instructions to create a Leave Approval Workflow. This tutorial uses the form you created in the Getting Started with Forms tutorial.

...

Creating the Leave Approval Workflow

  1. Logon to your  tenant as the designer user i.e.designer@mycompany. Replace mycompany with the name of your tenant.
  2. On the My Project homepage, click the project name My Company HR that you created in the Getting Started with Forms tutorial. You can also select  Open from theAction Menu. 

  3. You will see the Forms and Workflows homepage.
  4. Click theAdd icon and select Create a New Workflow. Click the pencil icon at the top of the Properties Navigator. Change the name of the workflow to Leave Approval Workflow. Click the checkmark to save it. 
  5. Click anywhere in the General Settings section of the Properties Navigator or click the  Edit Workflow Properties icon in the toolbar to launch the Workflow Properties wizard. Check the Save PDF checkbox on the Settings tab so that a pdf image of the workflow is saved in the  submission repository. Click Submit to save.
  6. If you completed the Getting Started with Forms exercise, you should have a Leave Approval Form listed in the palette. Drag the Leave Approval form you just created from the Palette and drop it into the Guide box on the canvas. This creates the first step in the workflow.  It will be named Step ##. Click on the step. Click the pencil icon at the top of the Properties Navigator. Change the name of the step to Employee. Click the checkmark to save it. 

  7. In our example we will use the same form three times, once each for the Employee, Manager and HR steps. Select the Employee step and click the icon twice. This will create two linked steps. A linked step is a copy of the original step. The form cannot be edited from the linked activity but any edits made to the original step (parent form) step are reflected in the linked step.

  8. Click on the first linked step. Click the pencil icon at the top of the Properties Navigator. Change the name of the step to Manager. Click the checkmark to save it. 

  9. Click on the second linked step. Click the pencil icon at the top of the Properties Navigator. Change the name of the step to HR. Click the checkmark to save it. 

Make Changes to the Leave Approval Form

You can edit a form in the Workflow designer as well as the Forms designer. 

Warning

Be aware that changes made to a form in the Workflow Designer are not reflected in the original form in the Forms designer. If you want your changes reflected in both designers, make the changes in the original form in the Forms Designer, then replace the updated form in your workflow in the Workflow Designer.

Let's make some changes to the Leave Approval form so we can add a rule to prefill the user name, id, email address and manager's name on each step of our workflow. Follow these steps:

  1. Click on the Employee step. Click the  Edit icon. This launches the Leave Approval Form in the form designer so you can edit it.


  2. Change the label of the First Name control to Employee Name. Change the Name of the First Name control to EmployeeName (no space). 
  3. Change the label of the Last Name field to Employee Id.
  4. Change the Name of the Last name field to EmployeeId.
  5. Make sure that the Name field of each control is properly set. This is a critical step to ensure that business rules work. The controls are named as shown in the table below. Make sure that the Control Name field is exactly as shown below including case-sensitivity. 
  6. Uncheck the Enabled checkbox for each control. The control values will be automatically filled in by a business rule.  

  7. Click the save and exit icon to save the form.

  8. Click the  save and exit icon to save the workflow.
Control LabelControl NameDescription
Employee NameEmployeeNamethe current user's full name
Employee IdEmployeeIdthe login id of the current user
Manager IdManagerIdthe login id of the current user's manager
Employee EmailEmailthe current user's email address

Setup the steps in your workflow

  1. Edit the Leave Approval Workflow.
  2. Click on the Employee step. Click the Edit Step Properties icon. Click on the General Settings tab.  Change the text of the Continue Button label by typing it in the Continue Label field. Ex: Send to Manager.
  3. Click on the Assignment tab. Assign the Employee role to this step by selecting it from the Assign to Role dropdown. Click Submit.
  4. Click on the Manager step. Click the Edit Step Properties icon. Click on the General Settings tab. Change the Continue Label to Send to HR. Manager Jerry will click on this button to send the workflow to the HR department.
  5. Click on the Assignment tab. Type a left curly brace followed by Man in the Assign to User field. When you see {ManagerID} in the dropdown, click to select it. {ManagerID}  is an example of a template. At runtime,  will evaluate the user id in this field and sent the task to the Employee's manager. The ManagerID field will be populated by a business rule explained below when the workflow step loads.

  6. Click on the Messages tab.
  7. Add a customized message in the Pending Message field. Tom will see this message when he clicks the Send to Manager button. Ex: Your request has been forwarded to your manager for approval.
  8. Add some text in the Task Information field so manager Jerry can identify the task when he sees it on the Task List. You can use a template in the message. A template is a control in your form encased in curly brackets. will resolve the template at runtime and replace the field in the Task Info with the data that is entered into it. If you want to show the Employee Name in the Task Information, enter Leave Approval for {EmployeeName} in the Task Information field so the approving manager will know who the request is for when it appears on their task list. . 

  9. Click Submit.
  10. Click on the HR step. Click the Edit Step Properties icon. Click on the Assignment tab.  Assign the HR role to this step by selecting it from the Assign to Role dropdown
  11. Click on the Messages tab.
  12. Enter "Leave Approval for {EmployeeName}" in the Task Information field.
  13. Enter a Pending Message that Jerry will see when he clicks the Send to HR button. Ex: The Leave Approval for {EmployeeName} has been forwarded to HR.
  14. Click Submit.
  15. Customize the message the HR user will see when the workflow is completed. 
  16. Click on the  Edit Workflow Settings icon in the toolbar.
  17. Click on the Workflow Actions tab. Select the Display Message when user submits workflow wizard.
  18. Enter your customized message 
  19. Click Finish.
  20. Click the  save and exit icon to save the work your have done so far.

...

 A  great way to test your workflow is to use a  space. A space is a frevvo website that is very easy to create. Your deployed forms/workflows are automatically added. Follow these steps to create the space:

  1. Ensure the visibility of your Expense Report workflow is set to public in tenant and that it is deployed to production: 
    1. In Workflow Properties, select the Access Control Tab. Set "Who can start the workflow" to "Anyone (login not required.)
      Image Modified
    2. On the Forms & Workflows Homepage, click the Image Modified Action menu for the Leave Approval Workflow. Select Image Modified Deploy.
      Image Modified

  2. Click on the Spaces Tab. Click the Image Modified Add icon. Enter an id and name for your space. Click Create. You will taken to the Space designer. Simply click the Save & Exit icon to return to your Space list.

     
  3. Click the Image Modified Action Menu and select Image ModifiedShare
    Image Modified
  4. Copy the share url for your space then logoff . 
    Image Modified
  5. Paste the space url into another browser or a new tab of the browser you are using. Login  as tom@<your tenant name>.  automatically makes your project a tab on the space menu and your Leave Approval Workflow an option on the menu under the tab. Your space should look something like this:
    Image Modified
  6. Click on the tab for your project and then click on the Leave Approval workflow. This brings you to the first step in your workflow. The workflow automatically has a navigation bar to indicate which step you are currently in as well as the next steps that are coming. 

  7. Fill in the fields in the 1st step, remember to sign and click the Send to Manager button to route the workflow to the Manager for approval.

  8. Tom should see the customized pending message that you set up on the manager activity in the workflow. 

  9. Logout of your space then login to the space as the manager jerry - jerry@<your tenant>.
  10. Click on the Important Items tab, then click the Task List. Jerry will see the pending Leave Approval request from Tom. Note the Task information that we set up on step 2 of the workflow using the template - Leave Approval for {EmployeeName} 
  11. Click the Perform icon to display the task. Notice Manager Jerry sees the Employee Information section filled in by Tom and the Manager Approval section so he can approve or reject the request.
  12. The manager name and email fields are populated by our business rule. 
  13. Add a comment and sign the section. 
  14. Click the customized Send to HR button. The pending message that you set up on the HR step of the workflow displays.
  15. Logout of your space and login as sue@<your tenant>.
  16. Click on the Important Items tab and then on the Task List. The pending task for the HR department displays. Note Sue, the HR employee, sees the Employee Information section, the Manager Approval section and the HR section. 
  17. Click the Finish button to complete the workflow. The workflow's configured form action message displays. 

  18. Logout of your space. 

...