Genesys Engage on-premises

 View Only
Discussion Thread View
  • 1.  Insert commands to chains in userEvent listener

    Posted 01-11-2021 09:16
    I use customization modules with GIW v 8.1.401.69. With a userEvent listener in my custom module, I want to insert commands in differents chains depending on userEvent parameters. It work but not completely and I dont understand why. For example, I can succesfully insert in MediaVoiceReady but not in MediaVoiceNotReady.  I dont receive any error, but I log show me that my commands are not all consider.

    This is my code (vb.net) :
    _commandManager.InsertCommandToChainOfCommandBefore("MediaVoiceReady", "UpdateTLibSignature", New List(Of CommandActivator)() From {
    New CommandActivator() With {
    .CommandType = GetType(CustomCommand.MediaVoiceReadyCommand),
    .Name = "MediaVoiceReady"
    }
    })

    _commandManager.InsertCommandToChainOfCommandBefore("MediaVoiceNotReady", "UpdateTLibSignature", New List(Of CommandActivator)() From {
    New CommandActivator() With {
    .CommandType = GetType(ChaineCommande.GenericCommandCC),
    .Name = "MediaVoiceNotReady"
    }
    })

    But, if I try the exact same code in the MediaVoiceLogOn/LogOn chain, both commands are execute.

    Any ideas?

    Thank you
    #Implementation

    ------------------------------
    Alain Tanguay
    Desjardins
    ------------------------------


  • 2.  RE: Insert commands to chains in userEvent listener

    Posted 01-12-2021 02:24
    Some offhand ideas ))
    1) Maybe previous command in Execute return true ? (in doc -> // returning false from a command will cause to continue processing normally)
    2) Try examine log - maybe your insert code execute BEFORE init module that contains MediaVoiceLogOn/LogOn.
    3) Try write to log number and names of commands in chain before and after your insertion.
    4) If you customize some other entities in this module - comment it, maybe exist any mutual impact


    ------------------------------
    Dmitry Artemov
    Mobile Telesystems
    ------------------------------



  • 3.  RE: Insert commands to chains in userEvent listener

    Posted 01-12-2021 17:06
    I've try to use commandManager.GetChainOfCommandByName before and after the commandManager.InsertCommandToChainOfCommandBefore and I have the same number of command in chain before and after.  In InteractionWorkspace.log, I see my insert "InsertCommandToChainOfCommandBefore(MediaVoiceNotReady, UpdateTLibSignature, [4])" and no error.  So, I dont know why the insert dosent work.

    When I execute the chain MediaVoiceNotReady, the chain execute successfully but no trace of the commands I have add.
    DEBUG [2021-01-12 16:48:38,763] - Execute of Chain of Command MediaVoiceNotReady -> Name:UpdateTLibSignature Type:Genesyslab.Desktop.Modules.LRMSupport.Model.Login.TLibUpdateSignature 
    DEBUG [2021-01-12 16:48:38,763] - Execute of Chain of Command MediaVoiceNotReady -> Name:CheckAgentReservationChangeState Type:Genesyslab.Desktop.Modules.Voice.Model.Agents.CheckAgentReservationVoiceChangeStateCommand 
    DEBUG [2021-01-12 16:48:38,764] - Execute of Chain of Command MediaVoiceNotReady -> Name:NotReady Type:Genesyslab.Desktop.Modules.Voice.Model.Agents.NotReadyVoiceCommand 


    If I do the exact same insert but for MediaVoiceReady chain it work normally.
    DEBUG [2021-01-12 17:01:11,194] - Execute of Chain of Command MediaVoiceReady -> Name:MediaVoiceReady Type:DPSCCC.InteractionWorkspace.VuesPersonnalisees.CustomCommand.MediaVoiceReadyCommand 
    DEBUG [2021-01-12 17:01:11,195] - Execute of Chain of Command MediaVoiceReady -> Name:UpdateTLibSignature Type:Genesyslab.Desktop.Modules.LRMSupport.Model.Login.TLibUpdateSignature 
    DEBUG [2021-01-12 17:01:11,195] - Execute of Chain of Command MediaVoiceReady -> Name:InsererChaineCommandeAfter.MediaVoiceReady.UpdateTLibSignature Type:DPSCCC.InteractionWorkspace.VuesPersonnalisees.ChaineCommande.GenericCommandCC 
    DEBUG [2021-01-12 17:01:11,231] - Execute of Chain of Command MediaVoiceReady -> Name:verifConfirmation.InsererChaineCommandeAfter.MediaVoiceReady.UpdateTLibSignature Type:DPSCCC.InteractionWorkspace.VuesPersonnalisees.ChaineCommande.GenericCommandCC 
    DEBUG [2021-01-12 17:01:11,564] - Execute of Chain of Command MediaVoiceReady -> Name:verifConfirmation.InsererChaineCommandeAfter.MediaVoiceReady.UpdateTLibSignature Type:DPSCCC.InteractionWorkspace.VuesPersonnalisees.ChaineCommande.GenericCommandCC 
    DEBUG [2021-01-12 17:01:11,897] - Execute of Chain of Command MediaVoiceReady -> Name:verifConfirmation.InsererChaineCommandeAfter.MediaVoiceReady.UpdateTLibSignature Type:DPSCCC.InteractionWorkspace.VuesPersonnalisees.ChaineCommande.GenericCommandCC 
    DEBUG [2021-01-12 17:01:12,230] - Execute of Chain of Command MediaVoiceReady -> Name:Ready Type:Genesyslab.Desktop.Modules.Voice.Model.Agents.ReadyVoiceCommand ​


    Any idea?



    ------------------------------
    Alain Tanguay
    Desjardins
    ------------------------------



  • 4.  RE: Insert commands to chains in userEvent listener

    Posted 01-13-2021 06:28
    - Check if ChaineCommande.GenericCommandCC implements IElementOfCommand
    - Try get Dump Chain Of Commands (see your config file and uncomment Strl+Shift+A)
    - Try add any obviously correct, or standard(OOTB) command to chain and look dump, for example, add/insert NotReady twice

    I had a similar situation, but not in UserEvent. I customize not standardcommunication channel. During init module I clear and fill desired chain with standard(OOTB) and custom commands myself, it solve my case.

    ------------------------------
    Dmitry Artemov
    Mobile Telesystems
    ------------------------------



  • 5.  RE: Insert commands to chains in userEvent listener

    Posted 01-12-2021 08:39

    This is little bit tricky.
    Steps After Login:
    1. Get Media of logged in Place as 
    System.Collections.ObjectModel.ObservableCollection<IMedia> mediaList = agentManager.Place.ListOfMedia;


    2. Then Register EventHandler on change property for each media you want as - 
    media.MediaState.PropertyChanged += MediaState_PropertyChanged;

    3. Check Event status as  

    agentManager.MyState.State.ToString() == "Ready"



    ------------------------------
    Ravikant Chaudhary
    Adobe Systems
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources