TOPIC: Users and Roles (LOB, Tasks and Work)
Deep Dive


Galena's 5 key discriminators:
Definition: 1. A characteristic that enables things, people, or classes to be distinguished from one another.

By default these 'Discriminators' are LOB (Line of business), TASK (a Collection 'WORK'), WORK (a form/page), ROLE and USER.



As shown above, there is a parent child relationship between each discriminator, and each parent can have multiple children. So in plain english, an LOB consists of 1 or more TASKS, each of which may have of 1 or more WORK item etc. As you can imagine this can get somewhat complex. In this tutorial we are going to try an make it as simple as possible, but in the end it will be up to you how complex you want to make this structure. The GAdmin application trys to make it a bit simpler, but even there this concept can get somewhat daunting. One way to simplify the concept is to think of LOB/TASK/WORK as one structure, and USER/ROLE as another.

LOB/TASK/WORK:

One way to view the first part of this relationship model is to look at the wq_lobtaskwork_vw View of your forms database. Below is a sample from the ClassicModel forms database.



Above you can see that the 'ClassicModel' LOB has 3 tasks; Manager Tasks, Employee Tasks and officeadmin tasks. You can also see that each task has a number of Work items (or forms) associated with them. Tasks as simply groupings of work. A work item is (at this time) limited to a form. This view shows that relationship. At this point don't read too much into the descriptions.

But Wait!:
Before we dive into Users and Roles, there is a bit of detail we should discuss around 'WORK'. You might find the concept of the 'work item' a bit confusing as we move forward since work items have a one to one relationship with forms. You might ask, why have 'work items' at all? Well the reason is that forms live outside the five discriminators hierarchy. A form can be used across business lines, tasks, work, etc. But a particular work item cannot. Work Items are tied to Tasks, which are tied to LOBs. By separating forms from the discriminator hierarchy, they are free to be used across the application (multi-LOB or not).

USER/ROLE:
While we are breaking the discriminators into two groups, understand that ROLES are linked to WORK, so they really are tied together. That being said, you should understand what that means. Each role can only be linked to 1 or more work items of a single task. This is a key point, you cannot have a single role which spans task groups. You may think this is a limitation, however it is not, multiple task groups can link to the same work item and/or a user can be associated to multiple roles.

Example Time:
If you have the ClassicModel application you can follow along, otherwise you will just have to take my word for this. Open GAdmin and select the ClassicModel application. For this example we will create a entirely new LOB and develop a new Discriminator tree.



Select the existing ClassicModel LOB and click the Green dot.



Enter a new name and description and click the 'Add' button. Then return to the home page and select the newly created LOB.



Notice in the TASK dropdown that there are no longer any tasks, we need to create them. Click the red dot.



Give your new Task a name, description and an order number (more on this later). Ignore the 'Rule' field, that functionality is not yet implemented. And click the 'Add' button, then return to the home page.



To create work items for this new task, make sure the new LOB and Task are selected, then click the red dot.



Select the Associated Form 'CMEmployees' and then give your new Work Item a name. Order# and a description. Click the 'Add' button. This time, we will stay on this screen and create one more work item.



Once you have added the office maintenance work item, return the home page.



Click the red dot next to Roles (as shown above).



Make the changes shown above to create the new ROLE. However, take note that we are creating a role with an association to a single item of work. So there must be a way to associate a role to multiple work items? There is, and we will cover that later. For now just keep going down this path.



the last step is to add a user to the newly created role. Note the avatar shows 'No workflow' - more on this later as well. For now, just click the red-dot and add a user.



Enter some user data and click 'Add'. Notice that we are once again creating a user associated with a single role, granted we only have one role at this time, but if we had more it is doable, and you will see this done shortly.



Ok, we now have a complete structure, and we can now see the assigned workflow based on all 5 discriminators!

Note 1: The red boxes, see 'Multiples' below.

Note 2: If you click the tiny text of a workflow item, it becomes the active form for editing



Since the WORK Item name can be anything you want, this is an easy way to see which form is associated with the work item displayed in the workflow. Also notice that in the workflow (which is really a miniature view of what the users main screen may look like) that the task name is the header and workitems are listed under it.

Multiples:
Recall that we actually created two work items, also recall that when we created our ROLE it was only assocated to one of those. To add additional links we use the buttons (see red boxes above) to associate more than one Users to a Role, Roles to Work and Work to tasks. The screens presented are not the most user friendly, but they are very simple to use.

At this point the Role 'MyNewRole' is only associated to the work item 'Office Maintenance'.



To add 'Employee Maintenance' we must first select it in the Avatar, then click the button labeled 'Link Work/Role'.



Notice that you could now stay on this screen and add additional roles to this this work item. But since we only want this one role for now. return to the home page.



From the example above, you can see how to associate a role to multiple work items. The exact same steps can be used to associate a user to multiple roles, but you would of course use the 'Role/User' link button, not the aforementioned 'Work/Role' link button. The same holds true for associating Task to multiple LOBs etc.

Adding More Tasks:
If you need additional TASKS, using the GAdmin application, you should understand another key concept. The GAdmin Application will make assumptions about what you are trying to do, based on what is selected. So for example, if your GAdmin Screen looks like this;



And you click the green dot...



Change the 'Sample One' record to 'Sample Two' and click the 'Add' button. Then return to the home page.



As you can see from the above, the newly added task already has an association to the Work Item that was selected and it appears in the workflow for the selected user and role. So, if you want to create a new task that has no pre-assigned assocations, besure to first clear the other selected items before adding the new task. For Example;



With only the LOB and TASK selected, click the green dot to add the 'Sample Three' task. Once you have done that, return to the home page and you will see that no associations exist for task three.

The Parent Child Rule:
What you saw above, applies to all the relationships in the discriminators tree. If you add a new 'parent' the selected children are automaticly associated. So if you have a user selected, and you add a new role, that selected user is automaticly associated to the new role. The one exception to this rule is 'LOB', adding a new LOB does not retain the selected relationships. This is important, a user CAN NOT cross Lines of Business, therefore tasks and work items should never be cross linked. So while we have two LOBs (or more) using the same forms, they are maintained as seperate workflows with their own users, rules etc.