RUN createChangeStateConsumer IN hSession
(THIS-PROCEDURE, "msgHandler", OUTPUT hMessage). PROCEDURE msgHandler: DEFINE INPUT PARAMETER hMessage AS HANDLE NO-UNDO. DEFINE INPUT PARAMETER hMsgConsumer AS HANDLE NO-UNDO. DEFINE OUTPUT PARAMETER hReply AS HANDLE NO-UNDO. DEFINE VARIABLE cValue AS CHARACTER NO-UNDO. /* cValue will be "active", "reconnecting", "failed", or "closed" */ cValue = DYNAMIC-FUNCTION("getCharProperty" IN hMessage, "state"). DISPLAY cValue. RUN deleteMessage IN hMessage. END PROCEDURE. |