插入的命令链未按正确顺序执行
Inserted Chain of Command not executing in correct order
我在 "GetAttachedDataInformationUCS" 命令之前的链 "BundleClose" 中插入自定义命令,但它在 "Close" 命令之后执行命令。我曾尝试在 "GetAttachedDataInformationUCS" 以外的命令之前、之后以及使用其他命令插入它,但它总是在 "Close" 命令之后执行。我怎样才能让它按预期工作?
_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
不知道为什么,但在 "Close" 命令起作用之前添加它。
该 SDK 存在错误。我可以保证。我提交了很多关于 IWS/WDE sdk 的票。由于 Unity Container,存在命令使用错误。使用这个的最佳方法。
正如您在页面底部看到的,GetAttachedDataInformationUCS 是链的“0”命令。如果你插入 0 你的命令将是第一个。如果插入“1”,将是;附上。 -> 你的命令 -> 更新......
P.S。在你的命令的执行方法上,false 是继续下一个命令,true 是中断命令链。
P.S。 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
我在 "GetAttachedDataInformationUCS" 命令之前的链 "BundleClose" 中插入自定义命令,但它在 "Close" 命令之后执行命令。我曾尝试在 "GetAttachedDataInformationUCS" 以外的命令之前、之后以及使用其他命令插入它,但它总是在 "Close" 命令之后执行。我怎样才能让它按预期工作?
_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
不知道为什么,但在 "Close" 命令起作用之前添加它。
该 SDK 存在错误。我可以保证。我提交了很多关于 IWS/WDE sdk 的票。由于 Unity Container,存在命令使用错误。使用这个的最佳方法。
正如您在页面底部看到的,GetAttachedDataInformationUCS 是链的“0”命令。如果你插入 0 你的命令将是第一个。如果插入“1”,将是;附上。 -> 你的命令 -> 更新......
P.S。在你的命令的执行方法上,false 是继续下一个命令,true 是中断命令链。
P.S。 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