Genesys Engage on-premises

 View Only

Discussion Thread View
Expand all | Collapse all

InteractionEmailSend chain of command. Nothing Happens After Send button click

  • 1.  InteractionEmailSend chain of command. Nothing Happens After Send button click

    Posted 12-31-2022 12:36
    Hello Everyone,

    I am trying to Update a Backend System, After Agent send out email from WDE. I am using Custom Chain of Command InteractionEmailSend. I tried returning true and False both from custom command class. But in none of the case EMail is Sent out. When i hit send button, WDE remains in same Send Screen. In WDE Logs i can see command gets executed and completed.

    22-12-31 21:33:12.193 [ 32] DEBUG cture.ChainOfCommand - Start Execution of Chain of Command InteractionEmailSend CommandParameter

    22-12-31 21:33:12.194 [ 32] DEBUG cture.ChainOfCommand - Execute of Chain of Command InteractionEmailSend -> Name:After Send Email Type:Genesyslab.Desktop.Modules.InteractionExtensionSample.AfterSendEmail
    22-12-31 21:33:12.206 [ 32] DEBUG cture.ChainOfCommand - Stop of Execution of Chain of Command 'InteractionEmailSend' by command 'After Send Email'
    22-12-31 21:33:12.208 [ 32] INFO cture.ChainOfCommand - End of Execution of Chain of Command InteractionEmailSend ( 14.912 ms)

    Please find below the code of CUstomcommand CLass and COmmand Activator.

    commandManager.InsertCommandToChainOfCommandAfter("InteractionEmailSend", "Send",
    new List<CommandActivator>() { new CommandActivator() {
    CommandType = typeof(SendEmail), Name = "CaseReleaseCustomCommand"
    }});



    Custom Command:-

    class SendEmail: IElementOfCommand
    {
    readonly IObjectContainer container;
    ILogger log;
    IInteractionManager interactionManager;
    public INotepadViewModel notepadViewModel { get; }

    public SendEmail(IObjectContainer container, IInteractionManager interactionManager, INotepadViewModel notepadViewModel)
    {
    this.container = container;
    this.interactionManager = interactionManager;
    this.notepadViewModel = notepadViewModel;

    // Initialize the trace system
    this.log = container.Resolve<ILogger>();

    // Create a child trace section
    this.log = log.CreateChildLogger("WDE Cust Debug:-- Send Email button clicked");
    }

    public string Name { get { return "Before Send Email"; } set { } }
    public object Context { get; set; }

    public bool Execute(IDictionary<string, object> parameters, IProgressUpdater progress)
    {
    // To go to the main thread
    if (Application.Current.Dispatcher != null && !Application.Current.Dispatcher.CheckAccess())
    {
    object result = Application.Current.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Send, new ExecuteDelegate(Execute), parameters, progress);
    return (bool)result;
    }
    else
    {
    // Ok, we are in the main thread


    return true;

    }
    }

    /// <summary>
    /// This delegate allows to go to the main thread.
    /// </summary>
    delegate bool ExecuteDelegate(IDictionary<string, object> parameters, IProgressUpdater progressUpdater);

    Please Help!!

    Thanks,
    Rajnish
    #ArchitectureandDesign
    #GenesysEngagePremDev
    #Integrations

    ------------------------------
    Rajnish Kumar Roy
    Thermo Fisher Scientific Inc
    ------------------------------


  • 2.  RE: InteractionEmailSend chain of command. Nothing Happens After Send button click

    Posted 01-12-2023 09:36
    I got this fixed by returning False. As return True Means Break the continuation of Chain of COmmand.

    ------------------------------
    Rajnish Kumar Roy
    Thermo Fisher Scientific Inc
    ------------------------------



Need Help finding something?

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