CM/Archive
Introduction
CM/Archive is a ConSol CM add-on which allows to archive tickets from ConSol CM. The tickets are stored in a MongoDB database and removed from the CM database and the DWH, if desired. Using CM/Archive, it is possible to reduce the database size and related costs, while still storing the tickets for regulatory compliance and future reference.
It can be configured if the whole ticket should be deleted or some part of the ticket should remain in the Web Client. In the latter case, the ticket history and attachments are removed from the ConSol CM database but the basic ticket data remains.
The following figure illustrates how CM/Archive integrates with ConSol CM:
Figure 540: Architecture of ConSol CM with CM/Archive
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 in the Admin Tool. In addition to the archive permissions (see Archive Permissions) the engineers need read permissions to the queues which the tickets belong to. Any of the read permissions for the queue (Mine, Ref., None, or Other) is sufficient to view tickets from the queue in CM/Archive.
- Assign the archive role to the engineers who should work with CM/Archive, see Tab Roles - Assign Roles to an Engineer Account.
- Create a script of the type Task with the archiving logic, see Creating the Task Script to Archive Tickets.
- Execute the task with the created script, see The Task Execution Framework (TEF).
The following sections explain the steps which are specific for CM/Archive in detail.
Setting the System Properties for CM/Archive
Some system properties have to be set in the Admin Tool 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 Tickets
Before you create the task script, you need to determine the following aspects of the scope of archiving:
- Which tickets should be archived? This can be decided based on different criteria using the available API. For example, it is possible to archive tickets which were closed 5 years ago, or tickets which belong to a certain customer.
- Should the archived tickets be completely removed from the Web Client or should the basic ticket data remain?
-> Use the method deleteByIds to completely delete the ticket, and the method deleteHistoryEntries to delete only the ticket history. Both methods belong to TicketService. - If the basic ticket data should remain in ConSol CM, which items of the ticket history should be archived?
-> Set the desired value (ALL to delete all entries, ATTACHMENT to delete only attachments, LOG to delete only history entries) in the parameter pHistoryEntryTypeToDelete in the method deleteHistoryEntries. - Should the tickets remain in the DWH?
-> Use the flag pDwhAware in the method deleteByIds.
For the archiving itself, the method archiveTicket from ArchiveService is used.
Archiving tickets, i.e. creating tickets in the CM/Archive database and deleting tickets 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 tickets are present in CM/Archive before deleting them for good from the CM database.
Please bear in mind that archiving tickets is an irrevocable action which cannot be undone. Archiving tickets has the following implications:
Tickets cannot be transferred from CM/Archive back to ConSol CM.
Archived tickets cannot be changed in any way. This means that they cannot be edited, reopened or used as target of relations.
If the archived tickets should remain in the DWH, it is recommended to use partial archiving. Otherwise, the tickets remain in the DWH, but are deleted from the DWH if it is recreated.
Archived tickets only remain available in CM/Track and via REST API if partial deletion is used, i.e., if part of the ticket remains available in the Web Client as well.
The following example shows a task script to archive a single ticket without deleting it from the Web Client. Only the log entries in the ticket history are deleted, comments and attachments remain.
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);
}
def onError(taskDescriptor) {}
def onCancel(taskDescriptor) {}
Code example 102: Task script for archiving a single ticket
You can delete tickets from CM/Archive by using the following method:
archiveService.deleteTicket(ticket.getTransferKey())
Display of Archived Tickets
If the tickets are only partially archived, they can still be found in the Web Client. The basic ticket data remains as well as relations to customers, tickets and resources. The ticket header includes (ARCHIVED) and the link Open in archive application which can be used to open the ticket in CM/Archive. The ticket history shows an entry that the ticket has been archived.
Figure 541: ConSol CM Web Client - Archived ticket which was partially deleted from the Web Client
All the archived tickets can be viewed in CM/Archive. The user interface of CM/Archive enables the following actions:
- View statistics (1) - special permissions are required
- Search for a ticket (2)
- Change the GUI language (3) - the available languages are English, German and Polish
- Log out (4)
Figure 542: Icons for actions in CM/Archive
The following actions are only possible on the ticket details page:
- Delete the ticket (5) - special permissions are required
- Create a PDF with the ticket content (6)
Figure 543: Icons for actions in CM/Archive (ticket details page)
The archived ticket consists of several sections which contain the following information:
- Header
Ticket number, subject, queue, scope, workflow, assigned engineer - Ticket fields
Ticket fields (only fields containing values). The fields from the Details section of the ticket are displayed in tabs. - Contacts
Ticket customers (main and additional customer). You can click the customer to open a pop-up window with the customer data fields. The fields from the Details section are displayed in tabs. - Referenced tickets
Related tickets. If the referenced ticket was also archived, you can click the ticket relation to open it. - Referenced resources
Related resources - Attachments
Attachments of the ticket. You can click an attachment to open it. - History
Ticket history, including comments and emails