We highly recommend reading the guided tour and understanding model flow before this section. Furthermore, some experience with the Berkeley Studio is recommended.
When a user is working on a case, it might be efficient or desirable to pass on the case to another user at some point. For example, a junior employee might work out a case, after which he passes it on to a senior employee who checks the case and finishes it. In the Berkeley Studio you can do this within a single model.
To do so, a couple of things need to be done. First of all, you need to decide at what point(s) the case will be assigned to a different user. This can be done at multiple times throughout your model. Second, we will need to present to user with the option to assign the case to someone else. In the next sections, we will go through this process and present an example.
First of all, you need to make sure the receiving user has access to the model. You need at least two users with access to a model to use the assign case function. Furthermore, as we will present a user list to the user, we will need a graph to put the list in.
To setup the graph, create a new graph via
[Graph > New Graph]. The graph will have a start node which you should rename to ‘data’. Next, add two formulas id and username with an empty value. This will look like this:
Now, wherever you would like to assign another user to your case, you will need the list of users that have access to the model. You can request the user list in a node by adding a new formula. Call your formula ‘userlist’ (or something similar) and make sure you set the type to the graph you just created. Next, use the function
getuserlist() to get the list of users with access to the model.
The next step is to prompt the user to assign the case to someone else. It is important to know that this will disable the user’s interaction with the model! After the case is assigned to someone else, all access is restricted to that person.
To ask the user to assign the case to another one, you must get the user list first, as described above. Next, you can ask a question (based on the user list) that asks for a user. An example question is shown below.
The last step to actually assign the case is adding an action. An action is a kind of formula that does something but has no value, see actions. Make sure you do this after all the previous steps. The action you need to add will need a single parameter: the name of the chosen user. So, add an action via
[Actions > Action]. You don’t need to give it a condition. Next, enter the function
assigncase() and enter the question to the user (‘choose_user’ in our image):
Note that the user will see the screen in which you use this action. Therefore, you might want to confirm the action with a message like ‘The case has successfully been assigned to user username’.
Now that the case is transfered, the user it was transfered to will see it appear whenever he or she logs in. If you want to test this, you will need two accounts for a single model.