antonio6vieira Posted June 22, 2015 Share Posted June 22, 2015 Hi everyone. In my project I have a worker that has to do something to entities on 2 servers (as a secondary resource of a server the worker moves to the server) and then transport them to the respective locations. The problem is that sometimes the worker only does something to the entities and does not transport them, which cannot hapen. Any ideas? I uploaded a sample of the problem I described. exp_cantina.spfx Link to comment Share on other sites More sharing options...
antonio6vieira Posted June 23, 2015 Author Share Posted June 23, 2015 Any help? I think this should really be of simple solution but I'm really missing the solution here... Link to comment Share on other sites More sharing options...
KatieP Posted June 23, 2015 Share Posted June 23, 2015 One way is to change a variable when a Worker is seized, and check that variable in the Worker_EvaluatingSeizeRequest process. If the variable is 1, accept the request, but if it is 0, reject the request because the Worker still needs to transport the other entity. In the attached model, the variable Worker.priority is changed to 0 when the worker is seized and back to 1 when the entity is unloaded in process Worker_Unloaded. Worker_EvaluatingSeizeRequest checks the value of Worker.Priority to accept/reject seize request. In sprint 7.123, you can reserve the Worker so it can't be seized by other entities. Since the model is very simple, this method works well. There are other ways to model this, if this method does not work. Katie exp_cantina1.spfx Link to comment Share on other sites More sharing options...
antonio6vieira Posted June 26, 2015 Author Share Posted June 26, 2015 Thanks that worked very well Link to comment Share on other sites More sharing options...
Recommended Posts