Post on 28-Dec-2015
Interchange EnvelopInterchange Envelop (EDI Document Format)
ISA (Interchange Group Start)
GS (Functional Group Start)
ST (Transaction Set Start)
SE (Transaction Set End)
GE (Functional Group End)
IEA (Interchange Group End)
Detailed Segment (with Data Elements)
Transaction Set / Message Structure
Element Codes
Elements
Composite Elements
Segments
Transaction Sets/ MessagesST
EDI EX*tender - Architecture EDI Overview The View from 50,000 ft Client/Server Communication The EX*tender Mailbox Any to Any Translation System Auditing Application Integration
Oracle Apps Environment
ORACLE
TRANSLATOR
Inbound(INV)
(PO)Outbound
EDI EX*tender
EDIGateway UDF/
FF EDI
High Level Architecture
Translator
EX*tender
Mailbox:../mbox/TP1/inedi../mbox/TP2/inedi../mbox/TP3/inedi
UNIX File System../db../script../log
edi_dbms
clientDatabase
Client/Server Communication
Allows Server (translator) to be controlled by Client Start and stop the translation engine Change the number of running translator processes Collect performance data
Communication via SQL*Net and Oracle DBMS_PIPE
Facilitated by UNIX server process (edi_dbms) Edi_dbms services called through PL/SQL API
edia - administrative functions (restricted) ediu - user functions (unrestricted) edic - contains functions common to edia and ediu
Monitor Tables
SQL*Net
Client
Oracle RDBMS
edi_dbms
PL/SQLAPI
dbms_pipedbms_pipe
IPC
Insert Monitor Data
dbms_alert
EDI Engine
Monitor
Change Numberof Servers
Start EngineStop Engine
OS
Start/Stop
/TP1 /inedi /inff /out/TP2 /inedi /inff /out
File System
OS Validations
System Call
Delta Monitor
Start/Stop
(Mailbox)
EDIU API’s• create_mbox - create TP mailbox• submit_hostfile - submit file for translation• IsEngineRunning - check if translator is running• ScriptExists - check if mapping script exists• DirectoryExists - check if directory exists• create_directory - create directory• get_number_of_servers - get number of translators running • AnybodyHome - check if edi_dbms is responding• get_engine_status - get status of all translator processes• FixDM - used if delta monitor ends abnormally
For details see document: Technical Reference.doc
EDIA API’s
• shutdown - shutdown the translator• refresh_dictionary - used when dictionary is added• shutdown_audit - shutdown audit process• configure - part of setup process• adjust_audit_flags - changes audit data written to DB• start_engine - starts the translator• stop_engine - stops the translator• change_number_of_servers - changes the number of server processes• start_audit - starts the audit process• start_com - starts the outbound device process• start_delta_monitor - starts the performance monitor• stop_delta_monitor - stops the performance monitor
For details see document: Technical Reference.doc
EDI EX*tender Mailbox• Each Trading Partner has a mailbox
• Implemented as directories in the file system• inedi - for edi documents translatation• inff - for user defined file (UDF) translation• out - default destination for translated documents
– More than one mailbox root is possible (mbox_aliases)• default is $EDIPATH/mbox
– Mailbox supported by edi_mbox
– Documents in ../inedi and ../inff are automatically submitted to the translator by edi_mbox
– Automatic submission controlled by MBOX_SCAN_???• see configuration file, $EDIPATH/.edirc
– Mailbox also interacts with edicopy and ‘scan’ command of console application
TranslationEngine
EDI EX*tender
$EDIPATH/mbox/
TP1 /inedi /inff /out
TP2 /inedi /inff /out
TP3 /inedi /inff /out
TP4 /inedi /inff /out
Mailbox Root
EDI-FF (TP1 to TP3)
FF-EDI (TP1 to TP3)
BUYER /inedi /inff /out
SELLER /inedi /inff /out
OracleApps
EDIGateway
POO TranslationEngine
OutboundDevice
VAN
Seller’sOrganization X.12 856
X.12 850
ASNI
X.12 850
ASNI
EDI EX*tender
MailboxOptional
Pre-process(script)
De-group
Re-group
Translate(script)
OptionalPost-process
(script)Recipient
Pick up from mailbox
Send to TPTo Mailbox
To Mailbox
EDI EX*tender
edi_mbox
edi_server
edi-com
Recipient
Pick up from mailbox
Send to TPTo Mailbox
To Mailbox
edi_manager
EDI EX*tender
edi-mbox
edi_server
edi-com
Recipient
Pick up from mailbox
Send to TPTo Mailbox
To Mailbox
edi_manager
EDI EX*tender
edi-mbox
mbox1/TP1/inedi /inff /out /TP2/inedi /inff /out ...mbox2/TP3/inedi /inff /out...mboxn/TPn/indedi /inff /out
edi_mbox
edi_server
edi-com
Recipient
Pick up from mailbox
Send to TPTo Mailbox
To Mailbox
edi_manager
EDI EX*tender
edi-mbox
edi_server
edi-com
Recipient
Pick up from mailbox
Send to TPTo Mailbox
To Mailbox
edi_manager
EDI EX*tender
UDF/FF
EDI
or
$$$MSGSTART
ST/SE
Message Queue
edi-manager
.
.
.
Translate
edi_mbox
edi_server
edi-com
Recipient
Pick up from mailbox
Send to TPTo Mailbox
To Mailbox
edi_manager
EDI EX*tender
edi-mbox
edi_server
edi-com
Recipient
Pick up from mailbox
Send to TPTo Mailbox
To Mailbox
edi_manager
EDI EX*tender
edi_serverMemory UDF/FF Translation
scan script
Flat FileMessage map script
EDIMessage
edi_mbox
edi_server
edi-com
Recipient
Pick up from mailbox
Send to TPTo Mailbox
To Mailbox
edi_manager
EDI EX*tender
edi-mbox
edi_server
edi-com
Recipient
Pick up from mailbox
Send to TPTo Mailbox
To Mailbox
edi_manager
EDI EX*tender
edi_serverMemory
EDI Translation
EDI Dictionaryconsulted
Flat FileMessage
map script
EDIMessage (Automatic
memory population)
edi_mboxedi_server
edi-com
Recipient
Pick up from mailbox
Send to TPTo Mailbox
To Mailbox
edi_manager
EDI EX*tender
edi_mbox
edi_server
edi-com
Recipient
Pick up from mailbox
Send to TPTo Mailbox
To Mailbox
edi_manager
EDI EX*tender
• optional translator component• provides event driven and scheduled svc• provides communication services• used to extend translator capabilities• interface to database, email, fax, etc
edi_com
edi_mbox
edi_logger
edi_mbox
edi_com
edi_server
/TP1 /inedi /inff /out/TP2 /inedi /inff /out
AsynchX.25TCP/IPBisynchDisk
In Bound
Message Queue
edi_manager
Out Bound
edi_server
Audit Tables
Setup Tables
Monitor Tables
SQL*Net
Forms Client
edi_mboxedi_audit
File
EX*tender Auditing
Audit tracks all actions performed by EX*tender All translator processes communicate with edi_logger Each file passing through the translator is assigned a ‘s
ession’ number Each audit record identifies a particular session
• except for system level audit records which are associated with translator start session
Audit records are perodically written to the database by edi_audit
During idle times, edi_audit summarizes session activity
edi_mbox
edi_manager
edi_server
edi_com
edi_logger
sndevtlog
snderrlog
$EDIPATH/log/edi_answer_log
$EDIPATH/log/edi_answer_log.old
IPCedi_audit
readwrite
idle time move
move
$EDIPATH/log/edi_answer_log.old.xyz
edi_audit
parse
insert
Database
* Error: audit needs recovery
EDI EX*tender Application Integration Implemented by an Outbound Device Outbound Devices are managed by edi_com There are four types of Outbound Devices
• Scheduled• Scheduled, Event Driven• Periodic• Periodic, Event Driven
Outbound Devices are cached by edi_com when EX*tender is startedAn Outbound Device is an interface to the Operating System via a Shell Script
Scheduled Outbound Device
• Similar to UNIX cron process
• Can specify up to 4 times the device should execute
• Can specify the period (in days) the device should execute
– Period = 0 means execute daily
– Period = 1 means execute every other day
• When a device is marked as event driven it will execute
– only if it has been the destination of a translation
• When a device is not event driven it will
– unconditionally execute at its scheduled time
Periodic Outbound Device Also similar to UNIX cron process
Specify a period in days and minutes
Device will execute when the period expires
When a device is marked as event driven it will execute only if it has been the destination of a translation
When a device is not event driven it will unconditionally execute when the period expires
A special case, an event driven periodic device with Period = 0 days, 0 minutes Executes immediately after message is translated
Watch out for gotcha!!
Outbound Device Specifics An Outbound Device is a UNIX shell script The script must be in $EDIPATH/script The script is named according to the Outbound Device
If device is named: 810out then shell script is named: $EDIPATH/script/810out.com
Data translated to the device is written to the file: $EDIPATH/tmp/com/810out.lhot
When device executes the data file is renamed to: $EDIPATH/tmp/810out.dat This is the file that an event driven device processes
Event Driven Outbound Device
• For an Outbound Device called 810out • Device is executed only if
$EDIPATH/tmp/com/810out.lhot exists
• Messages translated to 810out will be appended to 810out.lhot
• Just before executing the outbound device– 810out.lhot is moved/appended to
$EDIPATH/tmp/810out.dat
• After processing the data file, the outbound device must delete the file to prevent the data from being processed again
Scheduled Outbound DeviceNot Event Driven Unconditionally
executes dailyExecutes at Midnight
and 12 noon
Periodic Outbound DeviceEvent Driven
Executes each time a fileis translated to this device
PeriodicOutbound Device
Outbound Device Usage in TranslationOutbound Device Executes each time a file
is translated to this device
translator
edi_com
$EDIPATH/tmp/com
810out.lhot
1$EDIPATH/tmp
810out.dat
move 2
$EDIPATH/script/810out.comexecute
3
(move)process4
Event Driven Outbound Device Event Driven Outbound Device (810out)(810out)
1. Documents translated to Outbound Device 810out are written to 810out.lhot
When its time to execute the outbound device:2. edi_com moves/appends 810out.lhot to $EDIPATH/tmp/810out.dat3. if $EDIPATH/tmp/810out.dat exists then 810out.com is executed by edi_com4. 810out.com process the translated data and deletes the file when finished