Genesys CTI User Forum
Genesys CTI User Forum => Genesys-related Development => Topic started by: gogupandele on January 23, 2018, 05:06:52 PM
-
Hello everyone,
Unfortunately I have to debug an issue that occurs in an instance of IWS 8.1.
I have a custom command that is configured to execute before BundleClose / Close like this:
[code]commandManager.InsertCommandToChainOfCommandBefore("BundleClose", "Close", new List<CommandActivator>
{
new CommandActivator
{
CommandType = typeof(BundleCloseCommand),
Name = "BundleCloseCommand"
}
});[/code]
Everything is great, this gets executed but in that custom command I have a piece of code that suddenly (from something like 2-3 weeks ago) started to generate a NullReferenceException. While doing the debugging I realized that the issue is coming from this piece:
[code]
IInteractionsBundle bundle = parameters["CommandParameter"] as IInteractionsBundle;
IInteraction mainInteraction = bundle.MainInteraction;
string id = mainInteraction.EntrepriseInteractionCurrent.Id;
[/code]
The last line is the one that throws the exception and it seems that in my case EnterpriseInteractionCurrent is null and I have no idea why.
Please, is there someone who can point me in any kind of direction or give me a hint?
I don't know if it counts or not, but it seems that the maineInteraction is actually a IInteractionPullPreview (Genesyslab.Desktop.Modules.Outbound.Model.Interactions).
Thank you very much.
-
For pull preview interaction is enterprise interaction current not always working well.
I'm not sure in what cases is the enterprise structure created or not. I was having issue obviously in early interaction create stages (e.g. view conditions), the enterprise structure was sometimes null, sometimes not null. Maybe it depends from PC performance, I have no clue.
if you want to read just interaction id, do it like this:
interaction.GetAttachedData("InteractionId");
this is rock solid. (Means mostly working eservices and open media interactions) :-)