When working in conjunction with multiagent systems, virtual organizations attempt to simulate the functions and interactions of entities in different environments. Recent studies have addressed the problem of assigning roles to agents that form part of the organization, and incorporating new agents to carry out certain tasks. However, these studies are limited to defining the norms and rules that determine the behavior of the organization. The present study proposes a virtual organization model for egovernment environments to assign resources and minimize the required personnel by forecasting workloads. To this end, a neural network, queuing theory, and CBR are used to obtain an efficient distribution. Queuing theory can establish the number of agents with a specific role that are necessary to maximize profits, while the network distributes roles among agents according to their respective efficiency. The final part of the paper is focused on validating the plan developed inside a case study centered on e-government in order to obtain empirical results