private void ReIssueIfNecessary() { if (this.recurring) { Main.Message(debugFlag, "Reissuing recurring task " + this.label); MqttMessagingProvider mq = MqttMessagingProvider.GetMqttProvider(); mq.PublishMessage(this.agent.getName() + ",ASSIGNTASK,::::" + this.label); } }
@Override public void MarkCompleted() { super.MarkCompleted(); Main.Message(debugFlag, "[Task 63] Task " + label + " completed."); WorldState.CompletedTasks.add(this); // ReIssueIfNecessary(); }
public void AssignAgent(IAgent ag) { Main.Message(this, false, "Assigning " + this.label + " to " + ag.getName()); this.agent = ag; synchronized (Task.Lock) { for (Node n : children) { if (n.agent == null) n.agent = ag; } } }