490 likes | 596 Views
IEEM 5352 Enterprise Integration. EDI Standard and Tool - 2. Interchange Envelop ( EDI Document Format). ISA (Interchange Group Start). GS (Functional Group Start). ST (Transaction Set Start). Detailed Segment (with Data Elements). SE (Transaction Set End). GE (Functional Group End).
E N D
IEEM 5352Enterprise Integration EDI Standard and Tool - 2
Interchange Envelop(EDI Document Format) ISA (Interchange Group Start) GS (Functional Group Start) ST (Transaction Set Start) Detailed Segment (with Data Elements) SE (Transaction Set End) GE (Functional Group End) IEA (Interchange Group End)
Transaction Set / Message Structure ST Transaction Sets/ Messages Segments Composite Elements Elements Element Codes
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
Trading Partners SAP C O M P A N Y PeopleSoft Oracle Apps
Trading Partners Company SAP E R P EDI Format PeopleSoft Oracle Apps
VAN Trading Partners Company TP-1 E R P EDI Format TP-2 TP-3
Company EDI EX*tender T R A N S L A T O R E R P Inbound Native Format (udf) EDI Format Outbound
VAN Trading Partners Company xlate TP-1 T R A N S L A T O R E R P TP-2 TP-3 xlate
Oracle Apps Environment EDI EX*tender T R A N S L A T O R EDIGateway (PO) Outbound O R A C L E UDF/ FF EDI Inbound (INV)
High Level Architecture EX*tender in bound mbox server mgr server out bound com server
High Level Architecture EX*tender Translator edi_dbms Mailbox: ../mbox/TP1/inedi ../mbox/TP2/inedi ../mbox/TP3/inedi UNIX File System ../db ../script ../log client Database
EDI EX*tender Client/Server Communication
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
SQL*Net Insert Monitor Data Oracle RDBMS EDI Engine IPC Delta Monitor Monitor Tables dbms_alert Start/Stop Start/Stop Client Monitor Change Number of Servers OS dbms_pipe dbms_pipe PL/SQL API Stop Engine System Call Start Engine /TP1 /inedi /inff /out /TP2 /inedi /inff /out OS Validations File System (Mailbox) edi_dbms
EDIU API’s For details see document: Technical Reference.doc • 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
EDIA API’s For details see document: Technical Reference.doc • 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
EDI EX*tender The Mailbox
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
TP1 /inedi /inff /out Translation Engine TP2 /inedi /inff /out TP3 /inedi /inff /out TP4 /inedi /inff /out Mailbox Root EDI EX*tender $EDIPATH/mbox/ EDI-FF (TP1 to TP3) FF-EDI (TP1 to TP3)
EDI EX*tender BUYER /inedi /inff /out Oracle Apps Translation Engine POO EDI Gateway ASNI ASNI SELLER /inedi /inff /out X.12 850 Outbound Device Seller’s Organization X.12 856 VAN X.12 850
EDI EX*tender Mailbox • Which Trading Partner Owns EX*tender?
EX*tender Server Any to Any Translation
EDI EX*tender Optional Pre-process (script) Mailbox Translate (script) De-group To Mailbox Re-group Optional Post-process (script) To Mailbox Send to TP Recipient Pick up from mailbox
EDI EX*tender edi_manager edi_mbox edi_server To Mailbox edi-com To Mailbox Send to TP Recipient Pick up from mailbox
EDI EX*tender edi-mbox edi-mbox edi_manager edi_server mbox1/TP1/inedi /inff /out /TP2/inedi /inff /out ... mbox2/TP3/inedi /inff /out ... mboxn/TPn/indedi /inff /out To Mailbox edi-com To Mailbox Send to TP • Recipient Pick up from mailbox
EDI EX*tender edi_manager edi_mbox edi_server To Mailbox edi-com To Mailbox Send to TP Recipient Pick up from mailbox
EDI EX*tender edi-manager edi-mbox edi_manager UDF/FF Message Queue . . . $$$MSGSTART edi_server T r a n s l a t e EDI To Mailbox ST/SE or edi-com To Mailbox Send to TP Recipient Pick up from mailbox
EDI EX*tender edi_manager edi_mbox edi_server To Mailbox edi-com To Mailbox Send to TP Recipient Pick up from mailbox
EDI EX*tender edi-mbox edi_manager edi_server UDF/FF Translation Memory edi_server To Mailbox EDI Message Flat File Message scan script map script edi-com To Mailbox Send to TP Recipient Pick up from mailbox
EDI EX*tender edi_manager edi_mbox edi_server To Mailbox edi-com To Mailbox Send to TP Recipient Pick up from mailbox
EDI EX*tender edi-mbox edi_manager edi_server EDI Translation Memory edi_server To Mailbox Flat File Message EDI Message (Automatic memory population) map script EDI Dictionary consulted edi-com To Mailbox Send to TP Recipient Pick up from mailbox
EDI EX*tender edi_manager edi_mbox edi_server To Mailbox edi-com To Mailbox Send to TP Recipient Pick up from mailbox
EDI EX*tender edi_mbox edi_manager edi_com • optional translator component • provides event driven and scheduled svc • provides communication services • used to extend translator capabilities • interface to database, email, fax, etc edi_server To Mailbox edi-com To Mailbox Send to TP Recipient Pick up from mailbox
SQL*Net /TP1 /inedi /inff /out /TP2 /inedi /inff /out edi_mbox edi_audit edi_mbox edi_mbox File Audit Tables edi_logger Forms Client edi_manager Setup Tables Message Queue edi_server edi_server Monitor Tables In Bound Asynch X.25 TCP/IP Bisynch Disk edi_com Out Bound
EDI EX*tender System Audit
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 ‘session’ 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
idle time move $EDIPATH/log/edi_answer_log $EDIPATH/log/edi_answer_log.old edi_mbox write read edi_manager Database edi_server IPC insert edi_logger edi_audit edi_audit edi_com move sndevtlog parse snderrlog $EDIPATH/log/edi_answer_log.old.xyz * Error: audit needs recovery
EDI EX*tender Application Integration
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 started • An 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 drivenit 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 Device Unconditionally executes daily Executes at Midnight and 12 noon Not Event Driven
Periodic Outbound Device Periodic Outbound Device Executes each time a file is translated to this device Event Driven
Outbound Device Usage in Translation Executes each time a file is translated to this device Outbound Device
Event Driven Outbound Device (810out) $EDIPATH/tmp $EDIPATH/tmp/com 1 810out.dat translator 810out.lhot process move 2 (move) 4 3 edi_com $EDIPATH/script/810out.com execute 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.dat 3. if $EDIPATH/tmp/810out.dat exists then 810out.com is executed by edi_com 4. 810out.com process the translated data and deletes the file when finished