CM/Archive
Introduction to CM/Archive
CM/Archive is a ConSol CM add-on which allows to archive cases from ConSol CM. The cases are stored in a MongoDB database and removed from the ConSol CM database and the DWH, if desired. This allows to reduce the database size and related costs, while still storing the cases for regulatory compliance and future reference.
Concepts, terms and definitions
Concept |
Other terms |
Definition |
---|---|---|
case |
ticket |
Request of the contact which the users works on in the Web Client |
DWH |
data warehouse |
Database which contains data from ConSol CM in a data model tailored specifically for reporting purposes |
Purpose and usage
The selection of the cases to be archived is done by script. Usually cases which have been closed for a given period are archived by a task script. But it is also possible to implement workflow activities or search actions which allow archiving cases using the Web Client. The script determines if the whole case should be deleted or some part of the case should remain in the Web Client. In the latter case, the case history and attachments are removed from the ConSol CM database but the basic case data remains.
The following figure illustrates how CM/Archive integrates with ConSol CM:
Setting up CM/Archive
The basic process for using CM/Archive is:
- Install CM/Archive. This is a separate Java application. The installation and setup is explained in detail in the ConSol CM Setup Manual.
- Configure CM/Archive, see Setting the system properties for CM/Archive.
- Create a role with archive permissions, see Global permissions. In addition, the users need the permission View cases for the respective queues to view cases the CM/Archive. The assignment status does not mattern.
- Assign the archive role to the users who should work with CM/Archive, see Assign a role to users.
- Create a script of the type Task with the archiving logic, see Creating the task script to archive cases.
- Execute the task with the created script, see Tasks.
Setting the system properties for CM/Archive
Some system properties have to be set to use CM/Archive.
- Set the URL of CM/Archive using cmas-archive-core-server, archive.uri.
- Configure the authentication tokens of CM/Archive using cmas-auth-server, access.token.signing.key and cmas-auth-server, client.archive.secret.
- Set the validity period of the authentication tokens using cmas-auth-server, client.archive.access.token.validity.seconds and cmas-auth-server, client.archive.refresh.token.validity.seconds.
- Set cmas-archive-core-server, archive.enabled to determine if GDPR-compliant deletions or anonymizations performed on the ConSol CM database should be applied to CM/Archive as well.
Creating the task script to archive cases
Before you create the task script, you need to determine the following aspects of the scope of archiving:
-
Which cases should be archived? This can be decided based on different criteria using the available API. For example, it is possible to archive cases which were closed 5 years ago, or cases which belong to a certain contact. Archiving is done using the method archiveTicket from archiveService.
-
Should the archived cases be completely removed from the Web Client or should the basic case data remain?
-> Use the method deleteByIds to completely delete the case, and the method deleteHistoryEntries to delete only the case history. Both methods belong to ticketService. -
If the basic case data should remain in ConSol CM, which items of the case history should be deleted?
-> Set the desired value (ALL to delete all entries, ATTACHMENTS to delete only attachments, LOGS to delete only history entries) in the parameter pHistoryEntryTypeToDelete in the method deleteHistoryEntries.In the Web Client, the case header includes (ARCHIVED) to indicate that the case has been archived, and the button Open in archive application can be used to open the case in CM/Archive. In addition, a history entry that the case has been archived is added.
-
Should the cases remain in the DWH?
-> If you set the flag pDwhAware in the method deleteByIds to “true”, the cases will be removed from the DWH as well.
Archiving cases, i.e. creating cases in the CM/Archive database and deleting cases from the ConSol CM database, is done in two separate methods. Therefore, it is possible to split the archiving in two steps in order to check if the cases are present in CM/Archive before deleting them for good from the CM database.
Archiving cases is an irrevocable action which cannot be undone. It has the following implications:
Cases cannot be transferred from CM/Archive back to ConSol CM.
Archived cases cannot be changed in any way. This means that they cannot be edited, reopened or used as target of relations.
If the archived cases should remain in the DWH, it is recommended to use partial archiving. Otherwise, the cases remain in the DWH, but are deleted from the DWH if it is recreated.
Archived cases only remain available in CM/Track and via REST API if partial deletion is used, i.e., if part of the case remains available in the Web Client as well.
The following example shows a script which archives a single case. The case history is deleted from the Web Client.
import com.consol.cmas.archive.common.model.TicketAo
import com.consol.cmas.common.model.ticket.Ticket
import com.consol.cmas.common.service.TicketService
def onInitialize(taskDescriptor) {
taskDescriptor.setTxTimeout(24 * 60 * 60)
}
def onExecute(taskDescriptor) {
//Single ticket to archive
def id = 100001
Ticket ticket = ticketService.getById(id)
if (ticket) {
archiveService.archiveTicket(ticket)
log.info("Ticket '$ticket.name' has been archived")
} else {
log.info("Ticket (id=$id) doesn't exist")
}
//partial deletion, only logs
ticketService.deleteHistoryEntries(id, HistoryEntryTypeToDelete.LOGS);
//complete deletion
ticketService.deleteByIds(id);
}
def onError(taskDescriptor) {}
def onCancel(taskDescriptor) {}
You can delete tickets from CM/Archive by using the following method:
archiveService.deleteTicket(ticket.getTransferKey())
Viewing cases in CM/Archive
In CM/Archive, regular users can search for cases, view cases and create a PDF file with the case content. Users with special permissions can also delete cases and view statistics.
The archived cases contain all the information from the Web Client, i.e. data fields, contacts, relations, history, etc., but they are read-only.