Hi
I am working with OpenFire 3.9.3 and the Fastpath Plugin.
I’m trying to implement a RestApi for Fastpath as separate plugin. So that our application can create Agents and add them to the workgroup queues.
Now I have a problem.
After adding the new Agent to the DB and Queue
“INSERT INTO fpqueueagent (queueID,objectID,objectType,administrator) VALUES (?,?,0,0)”;
The Fastpath web interface does not recognize the new agent in the queue. Only after restarting the fastpath plugin, its recognize the new Agent in the Queue.
After looking into the Fastpath Code, there is a call after the addAgentToDb Function : agent.sendAgentAddedToAllAgents(this);
This leads to this code:
/**
- This agent has been added to a queue so we need to inform the existing agents of the queue
- ,that previously requested agent information, of this new agent.
-
@param requestQueue the queue where this agent has been added.
*/
public void sendAgentAddedToAllAgents(RequestQueue requestQueue) {
Workgroup workgroup = requestQueue.getWorkgroup();
for (AgentSession session : workgroup.getAgentSessions()) {
if (session.hasRequestedAgentInfo()) {
IQ iq = new IQ(IQ.Type.set);
iq.setFrom(workgroup.getJID());
iq.setTo(session.getJID());
Element agentStatusRequest = iq.setChildElement(“agent-status-request”,
“http://jabber.org/protocol/workgroup”);
agentStatusRequest.add(getAgentInfo());
// Push the new agent info to the agent
workgroup.send(iq);
}
}
}
My question is: Is there some way arround, i dont want add the whole xmpp.workgroup part to my plugin?
I search for a way to refresh the Agents without restarting the plugin.