End user on xFlow tries to handle an incoming chat from Service Point. The chat is not handled with the message "Failed to handle chat session. Ticket is in read only mode".
Release : 17.3 GA and RU1
Component : XFLOW INTERFACE FOR SDM
Running pdm_key_refresh will break SP/xFlow chat. Issue has also been seen after installing RU maintenance patches.
One can view the id and persid entries for chat_queued_user and chat_session when running the following queries in SQL Server Management Studio:
Select * from chat_queued_user
Select * from chat_session where delete_flag = 0
There will be entries such as:
Table chat_queued_user:
id: 400001
persid: chat_queued_user:400001
session_id: 400206
Table chat_session:
id: 400206
persid: chat_session:400206
The above id and persid values should be identical and in sync between the two tables. In a good case where chat is working, the above values should read:
Table chat_queued_user:
id: 400206
persid: chat_queued_user:400206
session_id: 400206
Table chat_session:
id: 400206
persid: chat_session:400206
In the collabMS.log, one will find entries such as:
ERROR - 2020-01-01 00:00:00 [c.c.c.a.SdmUpdateObjectByPersidActor] - Exception occured for persid (400206). Error : com.ca.casm.exception.CasmBaseException: Error : NOT FOUND,
Workaround to address the issue (short term)
Note: users must first attempt to run chat unsuccessfully in xFlow/Service Point, experiencing the "Failed to handle chat session. Ticket is in read only mode" error message on the xFlow side in order to establish the new kc entries. (pdm_key_refresh wipes the existing entries in the kc table). The following will close out all outstanding chats and correct the key synchronisation problems that are causing the problem.
- Stop all SDM and xFlow services.
- In SQL Server, update the key_value entries in kc for entries 'chat_session', 'chat_queued_user', ie:
update kc set key_value = XXXX where key_name IN ('chat_session', 'chat_queued_user')
XXXX should be the larger value of the two existing key_value entries between 'chat_session' and 'chat_queued_user'. You can view the existing entries and confirm that they are not identical by running:
Select * from kc where key_name IN ('chat_session', 'chat_queued_user')
- In SQL Server, update the chat_session and chat_queued_user tables to close out/clean up any existing chats.
Wipe chat_queued_user table completely (table should be empty to ensure that there are no active Live chats)
Delete from chat_queued_user
Update the chat_session table so that all entries with delete_flag set to 0 (active chat sessions) have an end_time, session_close_reason, and delete_flag all set as follows
update chat_session set end_time = XXXX, session_close_reason = 'BU', delete_flag = 1 where delete_flag = 0
XXXX should be an integer value larger than corresponding start_time. The above Update query on the table chat_session closes out all remaining sessions.
- Start SDM and xFlow Services and verify that xFlow / SP chat works.
An existing defect, DE58759, has been created to address the problem with pdm_key_refresh breaking xFlow/SP Chat functionality.