" /> PSDK 8.1.4 [java] - Create RequestOpenStatisticEx - Genesys CTI User Forum

Author Topic: PSDK 8.1.4 [java] - Create RequestOpenStatisticEx  (Read 5857 times)

Offline jalona

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
PSDK 8.1.4 [java] - Create RequestOpenStatisticEx
« on: January 29, 2015, 06:27:28 PM »
Advertisement
Hi, dear colleagues.
Please help me with create Dinamic request for StatServer
Getting dinamic statistics on the [i]StatisticObjectType.GroupAgents[/i] - successfully
Getting dinamic statistics on the [i]StatisticObjectType.GroupQueues[/i] - fail

Template config [i]StatisticObjectType.GroupQueues[/i]  in CCPulse
[url=https://www.dropbox.com/s/9yquuzpiveeetsh/CCPulse%20-%20Entered.png?dl=0]https://www.dropbox.com/s/9yquuzpiveeetsh/CCPulse%20-%20Entered.png?dl=0[/url]
and returned correct value [i]CallEntered[/i].

Create this dinamic request in code java
[code]
    @SuppressWarnings("deprecation")
    public RequestOpenStatisticEx setRequestOpenStatisticEx() {
        RequestOpenStatisticEx requestOpenStatistic = RequestOpenStatisticEx.create();

        StatisticObject object = StatisticObject.create();
        object.setObjectId("All_HelpDesk_VQ");
        object.setObjectType(StatisticObjectType.GroupQueues);
        object.setTenantName("Resources");
        object.setTenantPassword("");

        DnActionMask mainMask = ActionsMask.createDNActionsMask();
        mainMask.setBit(DnActions.CallEntered);

        DnActionMask relMask = ActionsMask.createDNActionsMask();

        StatisticMetricEx metric = StatisticMetricEx.create();
        metric.setCategory(StatisticCategory.TotalNumber);
        metric.setMainMask(mainMask);
        metric.setRelativeMask(relMask);
        metric.setSubject(StatisticSubject.DNAction);
        metric.setTimeProfile("Default");
        metric.setIntervalType(StatisticInterval.GrowingWindow);

        Notification notification = Notification.create();
        notification.setInsensitivity(1);
        notification.setMode(NotificationMode.Periodical);
        notification.setFrequency(-1);

        requestOpenStatistic.setStatisticObject(object);
        requestOpenStatistic.setStatisticMetricEx(metric);
        requestOpenStatistic.setNotification(notification);

        return requestOpenStatistic;
    }
[/code]
and returned value [i]CallEntered[/i] = 0

What is the problem? Where I made a error?

Sorry for bad knowledge of English  :(
« Last Edit: January 29, 2015, 08:43:19 PM by jalona »

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: PSDK 8.1.4 [java] - Create RequestOpenStatisticEx
« Reply #1 on: January 29, 2015, 08:44:07 PM »
What does StatServer logs show?

Offline jalona

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: PSDK 8.1.4 [java] - Create RequestOpenStatisticEx
« Reply #2 on: January 29, 2015, 09:03:44 PM »
[quote author=cavagnaro link=topic=8693.msg38532#msg38532 date=1422564247]
What does StatServer logs show?
[/quote]

I do not have access to the logs on the primary StatServer. In my company's - 1 administrator for all genesis servers. He has no time to look for logs  ;) Saving Money  :D
In operation with GroupAgents - I manage to get all the values. In GroupAgents - NotificationMode.Periodical(Time Based)

I suspect that the problem is "NotificationMode". How to assign ChangesBased for NotificationMode?

I see Event's for creat connect - there not errors
« Last Edit: January 29, 2015, 09:14:29 PM by jalona »

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: PSDK 8.1.4 [java] - Create RequestOpenStatisticEx
« Reply #3 on: January 30, 2015, 02:52:11 PM »
Within CCPulse template definition.

Offline jalona

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: PSDK 8.1.4 [java] - Create RequestOpenStatisticEx
« Reply #4 on: February 02, 2015, 07:54:57 AM »
[quote author=Kubig link=topic=8693.msg38544#msg38544 date=1422629531]
Within CCPulse template definition.
[/quote]

I need an analogue in PSDK. See the code above.

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: PSDK 8.1.4 [java] - Create RequestOpenStatisticEx
« Reply #5 on: February 02, 2015, 09:48:23 AM »
Select the NotificationMode.Immediate

Offline Gravy

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: PSDK 8.1.4 [java] - Create RequestOpenStatisticEx
« Reply #6 on: May 26, 2015, 09:03:44 PM »
I never saw an actually answer on here, and I just ran into a similar issue.

Your issue is probably similar to mine, where you are using DnActions vs RoutePointActions.  RoutePointActions.CallEntered, should provide you with the correct statistic.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: PSDK 8.1.4 [java] - Create RequestOpenStatisticEx
« Reply #7 on: May 26, 2015, 11:04:20 PM »
A RP is a DN too...so...metric is the same.
Without logs we are shooting on the air, that is why we ask for them. Sure, one of those shoots may hit the target, but what if not?

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: PSDK 8.1.4 [java] - Create RequestOpenStatisticEx
« Reply #8 on: May 27, 2015, 12:35:17 AM »
Question...why a Relative Mask?

Offline Gravy

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: PSDK 8.1.4 [java] - Create RequestOpenStatisticEx
« Reply #9 on: September 01, 2015, 02:25:07 AM »
[quote author=cavagnaro link=topic=8693.msg39575#msg39575 date=1432681460]
A RP is a DN too...so...metric is the same.
Without logs we are shooting on the air, that is why we ask for them. Sure, one of those shoots may hit the target, but what if not?
[/quote]

Yes the metric may be the same, but the ID's are not.  If you look at what ID is generated for DnActions.CallsEntered is completely different, one is 10, and the other is 80.  So as far as the SDK is concerned they are different.  It is more practical and helpful to verify the code snippet he had given before requesting to see any logs.

[quote author=cavagnaro link=topic=8693.msg39576#msg39576 date=1432686917]
Question...why a Relative Mask?
[/quote]

In the snippet, there was nothing in the relative mask, so it does not matter.