This guide will explain some of the details around the changes in
Jira Legacy | ||||||
---|---|---|---|---|---|---|
|
Jira Legacy | ||||||
---|---|---|---|---|---|---|
|
This new architecture separates the export, transfer, and import of update files from an OSCAR instance to an integrator server.
...
The integrator is then configured to scan a directory for incoming files. When found, it will attempt to process the file by unzipping it, and beginning to read the serialized files then going on to import the documents into the DB as well.
OSCAR
Properties to be concerned about are:
#integerator update period in milliseconds
INTEGRATOR_UPDATE_PERIOD=120000INTEGRATOR_UPDATE_PERIOD_PROPERTIES_KEY is used to know how often to run the job. Regardless it should run pretty much after starting up tomcat. Make sure you configured the Facility (enabled integrator).
You should see all the output in integrator.log not catalina.out
When the job runs, the output will be 2 files
IntegatorPush_<FacilityId>_yyyy_MM_dd_HH_mm_ss.zip
IntegatorPush_<FacilityId>_yyyy_MM_dd_HH_mm_ss-Docs.zip
Where yyyy_MM_dd_HH_mm_ss is the same for both files.
OSCAR will also record this creation event in the IntegratorFileLog table.
There is also an OSCAR Job (org.oscarehr.PMmodule.caisi_integrator.IntegratorFileLogUpdateJob) which needs to be setup on a schedule as well. This job will update the status in IntegratorFileLog by checking with the integrator through web services if it has processed (successfully or error) the file. You can see a UI for the IntegratorFileLog table in the new Integrator Status page from the Administration module.
In terms of the serialized files. When you unzip a transfer file, you will see a bunch of entries like
IntegatorPush_<FacilityId>_yyyy_MM_dd_HH_mm_ss.1.ser
IntegatorPush_<FacilityId>_yyyy_MM_dd_HH_mm_ss.2.ser
...
documentMeta.txt
The .ser files are just JAVA serialized objects using the native functionality of JAVA. What's important is that the first file contains a special header object, and the last file will end with a special footer object. The header contains critical information (like the file that needs to be run before this one can be run). The footer is more of a placeholder so the importer knows it successfully finished. Everything else is the data except Document contents.
#set false if you only have 1 facility on this instance..a bit of an optimization.
INTEGRATOR_LIMIT_TO_FACILITY=false
...
Startup tomcat, you will need to include -Dorg.apache.cxf.stax.allowInsecureParser=1 in your startup command for Tomcat
add job IntegratorFileLogUpdateJob
see the new Integrator Status page
Integrator
Use JDK7 / Tomcat 7 (atleast I do in my testing to make it work)
Just load up the code with this update
The importer is built in to the integrator..so as it runs, it will scan a chosen directory, and as files are dropped in there that follow the proper naming scheme, it will be loadewd and processed.
It's currently hard coded to run every minute. When a process is running, a lock file is created so that if the next job starts up, it knows not to run concurrently. (importer.lock in TOMCAT tmp directory)
All logging will go to catalina.out
Currently hard coded properties in integrator - it will use /usr/share/tomcat7/IntegratorFiles to scan for files, and archive them /usr/share/tomcat7/IntegratorFiles/archive. It's working directory will be /tmp
you need to have the 'unzip' program installed in the path for tomcat user.
Importing
Make a copy of importer.cnf
...