public static IMessage RequestUpdateInteraction(InteractionContent interactionContent, InteractionAttributes interactionAttributes, BaseEntityAttributes baseEntityAttributes) { Pointel.Logger.Core.ILog logger = Pointel.Logger.Core.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType, "AID"); IMessage iMessage = null; RequestUpdateInteraction updateInteraction = new RequestUpdateInteraction(); if (interactionContent != null) { updateInteraction.InteractionContent = interactionContent; } if (interactionAttributes != null) { updateInteraction.InteractionAttributes = interactionAttributes; } if (baseEntityAttributes != null) { updateInteraction.EntityAttributes = baseEntityAttributes; } if (Settings.UCSProtocol != null && Settings.UCSProtocol.State == ChannelState.Opened) { logger.Info("------------RequestUpdateInteraction-------------"); logger.Info("Interaction Attributes : " + (updateInteraction.InteractionAttributes != null ? "null" : updateInteraction.InteractionAttributes.ToString())); logger.Info("Entity Attributes : " + (updateInteraction.InteractionAttributes != null ? "null" : updateInteraction.EntityAttributes.ToString())); logger.Info("---------------------------------------------------"); iMessage = Settings.UCSProtocol.Request(updateInteraction); updateInteraction = null; logger.Trace("Response : " + (iMessage != null ? "null" : iMessage.ToString())); } else { logger.Warn("Error occurred as : Universal Contact Server protocol is Null or Closed"); } return(iMessage); }
public IMessage RequestToUpdate(InteractionContent interactionContent, InteractionAttributes interactionAttributes, BaseEntityAttributes baseEntityAttributes) { IMessage response = null; try { response = Pointel.Interactions.Contact.Core.Request.RequestToUpdateInteraction.RequestUpdateInteraction(interactionContent, interactionAttributes, baseEntityAttributes); //service.RequestToUpdateInteraction(interactionContent, interactionAttributes, baseEntityAttributes); } catch (Exception generalException) { logger.Error("Error occurred as : " + generalException.ToString()); } return(response); }
/// <summary> /// Inserts the interaction. /// </summary> /// <param name="interactionContent">Content of the interaction.</param> /// <param name="interactionAttributes">The interaction attributes.</param> /// <param name="baseEntityAttributes">The base entity attributes.</param> /// <returns>Genesyslab.Platform.Commons.Protocols.IMessage.</returns> public static Genesyslab.Platform.Commons.Protocols.IMessage InsertInteraction(InteractionContent interactionContent, InteractionAttributes interactionAttributes, BaseEntityAttributes baseEntityAttributes) { if (Pointel.Interactions.IPlugins.PluginCollection.GetInstance().PluginCollections.ContainsKey(Plugins.Contact)) { var result = ((IContactPlugin)Pointel.Interactions.IPlugins.PluginCollection.GetInstance().PluginCollections[Pointel.Interactions.IPlugins.Plugins.Contact]).RequestToInsertInteraction(interactionContent, interactionAttributes, baseEntityAttributes); return(result); } return(null); }