Professional Documents
Culture Documents
Sitaraman, Lakshmi
6-11-2019
Revision EInvoice
Developer Revision Description Reviewer Revision Date
Eclipse
Putty
Citrix
Internet Browser
Notepadd++
mysql-workbench-community-8.0.16-winx64
GIT
ACCESS REQUIRED
PAGE 1
PROJECTS AVAILABLE IN GIT:
1. eim – core
2. eim-web
3. eim-xml
4. eim-common
5. eim-common platform
6. eim-fos-ws
1. Create access token (for the first time or if will be needed new one):
2. Login to https://bitbucket.luminorgroup.com with your credentials
3. Click on Avatar and select “Manage account” -> “Personal Access Tokens”
(https://bitbucket.luminorgroup.com/plugins/servlet/access-tokens/manage)
4. Select “Create token”, add name, choose permissions (if you will use write in
any of the projects – Please select it. Tokens are like another password, so their
permissions will default to the level of access you have).
5. Copy Access token (you will not be able to view it again) and save. Now you can
use it while cloning/pulling/pushing to repository.
6. Create a folder in your local directory, Open the GIT in that folder and clone all
the projects in your folder..
In order to get the repo to be clone: Click on the project -> Click on Clone ->
Copy the URL and use the below command in GIT -> Repeat the same for all 5
projects.
PAGE 2
Command(s):
PAGE 3
git clone https://Lakshmi.Sitaraman
%40consult.luminorgroup.com@bitbucket.luminorgroup.com/scm/lei/eim-
xml.git
PAGE 4
3. Select Gradle JVM as JDK 11 from you local and click on Finish. Repository will be
downloaded.
4. Repeat the same process for all other repository except eim-web (We will be installing
EIM web in eclipse)
5. Installation of docker: Need to run the docker file named docker-compose-db.yml
inorder to activate the docker and connect it to MYSQL (Docker is just used to connect
local to MYSQL Database)
a. Docker file is available in eim-common-platform. It consist of DB connection
details.
b. Open GIT bash from the local directory and execute the below command
Docker will be running and you can connect to local MYSQL successfully with the below
details.
PAGE 5
There will not be able data. So for that now we need to start eim module to load the
data.
Open Intellj -> Click on EIM repository -> Click on Gradle Icon -> Write the command
line as Clean Install -> Click on OK
PAGE 6
7. Next step is to run eim-xml with gradle clean install like eim module since it has
dependency with other projects.
8. Next Step is to run eim-commons wit Gradle Clean Install , Once its done .m2 folder
will be created in your local repository with all the models, dao classes
PAGE 7
9. Go to MySQL Work Bench -> Connect to Local Host and -> Click on Schema -> Click on
localDb -> List of tables will be displayed. You can check using Select * from tablename.
2. Next -> Next -> Select Project Root Directory (Folder in which you have
downloaded eim-web from GIT) -> Click on Finish
PAGE 8
3. Download lombok-1.18.4.jar and run the jar directly using GIT (This jar will
automatically creates getters and setters for the variables defined.)
Command : java -jar lombok-1.18.4.jar
4. Set up Annotation in Eclipse -> Right click on eim-web project in eclipse -> Build
Path -> Configure Build Path -> Type Annotation in the search box – Click on
Annotation Process -> Enable check Box of “Enable Project Spefic Setting ” -> Apply
& close
PAGE 9
5. Open EimWebApplication.java ->Right Click -> Run as Java Application
PAGE 10
6. Login to URL -> localhost:8080/eim
Userid : test
3. Login to DB server using the userid/password created for the associate (my user id was
my last name)
4. In putty give this command, to connect to SQL database (User Name: luminor)
Login to Citrix -> Connect to the App Server (App Server1: t1ee-eimapp1 IP: 10.93.81.8)
Logs are stored in event_log table and we are using annotations for capturing the details.
We will be using Active MQ to test in local since it is not feasible to make sonic call from local
3. Click on Manage Active MQ broker -> For credentials, contact your Leads
PAGE 12
4. Click on Queue
PAGE 13
5. Please create a Queue named “SONICEE.APP.EIM.REQUEST” if Queue is not actually
created.
c. Extract the files in your local machine and create a folder named
“template” and sub folder named ”EMK ” and sub folder “received” in local
system.
d. Copy the files from test data to received folder. Initially copy all the files
from SCNew Folder which contains seller contract.
PAGE 14
e. Once files are copied . Delete the data from seller_contract table.
f. Go to EIM Web Application -> go to Preferences -> Change the Processor
path to your local directory in which you have placed the files -> Change
DNB file prefix to EMK.(Files will be picked automatically )
PAGE 15
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
h. Start eim-core Application by setting profiles active for jobs, mock , Active-
mq the files will be processed for Seller Contract.
Command : Dspring.profiles.active=jobs,active-mq
(Job runs every 10 seconds)
i. Once the files are processed then two folders will be created inside EMK
send -> File which are in processed state (is_processed =0)
tosend -> Archival file which are processed. (is_processed =1)
PAGE 16
You can also check in process_queue table how many files are yet to
process. Once all the files are processed , check in seller_contract table if
records are inserted successfully.
PAGE 17
j. Once all the seller contract files are processed , copy the files from test data
of folder named EARVE test data and place it in the received folder. After 10
seconds jobs will pick the files are starts processing.
k. Similarly check in process_queue table and once all the files are processed ,
data should be available in einvoice table with status as arrived. All the files
will be moved to send and tosend for Archival.
PAGE 18
l. Once all the data are fully loaded, Select the service you want to run via
Active MQ.
m. Go to EIM core -> EimServiceSelector.java -> mention the below command
serviceName =”Name of the service you want to test from ActiveMQ”
PAGE 19
n. Once the service name is selected , go the XML template in the project.
Modify the XML data or fields required and copy the xml and go to Active
MQ
p. Copy the XML in the message Body and Click on Send -> Check for the logs
in console / Debug and check for the response.
PAGE 20
q. Now check for console for the Eim request XML to be sent will be displayed
and below exception states that since we haven’t set the output parameter
in ActiveMQ for the given request.
r. To set the out parameter -> Go to Active MQ -> Create a new queue
SONICEE.APP.EIM.OUT -> Go to Active MQ -> Click on
SONICEE.APP.EIM.REQUEST -> Set the Reply (Output Parameter as )
SONICEE.APP.EIM.OUT -> Click on Send
PAGE 21
s. Check for logs -> Exception will be eliminated -> XML to be send will be
displayed in logs.
PAGE 22
u. Click on the ActiveMQ.DLQ
PAGE 23
DB STRUCTURES:
PAGE 24
PAGE 25
FUNCTIONAL UNDERSTANDING OF EIM:
PAGE 26
OSIRIS (Creates EInvoice
request)
Jobs
EIM
E-invoice Request data in DB. FITEK (Third Party Provider)
Service call to OSIRIS, PLATON
via SONIC and vice versa
PAGE 27
Service Call to EIM
Check for Valid Request Throw an Exception
EimMessageListener.java
EimServiceSelector.java
Senderreciever.java
JOBS:
PAGE 28
1. ApplicationSenderJob: This job is used to create xml file starting with prefix EAA which
will be having list of einvoice which are unsent and all these details will be sent to fitek.
(Name of the O/P : tosent)
BANK -> FITEK
2. FileProcessorJob: This job will process all the files from received folder and then insert
all the file processed in process_queue table with is_processed status as 0.
3. EinvoiceProcessorJob: This job will process all the files which are in to be processed
state i.e. is_processed =0 and keep all the processed files in to_sent and sentfolder.
So all the corresponding files will be picked one by one and update the data in DB
based on seller contract (soa table) , einvoice (einvoice table). After processing all the
files is_processed will be set as 1 in process_queue table.
4. EinvoicePaymentJob : This job will do the payment processing for all the invoices based
on business logic. This job will be triggered twice a day and basically checks invoices
which are available and when to pay.
5. PersonViolationJob : This job is newly created for phase 2 , it basically sends customer
details in XML starting with prefix PIEAS to FITEK.
NOTE:
1. EimMessageLister.java -> This class is used for listening the request from Sonic and
validates whether the requests come correctly or not.
2. EimServiceSelector.java -> Once there is no error from EimMessageListener.java , this
class will call the appropriate services requested and accordingly DB operations are
performed.
Local Link :
Active MQ : http://localhost:8161/admin/queues.jsp;jsessionid=1ac8tl0w8h0cd52vzsv3z539p
Username/Password : contact your supervisor
PAGE 29
EIM Web project : http://localhost:8080/eim
Username/Password : test/
https://confluence.luminorgroup.com/pages/viewpage.action?
spaceKey=NBDDS&title=Git+workflow
KT LINKS:
PAGE 30
High Level Overview EIM
https://web.microsoftstream.com/video/c13f1f90-21ff-4ea2-8f9a-27fab8f1abff
https://web.microsoftstream.com/video/d50a984f-e583-4433-8d54-faa1a1ba36de
Basic Deployment
https://web.microsoftstream.com/video/67c92397-03cb-4161-9016-f25b7ae54f49
https://web.microsoftstream.com/video/ab6e4b50-7e56-4a23-89e1-2970ea689b0b
https://web.microsoftstream.com/video/04a08c94-0a58-473c-bc68-418e0222ffcc
EIM Overview
https://web.microsoftstream.com/video/e91d4ffe-c31a-4036-a8a8-e854dc65e086
Jobs:
https://web.microsoftstream.com/video/f3a1b57a-f11f-46c4-90d9-c74c28090adb
PAGE 31