【问题标题】:Inserted Chain of Command not executing in correct order插入的命令链未按正确顺序执行
【发布时间】:2017-04-05 18:30:24
【问题描述】:

我在“GetAttachedDataInformationUCS”命令之前的链“BundleClose”中插入了一个自定义命令,但它在“Close”命令之后执行该命令。我曾尝试在“GetAttachedDataInformationUCS”以外的命令之前、之后和使用命令插入它,但它总是在“关闭”命令之后执行。我怎样才能让它按预期工作?

_commandManager.InsertCommandToChainOfCommandAfter("BundleClose", "GetAttachedDataInformationUCS",
    new List<CommandActivator>
    {
        new CommandActivator
        {
            CommandType = typeof(UpdateDispositionDateCommand),
            Name = "UpdateDispositionDateCommand"
        }
    });

这是自定义命令:

public class UpdateDispositionDateCommand : IElementOfCommand
{
    public UpdateDispositionDateCommand()
    {
        Name = "UpdateDispositionDateCommand";
    }

    public bool Execute(IDictionary<string, object> parameters, IProgressUpdater progressUpdater)
    {
        return false;
    }

    public string Name { get; set; }
}

这是显示错误命令执行的日志的缩短版本:

Exe CoC BundleClose -> Name:GetAttachedDataInformationUCS
Exe CoC BundleClose -> Name:UpdateNotePadForVoice 
Exe CoC BundleClose -> Name:ResetInteractionChatConsultation 
Exe CoC BundleClose -> Name:IsContactModified 
Exe CoC BundleClose -> Name:SipEndpointAskClearSEPCalls 
Exe CoC BundleClose -> Name:IsPossibleToClose 
Exe CoC BundleClose -> Name:CompleteDispositionCodeOnBundle 
Exe CoC BundleClose -> Name:ValidateEditableDataBundle 
Exe CoC BundleClose -> Name:Close 
Exe CoC InteractionVoiceBeforeClose -> Name:DoNotCallOutboundChain
Exe CoC InteractionVoiceBeforeClose -> Name:SetCallResultOutboundRecord
Exe CoC InteractionVoiceBeforeClose -> Name:RescheduleOutboundRecord
Exe CoC InteractionVoiceBeforeClose -> Name:UpdateRecordCommand
Exe CoC InteractionVoiceBeforeClose -> Name:MarkProcessedOutboundChainCommand
Exe CoC InteractionVoiceBeforeClose -> Name:RescheduleGMECallback
Exe CoC InteractionVoiceBeforeClose -> Name:SetGMECallbackDisposition
Exe CoC InteractionVoiceBeforeClose -> Name:ClearSessionCommand
Exe CoC InteractionVoiceBeforeClose -> Name:IsContactModified
Exe CoC InteractionVoiceBeforeClose -> Name:SipEndpointClearSEPCalls
Exe CoC InteractionVoiceBeforeClose -> Name:Close
Exe CoC BundleClose -> Name:UpdateDispositionDateCommand
Exe CoC BundleClose -> Name:StopInteractionVoiceUCS
Exe CoC BundleClose -> Name:GetOutboundPreviewRecord

【问题讨论】:

    标签: telephony genesys workspace-desktop-edition


    【解决方案1】:

    该 SDK 存在错误。我可以保证。我提交了很多关于 IWS/WDE sdk 的票。由于 Unity Container,存在命令使用错误。使用 this 的最佳方法。

    您可以在页面底部看到 GetAttachedDataInformationUCS 是链的“0”命令。如果你插入 0 你的命令将是第一个。如果插入“1”,将是;附上。 -> 你的命令 -> 更新......

    附:在命令的执行方法上,false 是继续下一个命令,true 是中断命令链。

    附:由Genesys官方提供的解决方案。

    this.commandManager.CommandsByName["BundleClose"].Insert(0,
                        new CommandActivator() { CommandType = typeof(InteractionChatDisconnectChatEx) });
    

    ChainBundleClose 
    
    0 GetAttachedDataInformationUCS
    1 UpdateNotePadForVoice 
    2 ResetInteractionChatConsultation 
    3 IsContactModified 
    4 IsPossibleToClose 
    5 CompleteDispositionCodeOnBundle 
    6 Close 
    7 StopInteractionVoiceUCS 
    8 GetOutboundPreviewRecord 
    

    【讨论】:

    • 我同意。文档还说 BundleClose 链中有一堆命令,但是如果您在模块加载时调用 ICommandManager.DumpToLog(),您会看到该链只有 IsPossibleToClose、ValidateEditableDataBundle 和 Close。就我而言,将命令放在 Close 工作之前。那些缺失的命令必须在以后添加。
    【解决方案2】:

    不知道为什么,但是在“关闭”命令起作用之前添加它。

    【讨论】:

      猜你喜欢
      • 2023-01-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-12-19
      • 1970-01-01
      相关资源
      最近更新 更多