Setting Up Tiered Approval Levels
This article details a way to create a tiered approval level without calling the Notification Server or some other database where an approval hierarchy might be stored. Typically, approval levels for Workflow processes would be handled by synching with your NS and you would utilize some logic to pull the manager of the user submitting a request. Or you would designate a specific approving individual or group within the assignments section of your dialog workflow.
This mockup may be helpful if you have several individuals who must approve a request one after the other, as opposed to simultaneously, and who may represent different roles, such as IT Technician, IT Supervisor, etc. Your approvers would be grouped in a new data element that you can configure according to your needs.
(As with my previous postings, I will add an "I'm-no-expert" disclaimer here... while this may not be the best way of handling this type of scenario, I am hoping to simply provide an example method for consideration and discussion.)
For this example, we will use a simple request form in which the user is requesting something of a certain monetary value. If the value is less than $1000, there would be no approval level (we'll just pretend that the submitter is authorized to make this kind of request); if the value is between $1000 and $5000, there is one level of approval; if the value is between $5000 and $10000, there are two levels of approval; and if the value is greater than $10000, there are three levels of approval. We'll also refer to these approval levels as managerial approvals, just for the sake of grouping them nicely.
- Open Workflow Designer and create a new workflow project.
- Add an Add New Data Element component and title it something like "Approval List".
- Edit the component as follows:
- Select Text as the Data Type.
- Check Is Array.
- Add the email addresses of each approver as your new values. In this example, just to exemplify the functionality, we will use "MyManager", "MyManagersManager", "MyManagersManagersManager", and finally "TheBigAlmightyManager". In the real world, you will want to have values that will allow you to assign tasks (such as email addresses).
- Name your Output Variable "Manager List".
- Click OK.
- Add another Add New Data Element component after the first and name it "CurrentMgr".
- Edit the component as follows:
- Select Text as the Data Type.
- Ensure that Is Array is unchecked.
- Name your Output Variable "CurrentMgr".
- Click OK.
- Add another Add New Data Element after the second one and name it "Count".
- Edit the component as follows:
- Select Number (integer) as the Data Type.
- Ensure that Is Array is unchecked.
- Use 0 as the Value.
- Name your Output Variable "CountApprovalLevels".
- Click OK.
- Add a Dialog Workflow component after the three Add New Data Element components. This will be your initial request form. On the Interaction Setup tab, add a dialog model with a Start component, Form Builder, and End component.
- In the Form Builder component, we will have a simple label of "I want to request something of the monetary value below:". We will also have a drop-down list component with our monetary values of 1000, 5000, and 10000. Finally, we will use a Submit button to process our output.
- Exit the Dialog Workflow and add a Get Item by Index component. Link your Submit path to this component.
- Edit the component as follows:
- For Array Variable Type, select Text.
- For Array Variable Name, select ManagerList.
- For Index Of Item, give a constant value of 0.
- For Item Output Variable Name, select CurrentMgr.
- Click OK.
- Add a Number Range Rule component to your workflow and connect both of the paths ("item exists" and "item does not exist") from the Get Item By Index component to it.
- Edit the Number Range Rule component as follows:
- For Compare Variable, select RequestedItem (this is the value associated with the drop-down list of our monetary values).
- For Handle Equals By, select Round Up.
- Add values of "1000", "5000" and "10000".
- Click OK.
- Add three Add Values components and name them "At 0-5000, add 1 level of approval", "At 5000-10000, add 2 levels of approval", and "At 5000-10000, add 2 levels of approval". Edit the components as follows:
- For First Value, select CountApprovalLevels.
- For Second Value, use 1, 2, and 3 respectively for each component.
- For Output Variable Name, select CountApprovalLevels.
- Connect the Number Range Rule component paths as follows:
- Connect "less than 1000" to your End component.
- Connect "1000...5000" to "At 0-5000, add 1 level of approval".
- Connect "5000...10000" to "At 5000-10000, add 2 levels of approval".
- Connect "greater than 10000" to "At 5000-10000, add 2 levels of approval".
- Add a new Dialog Workflow component to represent the approval portion of this workflow. Connect the Add Values components to this component.
- On the Assignments tab, set the Person Assignment to CurrentMgr.
- On the Interaction Setup tab, add a dialog model with a Start component, Form Builder, and End component.
- In the Form Builder component, we will have two simple labels of "My name is:" and "I will approve the request". We will also have an Ascii Merge Label component that pulls CurrentMgr. Finally, we will use a Submit button to process our output.
- Exit the Dialog Workflow and add a Subtract Values component. Link your Submit path to this component.
- Edit the component as follows:
- For First Value, select CountApprovalLevels.
- For Second Value, use 1.
- For Output Variable Name, select CountApprovalLevels.
- Click OK. Now each time a manager approves the request, this component will subtract one from the total count of approval levels you have designated.
- Add an Equals Rule component and connect the Subtract Values component to it.
- Edit the component as follows:
- For Data Type, select Text.
- For Variable Name, select CountApprovalLevels.
- For Compare To, use 0.
- Click OK.
- Connect the "equals" path of the Equals Rule component to the End component.
- Add a Get Item By Index component and edit it as follows:
- For Array Variable Type, select Text.
- For Array Variable Name, select ManagerList.
- For Index Of Item, select CountApprovalLevels.
- For Item Output Variable Name, select CurrentMgr.
- Click OK.
- Connect the "not equals" path of the Equals Rule component to this Get Item By Index component. Connect both "item exists" and "item does not exist" to the approval Dialog Workflow component.
You have now established a loop for the single approval form. The user will submit his/her request and the person sitting as the CurrentMgr will be assigned with the approval. The first CurrentMgr will approve the request, and the logic you have set up will subtract that one approval from the count. If there are additional levels of approval required, the next manager on the list will be assigned the approval task, and so on. Finally, when the count is compared to the levels you have defined and it reaches zero, you're all done.
While this process doesn't take into consideration a rejection of the request, you can easily configure that with some additional buttons and rules.
- Login or register to post comments
- 1904 reads
- Printer-friendly version





















