Tag: roles

Why do you allow role assignment on both the Form and Flow in the first place?

One of our customers asked the question above. Roles are available both in forms (for Sections and Tabs) and in flows (for any activity). What’s the difference and when would you use one vs the other?

Roles in a Form

 

As the image shows, you can select one or more roles in the Security Tab in the Properties panel for a Section or a Tab. When a role is assigned to a Section/Tab, the controls therein are only visible to logged in users who have that role. This allows you to create forms that look different depending on who is using them. For example, I’m sure you’ve come across a paper form with an “Office Use Only” or “To be filled by HR” section. On a Leave Approval form, there’s probably a Section for manager approval. Why show it if you’re not a manager?

Roles in a Flow

In a workflow, roles play a different part. They control who performs a step (activity) in the workflow. In the Leave Approval workflow above, if you are logged in as a user with role ‘Employee’, you will see the first step in the workflow. When you click to continue, frevvo notices that the second step has roles ‘HR’ and ‘Manager’. If you do not belong to one of those roles, the workflow will be forwarded to users in those roles and you will not be able to continue. It’s like an employee filling out a Leave Application either on paper or a Word document and then walking it over or e-mailing the Word doc to the manager.

Combine the two

Take a look at the Leave Approval workflow tutorial. As explained above the steps in the workflow have roles which control who performs the step. But the form used in the workflow also uses the same roles for a different purpose. In the first step (logged in as Employee), I will only see the Employee section. In the second step (logged in as a Manager), I will also see the Manager Approval section even though it’s the same form and the same workflow.

So, put the two together and you have something that’s flexible and powerful enough to provide the functionality you need yet easy to maintain since there’s just one form (used multiple times) and one workflow.