Collect agent attributes from agents in queue

Collect agent attributes from agents in queue

Problem Description:

I have a queue block where agents enter and exit. Each agent has the following attributes (parameters): ID, processing time and due date. After one hour, I want to use an event block to collect the info (ID,processing time and due date) of the agents that are still waiting in the queue at that moment, and write this info to Excel. In Excel, I would like 3 columns, one with the ID’s, one with the processing times and one with the due dates of each order in the queue.

I have tried adding and removing info to a LinkedList, but this did not work. Does anyone know how I could get the information I need?

Solution – 1

In your event, simply loop across all agents in the queue and write a dbase query to insert data for them using the insertInto syntax.

Could look like this:

for (int i=0; i<queue.size(); i++) {
    MyAgent currentAgent = queue.get(i);
        .columns(myDbaseTable.column1, myDbaseTable.column2)
        .values(currentAgent.someInfo, currentAgent.otherInfo)
Rate this post
We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.