Custom Logger Sample Profile Workflow
The profile creates two instances of the class org.apache.log4j.Logger to work with two physical log files: claim.logger.log and file.logger.log. The logger initialization is defined in the profile's Groovy service called Logger and runs on service startup. Once the profile creates logger objects, the route components Groovy can reference the logger objects and write data to log files.
The route Custom Logger Sample in this profile picks up a batch of 837P claims and splits the batch into individual claims. The route has several Groovy components that act like data sensors - once an XEServer message exchange passes through a route component Groovy, the component appends a record to the corresponding log file.
Route structure
Route Components Description
| FS Inbound
|
FS Inbound |
Picks up a batch of 837 transactions from the file system. |
| Log File Received
|
Groovy |
Appends a log record with the information on the file received as the input. |
| Native Processing
|
XE Native |
Validates the incoming data and splits the batch into good and bad individual claims. |
| Log Good Claims
|
Groovy |
Appends a log record in the following format:
"Claim with ID ${claimID} and amount ${claimAmount} accepted"
|
| Good Claims
|
FS Outbound |
Stores all the good claims on the file system. |
| Error Claims
|
Groovy |
Appends a log record in the following format:
"Claim with ID ${claimID} and amount ${claimAmount} rejected"
|
| Bad Claims
|
FS Outbound |
Stores all the bad claims on the file system. |
| Result
|
Groovy |
After splitting, appends a log record which has information on whether any errors have occured during the original batch processing. |
| Reports
|
FS Outbound |
Stores LDNS reports on the file system. |