Genesys CTI User Forum > Genesys-related Development

WDE 8.5 Customization How to receive event notification for Agent Skills update?

<< < (2/2)

Kubig:
Notifications about configuration changes are distributed to the IWS/WDE client by default (driven by option). So, there must be existing part, where you are able to get these information. Just have never tried it.

CarloACN:
Well...i hope it could be useful for someone else too...please find below the solution:

           
            readonly Genesyslab.Desktop.Modules.Core.SDK.Configurations.IConfigurationService configurationService;
          private Genesyslab.Platform.ApplicationBlocks.ConfigurationObjectModel.Subscription subscriptionCFGSkill;
          private Genesyslab.Platform.ApplicationBlocks.ConfigurationObjectModel.Subscription subscriptionCFGPerson;
                                        .
                                        .
                                        .
            this.configurationService.NecessaryNotificationAgainEvent += new EventHandler(this.configurationService_NecessaryNotificationAgainEvent);

            this.configurationService.ConfigService.Register(new Action<ConfEvent>(this.NotifConfigUpdateHandler));
            this.subscriptionCFGPerson = this.configurationService.SubscribeNotification(new NotificationQuery()
            {
                ObjectType = CfgObjectType.CFGPerson,
                TenantDbid = this.configurationService.WorkingTenant,
                ObjectDbid = this.agent.ConfPerson.ObjectDbid
            }, (object)this);
            this.subscriptionCFGSkill = this.configurationService.SubscribeNotification(new NotificationQuery()
            {
                ObjectType = CfgObjectType.CFGSkill,
                TenantDbid = this.configurationService.WorkingTenant
            }, (object)this);
                                                    .
                                                    .
                                                    .
            private void configurationService_NecessaryNotificationAgainEvent(object sender, EventArgs e)
        {
            if (this.subscriptionCFGPerson != null)
                this.subscriptionCFGPerson = this.configurationService.SubscribeNotification(new NotificationQuery()
                {
                    ObjectType = CfgObjectType.CFGPerson,
                    TenantDbid = this.configurationService.WorkingTenant
                }, (object)this);
        }
            private void NotifConfigUpdateHandler(ConfEvent message)
        {
            log.Debug("Agent Update check, Updated EventType: " + message.ObjectType);
            switch (message.ObjectType)
            {
                case CfgObjectType.CFGPerson:
                      .
                      .
                      .
                    break;
            }
        }

                                             

cavagnaro:
Thanks a lot for sharing!  ;D

daniel_san:
Great!  :D

Navigation

[0] Message Index

[*] Previous page

Go to full version