The Role Editor is used to assign an agency's agents to roles in a particular protocol. Using the Role Editor, you can update any or all agents so that necessary rules can be generated for their assigned roles.
The Role Editor contains a menu bar with five menu items: File , Edit , Options , Windows and Help . The File menu allows you to save the roles. From the File menu, you can also close the Role Editor and shut down AgentBuilder. The Edit menu allows you to view the properties of a selected role. The Options menu allows you to assign agents to a selected role, update a particular agent, or update all agents that belong to the currently loaded agency.
The Role Editor is made up of two panels: the left panel is a listing of the roles for a particular protocol, and the right panel displays a description of a selected role. Figure 78 shows the Role Editor.
Figure 78. Role Editor
To view a role's properties, select the role in the left panel. The role's properties will then be displayed in the right panel. Alternatively, you can also select the role, then select the Edit < Properties... menu item. Either way, you will see the Role Properties dialog as illustrated in Figure 79. The Role Properties dialog will display the role's name, description and maximum number of instances allowed. Of these properties, only the role description can be modified.
Figure 79. Role Properties Dialog
The role's name and instance number cannot be modified in the Role Editor . The roles are created in the Protocol Editor. If changes need to be made to a particular role, the changes will have be made in the Protocol Editor , and the protocol will then have to be re-imported into the Agency Manager .
In order for a protocol to be successfully applied to an agency, each role must be assigned to one or more agents. The only exception is when a particular role is specified to have zero or more agents, in which case, assigning an agent is optional. To assign one or more agents to a role, you must first select the role from the left panel. Then, click on the Options < Assign Agent(s) , and the Assign Agent(s) dialog will be displayed as shown in Figure 80.
Figure 80. Assign Agent Dialog
The role being assigned to an agent is at the top of the dialog. There are two main panels in the dialog: the Available Agents panel lists the agents that belong to the currently loaded agency. Also, buttons are provided in this panel for adding a selected agent from the list, or adding all agents from the list. To add a single agent, first select an agent, then click on the Add button. The selected agent will then be added to the list in the Selected Agents panel. Clicking on the Add All button does not require the user to select the entire list.
The Selected Agents panel will first list any agents that have already been assigned to the selected role. Agents can be removed from the role by selecting the agent in the list, then clicking on the Delete button. Clicking on the OK button will set the changes made to the role. Also, a check will be done to make sure that the number of agents assigned to the role does not exceed the maximum number of instances allowed for the role. Clicking on the Cancel button will cancel any changes made to the role's assignment.
Updating an agent will generate the necessary rules needed for the agent to fulfill its assigned role(s). An agent will need to be updated whenever the agent has been assigned to a role. To update an agent, select the Options < Update Agent... menu item. This will display the Update Agent dialog as shown in Figure 81. The dialog consists of a combo box that contains the agents for the currently loaded agency. Select the agent that you want updated, and click on the OK button. Clicking on the Cancel button will cancel the agent update.
Figure 81. Agent Update Dialog
As a convenience, the Role Editor also allows you to update all agents for the currently loaded agency. Selecting the Options < Update All Agents menu item will update all agents. Selecting the menu item will then generate the rules needed for each agent to fully implement each of its assigned roles.
The roles can be saved by selecting Save under the File menu. You can then close the Role Editor and return to it at a later time. The save action will save the role assignments to each of the agents.
To switch between different AgentBuilder windows, select the desired window in the Windows menu. This will bring the selected window to the foreground.
To close the role editor, select the Close item under the File menu. This will close the role editor window. If you have any unsaved changes in the role editor, you will be given a chance to save them.
To exit from AgentBuilder, select Exit from the File menu. AgentBuilder will then display a confirmation dialog before actually exiting the system.