Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: n2201 on February 17, 2010, 01:38:56 PM
-
Friends,
What I am trying to do: I have an email interaction and from the function below I am trying to attach data to the email interaction.
Good thing: I do not get any syntax error
Problem: When I check the attached data after this statement is executed I do not see new attached data with the interaction.
I very much appreciate your advise and suggestions!
Thank you!
[code] protected void MyFunction(string emailInteractionID)
{
try
{
AttachedData[] allAttachedData = new AttachedData[4];
AttachedData attachedData0 = new AttachedData();
attachedData0.key = "voiceCallLengthSufficient";
attachedData0.value = "true";
allAttachedData[0] = attachedData0;
KeyValue[] keyValue = new KeyValue[2];
keyValue[0] = new KeyValue();
keyValue[0].key = "interaction:addAttachedData";
keyValue[0].value = allAttachedData;
keyValue[1] = new KeyValue();
keyValue[1].key = "interaction:modifiedAttachedData";
keyValue[1].value = allAttachedData;
com.genesyslab.ail.ws.interaction.InteractionDTO[] ixnDTOs = new InteractionDTO[1];
ixnDTOs[0] = new InteractionDTO();
ixnDTOs[0].interactionId = emailInteractionID;
ixnDTOs[0].data = keyValue;
ConnectionLink.InteractionService.setInteractionsDTO(ixnDTOs);
}
} catch (Exception ex)
{
string errString = string.Format("Interaction.onEmailCallLengthSuficient interactionId({0}). {1}", emailInteractionID, ex);
CMILogging.Singleton.logger.Write(LogTypes.Error, errString);
throw (ex);
}
}[/code]
-
Hi,
[quote]Problem: When I check the attached data after this statement is executed I do not see new attached data with the interaction.[/quote]
Could you please explain how you check the attached data?
R.
-
I check it 2 ways:
1. Looked in the tserver log files
2. In other part of my code I hit a Done button on the email, there I checked the local variables and the "Attached data" for the interaction did not contain the newly attached data
Is this right?
Thanks
-
Thanks all problem resolved, Just in case any one is interested, here are the details I got from a friend, my copy-paste error.
***************
Hi
I think the method "InteractionService.setInteractionsDTO(ixnDTOs)" returns an attribute error (error. common.RequestFailed) because allAttachedData table size is wrong.
change
TheAttachedData[] allAttachedData = new AttachedData[4]; by TheAttachedData[] allAttachedData = new AttachedData[1];
Also the attribute "interaction:modifiedAttachedData" is not taken into account because it is used only with InteractionEvent. So you don't have to send it.
The TServer handles only Voice Interaction. Email interaction are handled by InteractionServer.
Christian Foricher
***************