1

I am inserting a custom command in the chain "BundleClose" before the "GetAttachedDataInformationUCS" command, but it is executing the command after the "Close" command. I have tried inserting it before, after and with commands other than "GetAttachedDataInformationUCS", but it always gets executed after the "Close" command. How can I get it to work as intended?

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

Here is the custom command:

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

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

    public string Name { get; set; }
}

Here is a shortened version of the log that shows the incorrect command execution:

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
Eric Scherrer
  • 3,328
  • 1
  • 19
  • 34

2 Answers2

1

There is bug on that SDK. I can guarantee it. I submit many ticket about IWS/WDE sdk. There command usage bug because of Unity Container. Best way to do this using this.

As you can see at the bottom of the page there is GetAttachedDataInformationUCS is "0" command of the chain. If you insert 0 your command will be first. If you insert "1", will be; getattach. -> your command -> update ......

P.S. on execute method of your command, false is continue with next command, true is break the command chain.

P.S. It's provided solution by Official 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 
orhun.begendi
  • 937
  • 3
  • 16
  • 31
  • I agree. Also the documentation says there are a bunch of commands in the BundleClose chain, but if you call ICommandManager.DumpToLog() at module load you will see that the chain only has IsPossibleToClose, ValidateEditableDataBundle, and Close. In my case putting the command before Close worked. Those missing commands must get added later on. – Eric Scherrer Apr 06 '17 at 15:51
0

Not sure why, but adding it before the "Close" command worked.

Eric Scherrer
  • 3,328
  • 1
  • 19
  • 34