Genesys CTI User Forum > Genesys-related Development

PlaceStatus

(1/2) > >>

xember:
Hi All,

I trying to get the CurrentAgentSate from an agent with PSDK. So I get a EventInfo and I am able to get the place status. The code below returns an 8. My Agent is in not ready state. My question is ... how can I get from the int 8 to a string representation like NotReadyForNextCall.... ? Thanks in advance!

[code]      EventInfo eventinfo = (EventInfo)message;   
     
      AgentStatus agent = (AgentStatus) eventinfo.getStateValue();
      PlaceStatus place = agent.getPlace();
      System.out.println(place.getStatus());[/code]

cavagnaro:
Many times the SDK return num types which you have later to map.
For example Inbound and Outbound calls are 2 and 3 int values
However when you use PSDK queries you can ask something like calltype.callinbound or calltype.calloutbound
So if you want the current status probably will have to build a map of equivalents

xember:
Yep thats clear..... but how to call the type in this case?

cavagnaro:
As said, build a map. There is no tostring function

PeteHoyle:
For the definition of each possible value have a look at the API Docs:

Genesyslab.Platform.Reporting.Protocols.StatServer.DnActions.

Start at zero than then count down, for example
NonMonitored = 0
Monitored = 1
LoggedIn=2
...
NotReadyForNextCall=8

Navigation

[0] Message Index

[#] Next page

Go to full version