I can not intercept this command. tell me whether correctly I am doing
so get an error at startup
commandManager.CommandsByName["InteractionManagementMarkDone"].Insert(0, new CommandActivator() { CommandType = typeof(OnInteractionDone), Name = "MyInteractionDone" });
and so I do not come to your command by the debugger
commandManager.InsertCommandToChainOfCommandBefore("InteractionManagementMarkDone", "MediaTypeMarkDone", new List<CommandActivator>() { new CommandActivator() { CommandType = typeof(OnInteractionDone) , Name="MyInteractionDone" } });
Tell me please, I can see the whole picture, how I could be in class command operate with form elements? Most of them are in the view model but not all.
Kubig is correct. You probably want to accomplish this by using IWS commands or command chains.
When various actions occur in IWS, a chain of commands is run. The IWS APIs allow you to tack your own custom code onto command chains, or even create your own.
Identify the command chain you want to insert your custom actions on. The documentation site lists them all under Reference for Commands. Sometimes in order to figure out what command chain to add your functionality to, it is best to perform the action (like closing a case), then look in IWS logs to see what commands were fired
Create a class representing your custom command, on the doc site reference CustomCommand.cs file - yours should look similar to this
Register your custom command. Doing this basically inserts your command into an existing command chain, the registration code might look something like this:
// File: ExtensionSampleModule.cs
ICommandManager commandManager = container.Resolve<ICommandManager>();
// Add a command before the release call
// Method 1:
commandManager.CommandsByName["InteractionVoiceReleaseCall"].Insert(0, new CommandActivator() {
CommandType = typeof(BeforeReleaseCallCommand), Name = "BeforeReleaseCall" });
// Method 2 (recommended):
commandManager.InsertCommandToChainOfCommandBefore("InteractionVoiceReleaseCall", "ReleaseCall",
new CommandActivator() { CommandType = typeof(BeforeReleaseCallCommand), Name = "BeforeReleaseCall" });
I took all of the above code and information from the doc site (URL above). Check it out, it should give you everything you need.
abudwill yes I’ve read and seen how to register how commands and create your class. the question was what kind of command I use. You helped me by saying that it is possible in the logs to see what command worked out and I was able to intercept telephone interaction command completion
commandManager.InsertCommandToChainOfCommandBefore("InteractionVoiceBeforeClose", "Close",
new List<CommandActivator>() { new CommandActivator() { CommandType = typeof(OnInteractionDone), Name = "OnInteractionDone" } });
I chose the right team? to complete the email and chat need to use separate commands, or I can done use one command?
Hopefully correctly written and you will understand me. and thank you very much!
Yes, thank you, thanks to the fact that possible view in the logs to execute commands, I was able to find the necessary, just thought have one common.
I was able to intercept the event of the button, but can not operate on a form. tell me how can I be? models are initialized empty can only get a singleton model, and to operate a class of my control (form) I can not. ???
Friend, prompt please!
as soon I try to add something to my “IElementOfCommand” class in addition it stops working. Whether it’s a different interface or keyword “partial”. How do I make sure that I was able to work with the form and initialize models. :-\
Try the BundleClose Command. This command will be executed once you clicked the Done Button. This Command will be available for all Media Types like Media voice and Open Media.