Author Topic: Got weird warning in the message attribute  (Read 2877 times)

Offline dimbar

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Got weird warning in the message attribute
« on: May 05, 2017, 12:25:29 PM »
Hi!

I just managed to establish connection with stat server.
I sent a request that i build like this:
            var requestOpenStatistic = RequestOpenStatisticEx.Create();
            requestOpenStatistic.StatisticObject = StatisticObject.Create();
            requestOpenStatistic.StatisticObject.ObjectId = agentEmployeeId;
            requestOpenStatistic.StatisticObject.ObjectType = StatisticObjectType.Agent;
            requestOpenStatistic.StatisticObject.TenantName = "Resources";
            requestOpenStatistic.StatisticObject.TenantPassword = "";

            requestOpenStatistic.Notification = Notification.Create();
            requestOpenStatistic.Notification.Mode = NotificationMode.Immediate;
            requestOpenStatistic.Notification.Frequency = freq;
            //requestOpenStatistic.ReferenceId = refId;
            DnActionsMask mainMask = new DnActionsMask();
            mainMask.SetBit(DnActions.WaitForNextCall);
            mainMask.SetBit(DnActions.CallDialing);
            mainMask.SetBit(DnActions.CallRinging);
            mainMask.SetBit(DnActions.NotReadyForNextCall);
            mainMask.SetBit(DnActions.CallOnHold);
            mainMask.SetBit(DnActions.CallUnknown);
            mainMask.SetBit(DnActions.CallConsult);
            mainMask.SetBit(DnActions.CallInternal);
            mainMask.SetBit(DnActions.CallOutbound);
            mainMask.SetBit(DnActions.CallInbound);
            mainMask.SetBit(DnActions.LoggedOut);

            DnActionsMask relMask = new DnActionsMask();
            requestOpenStatistic.StatisticMetricEx = StatisticMetricEx.Create();
            requestOpenStatistic.StatisticMetricEx.Category = StatisticCategory.CurrentState;
            requestOpenStatistic.StatisticMetricEx.IntervalLength = 0;
            requestOpenStatistic.StatisticMetricEx.MainMask = mainMask;
            requestOpenStatistic.StatisticMetricEx.RelativeMask = relMask;
            requestOpenStatistic.StatisticMetricEx.Subject = StatisticSubject.DNStatus;

and i get this in the StatisticMetricEx:

{CATEGORY [int]  = 10 [CurrentState]TM_LENGTH [int] = 0can't process DataSupport class cause exception: [IndexOutOfRangeException] Index was outside the bounds of the array.at:    at Genesyslab.Platform.Reporting.Protocols.StatServer.ActionsMask.IsBitSet(Int32 bit)  at Genesyslab.Platform.Reporting.Protocols.StatServer.ActionsMask.ToString(Int32 indent)  at Genesyslab.Platform.Reporting.Protocols.Internal.ActionsMaskCodec.AppendLogValue(StringBuilder buf, Object customTypeObject, Int32 indent, Boolean truncate, Boolean hide)  at Genesyslab.Platform.Commons.Protocols.Internal.ToStringHelper.AppendLogValue(StringBuilder buffer, IDataSupport data, Int32 indent, Boolean hide, Boolean truncate, AttributesLogHiddenList hiddenAttributes)}

What can be possibly wrong here?

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: Got weird warning in the message attribute
« Reply #1 on: May 05, 2017, 03:00:39 PM »
What say StatServer log?

Offline PeteHoyle

  • Full Member
  • ***
  • Posts: 126
  • Karma: 13
Re: Got weird warning in the message attribute
« Reply #2 on: May 05, 2017, 03:19:22 PM »
That code works for me, it would be best to uncomment the ReferenceId..
What version of PSDK are you using?
At what point in the code do you get the error?

[quote author=dimbar link=topic=10330.msg46904#msg46904 date=1493987129]
Hi!

I just managed to establish connection with stat server.
I sent a request that i build like this:
            var requestOpenStatistic = RequestOpenStatisticEx.Create();
            requestOpenStatistic.StatisticObject = StatisticObject.Create();
            requestOpenStatistic.StatisticObject.ObjectId = agentEmployeeId;
            requestOpenStatistic.StatisticObject.ObjectType = StatisticObjectType.Agent;
            requestOpenStatistic.StatisticObject.TenantName = "Resources";
            requestOpenStatistic.StatisticObject.TenantPassword = "";

            requestOpenStatistic.Notification = Notification.Create();
            requestOpenStatistic.Notification.Mode = NotificationMode.Immediate;
            requestOpenStatistic.Notification.Frequency = freq;
            //requestOpenStatistic.ReferenceId = refId;
            DnActionsMask mainMask = new DnActionsMask();
            mainMask.SetBit(DnActions.WaitForNextCall);
            mainMask.SetBit(DnActions.CallDialing);
            mainMask.SetBit(DnActions.CallRinging);
            mainMask.SetBit(DnActions.NotReadyForNextCall);
            mainMask.SetBit(DnActions.CallOnHold);
            mainMask.SetBit(DnActions.CallUnknown);
            mainMask.SetBit(DnActions.CallConsult);
            mainMask.SetBit(DnActions.CallInternal);
            mainMask.SetBit(DnActions.CallOutbound);
            mainMask.SetBit(DnActions.CallInbound);
            mainMask.SetBit(DnActions.LoggedOut);

            DnActionsMask relMask = new DnActionsMask();
            requestOpenStatistic.StatisticMetricEx = StatisticMetricEx.Create();
            requestOpenStatistic.StatisticMetricEx.Category = StatisticCategory.CurrentState;
            requestOpenStatistic.StatisticMetricEx.IntervalLength = 0;
            requestOpenStatistic.StatisticMetricEx.MainMask = mainMask;
            requestOpenStatistic.StatisticMetricEx.RelativeMask = relMask;
            requestOpenStatistic.StatisticMetricEx.Subject = StatisticSubject.DNStatus;

and i get this in the StatisticMetricEx:

{CATEGORY [int]  = 10 [CurrentState]TM_LENGTH [int] = 0can't process DataSupport class cause exception: [IndexOutOfRangeException] Index was outside the bounds of the array.at:    at Genesyslab.Platform.Reporting.Protocols.StatServer.ActionsMask.IsBitSet(Int32 bit)  at Genesyslab.Platform.Reporting.Protocols.StatServer.ActionsMask.ToString(Int32 indent)  at Genesyslab.Platform.Reporting.Protocols.Internal.ActionsMaskCodec.AppendLogValue(StringBuilder buf, Object customTypeObject, Int32 indent, Boolean truncate, Boolean hide)  at Genesyslab.Platform.Commons.Protocols.Internal.ToStringHelper.AppendLogValue(StringBuilder buffer, IDataSupport data, Int32 indent, Boolean hide, Boolean truncate, AttributesLogHiddenList hiddenAttributes)}

What can be possibly wrong here?
[/quote]

Offline dimbar

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Re: Got weird warning in the message attribute
« Reply #3 on: May 05, 2017, 03:48:58 PM »
i am running 8.5.302.04 PDSK . I have changed my code a lot ( i am not using RequestOpenStatisticsEx anymore, but RequestOpenStatistics) and i do not have this problem. But as soon as i have the time i will come back to you with logs and more info . Thank you :)