Hello,
Hopefully I can offer you some help. :) I'm working in CIC 4.0, so you may have to change a few things if you're on a different version.
If I understand the question correctly, you want to communicate from your handler to an IceLib application.
To do this, you'll need to start a watch for a particular header. Modifying your code, it would look something like:
CustomNotification notification = new CustomNotification(session);
notification.CustomNotificationReceived += notification_CustomNotificationReceived; // This will call this method when the response comes back.
CustomMessageHeader responseHeader = new CustomMessageHeader(CustomMessageType.ServerNotification, responseObjId, responseEventId);
notification.StartWatching(new CustomMessageHeader[] { responseHeader });
CustomMessageHeader header = new CustomMessageHeader(CustomMessageType.ServerNotifi cation, strObjectID, strEventID);
CustomRequest request = new CustomRequest(header);
string[] arr = { strPhone, strData };
request.Write(arr);
notification.SendServerRequest(request);
Note that you will have to define an object response id and event id.
You'll also have to create the method for the call back in your class. See below:
private void notification_CustomNotificationReceived(object sender, CustomNotificationReceivedEventArgs e)
{
// Insert Response Logic Here.
string[] customDataList = e.Message.ReadStrings(); // This is a list of strings that you provide the 'Send Custom Notification' tool step.
}
Now that you have that, you will need to go to you handler. Under the System tab you will find a "Send Custom Notification". Populate the inputs so that they match the response object id and event id you just specified in your IceLib application.
That should be all there is to it! But I would recommend you make the CustomNotification object a field in your class so that you can call StopWatching() to properly close things down.
Hopefully this helps, it's a Friday so my mind might be a bit jumbled. :p