How can I get the count of active agents for a workgroup queue using smack?

We are using openfire fastpath to provide chat capability between students and instructors. A requirement is that spark automatically login a user to their fast path group. Spark will only do that if the user belongs to only one workgroup. A second requirement is to allow instructors to be agents in multiple queues. So a single group for instructor containing queue(s) for difference subjects has been setup in fastpath. The last requirement is that when the chat page is displayed to the student the on-line/off-line image reflect the status of a given queue, not the workgroup.

For this example assume the following fastpath configuration. The instructor workgroup contains multiple queues (math, science, engineering, english). Jim and Rich are the only instructors logged into spark. Jim is an agent in the math queue, Rich is an agent in the english queue. No agents are logged in for science and engineering. The openfire server name is school.

Math Student User Story: When the chat screen appears the on-line image is displayed as a result of calling the webchatwebchat/live?action=isAvailable&workgroup=instructor@workgroup.school. This is ok. Jim is currently logged into spark and is available for chats with math students.

Science Student User Story: When the chat screen appears the on-line image is displayed as a result of calling the webchatwebchat/live?action=isAvailable&workgroup=instructor@workgroup.school. This is misleading. None of the instructors setup as agents for the science queue are logged in. No one is available to chat. Jim and Rich know nothing about science.

After looking at the code for openfire 3.6.4 I do not see a hidden or undocumented work around for getting on-line/off-line status for a workgroup queue. I decided to try smack 3.2.1 and see if I could get the status that way. The problem I ran into is not being able to retrieve a Workgroup using the following code. I created a java console maven project and added appropriate dependencies and repositories. I hope that I have made a simple mistake, but I can not see what it is. Thanks in advance for any help, advice or suggestions.

public static void main(String[] args) {

    String workGroupName = "instructor@workgroup.school";

    System.out.println("make connection...");

    ConnectionConfiguration config = new ConnectionConfiguration("school", 5222);

    Connection conn = new XMPPConnection(config);

    try {

        conn.connect();

        conn.login("username", "password");

        // log info about host

        System.out.println("host " + conn.getHost());

        System.out.println("service name " + conn.getServiceName());

        System.out.println("connection id " + conn.getConnectionID());

        // get roster

        Roster roster = conn.getRoster();

        for (RosterEntry rosterEntry : roster.getEntries()) {

            System.out.print("user " + rosterEntry.getUser());

            System.out.println("  name " + rosterEntry.getName());

        }

        // try and get workgroup

        Workgroup workGroup = new Workgroup(workGroupName, conn);

        if (workGroup.) {

            System.out.println("connected to work group " + workGroup.getWorkgroupJID());

        } else {

            System.out.println("error occurred when connecting to work group " + workGroupName);

        }

        conn.disconnect();

    } catch (XMPPException ex) {

        Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex);

    }

}