The net.dante.otrs.OTRSConsumer JAVA class does not require any parameters.
In a nutshell, the OTRConsumer retrieves the XML messages from the ESB OTRS queue, and parses the XML, and uses a standard class, OTRSTicket to store the parsed XML values into. The OTRSTicket class is then used to store the data within the MySQL database described below.
The class uses the standard AuditLog class to write log message to /tmp/otrs/OTRSConsumer-YYYYMMDD.log. The location and name of the log file is configurable from within the otrs.properties file
Enterprise Service Bus (ESB)
The net.dante.otrs.OTRSConsumer JAVA class connects to the test-esb01.geant.net ActiveMQ Message Broker, using credentials stored in the otrs.properties file.
*** It is possible to review the contents of the ESB queue called OTRS using the following URL: http://test-esb01.geant.net:8161/admin/browse.jsp?JMSDestination=OTRS
The XML returned from the OTRS Web Service TicketGet operation from the OTRSProducer class is sent as a plain text message to the ESB and stored in the OTRS queue.
MySQL Database Connections
The OTRSConsumer connects to a MySQL database:
sde database on test-msr.geant.net using user reportsUser
Microsoft Outlook Calendar Connection
The OTRSConsumer connects to the Microsoft Outlook Calendar called otrs_nm using a third party JAVA library called JWebServices (http://www.independentsoft.com/jwebservices/index.html). The JWebServices relies on the Microsoft Restful API End-Point: https://outlook.office365.com/EWS/Exchange.asmx and requires a username of OTRS-NM@dante.net and a password that is stored in KeyPass
Each Calendar event within the Calendar has a unique identifier e.g.
AAMkADY4NWY1ZGZjLWVlODctNDc0My1iYjZhLWI1YTQzOTkxZWRiZQBGAAAAAACQIcYyjiQ4RaeXxPnW1anTBwBQg5gjlEzhTIaEr3IDbZFDAAAAAAEOAACJtx6ztQJURpaELxuim/rjAAEENyAHAAA=
There is a special Calendar event which is created as a Yellow coloured appointment. It signifies the date and time the OTRSOutlookCalendar class was run. This gives the end-users a visual check to ensure the service is running correctly.
The unique identifier for this event is stored within the sde.outlook_incidents table with a ticket_number set to 9999999999999999
After the OTRSConsumer has written the ticket information away to the sde.otrs_incident tables , it checks to see if a record exists in the sde.outlook_incidents for the particular Ticket Number. If a record does not exist, then this ticket record is new and no further processing takes place. If however a record is found, then it is assumed that this ticket is an update for a previously defined maintenance window, and as such the OTRSConsumer uses the value in the outlook_event_id field of the sde.outlook_incidents table to identify which Microsoft Outlook Calendar Event to delete from the otrs_nm calendar. At the end of the processing, it deletes the calendar event for the fore-mentioned Yellow coloured appointment. (The unique identifier for this event is stored within the sde.outlook_incidents table with a ticket_number set to 9999999999999999)