Mi LimitedMi-EAI-Pilot
DETAIL DESIGN DOCUMENT
Table of Contents
1 Introduction...............................................................................................................................5
Scope.........................................................................................................................................5Definitions, Acronyms and Abbreviations................................................................................5
2 Logical Architecture..................................................................................................................6
3 Network Architecture................................................................................................................7
4 Design Details............................................................................................................................8
Guidelines..................................................................................................................................8Step Details (Email Order)......................................................................................................11Orchestration of Email Orders.................................................................................................12
5 Organizations (OR)..................................................................................................................14
6 Messaging Ports (MP).............................................................................................................14
7 Distribution Lists (DL)............................................................................................................15
8 Channels (CH).........................................................................................................................15
9 Document Definitions (DD)....................................................................................................16
Order Definition......................................................................................................................16Order Status Definition............................................................................................................16Pick Ticket Definition..............................................................................................................16Pick Ticket Confirmation (ORDC) Definition........................................................................16Pick Ticket Status Definition...................................................................................................16
10 Mapping (MA)...................................................................................................................17
11 Envelops (EN)....................................................................................................................17
Order Envelope........................................................................................................................17Pick Ticket Envelope...............................................................................................................17Pick Ticket Confirmation (ORDC) Envelope..........................................................................17
12 Receive Functions(RF)......................................................................................................17
File Receive.............................................................................................................................1712.1.1..............................................................................................................................................................17
MSMQ Receive.......................................................................................................................18None.........................................................................................................................................18HTTP Receive.........................................................................................................................18
13 MSMQs (MQ)....................................................................................................................18
14 Orchestrations....................................................................................................................18
Order Orchestration.................................................................................................................18Pick Ticket Orchestration........................................................................................................18
15 Parsers................................................................................................................................18
Suspended Q Monitoring.........................................................................................................18Email........................................................................................................................................19
16 Database Schema (New database).....................................................................................20
Lookup Tables.........................................................................................................................20Correlation tables.....................................................................................................................21
17 COM components..............................................................................................................23
OrderCorrelation Component..................................................................................................23PickTicketCorrelation Component..........................................................................................23ProcessStatus Component........................................................................................................23DBAdapter...............................................................................................................................24Preprocessor EXE....................................................................................................................25Delay Handler..........................................................................................................................25
18 FTP Service........................................................................................................................25
18.1.1 FTP Orders:.................................................................................................................................2518.1.2 FTP Pick Tickets:........................................................................................................................2518.1.3 FTP Status:..................................................................................................................................25
19 Data Elements....................................................................................................................29
19.1.1 Indent Details..............................................................................................................................2919.1.2 Pick Tickets (Orders)..................................................................................................................3019.1.3 Order Confirmation.....................................................................................................................3219.1.4 Spare Parts database Temp Tables..............................................................................................3219.1.5 Error/Status Codes.......................................................................................................................34
20 Transport Mechanisms.......................................................................................................36
21 Platform Information.........................................................................................................36
22 Data volume and performance...........................................................................................36
23 Data Transformation (Mapping)........................................................................................37
24 Transactions.......................................................................................................................37
25 Application Exceptions......................................................................................................37
26 Acknowledgements And Receipts.....................................................................................37
27 Recommendations..............................................................................................................37
28 Issues..................................................................................................................................38
29 Limitations.........................................................................................................................38
30 Unit Testing Guidelines.....................................................................................................38
31 Initialization and Termination............................................................................................38
32 Revision History................................................................................................................39
1 IntroductionMaruti Udyog Ltd (MUL) desires to do pilot implementation of an Application integration tool with following objectives:
1. Familiarize/ accustom better to use these tools in MUL environment and for MUL requirements
2. To evaluate such tools from the perspective of their scope3. Cost benefit analysis
The pilot implementation comprises of integrating the following enterprise applications: 1. I2 DP with Sales Systems 2. Dealer orders to be picked up from the mails and processing of those orders
ScopeThis document describes the architecture of the system as well as the various modules, data elements, process flow and functionality.
Definitions, Acronyms and Abbreviations MUL Maruti Udyog LimitedMARC Material And Resource Control
EAI Enterprise Application Integration SP Spare Parts
2 Logical Architecture
3 Network Architecture
4 Design Details
The current focus of the EAI pilot is the integration of order processing which spread across multiple systems and departments. The order is processed in three disparate systems such as Mailing, spare parts and MARC system. These three systems will be integrated to process orders, which are received by email attachments. These attachments are positional flat files and contain order information.
The diagram below shows the various systems involved and the high-level flow of email order processing. For other order types like extranet the order processing starts at a later stage (After a record is entered into the temp table in Spare Parts System).
Guidelines The following guidelines are made while doing the design. Mail Robot program will be used to extract mails from exchange server. The
file will be placed in BizTalk folder or in a shared folder in the network. One Pick Ticket may contain items from multiple orders and one order may
split into multiple pick tickets. Because of this the activation of pick ticket orchestration from order orchestration won’t happen.
Each Pick Ticket will be send to MARC as an individual file/message. There will be one and only one response (ORDC) for each pick ticket send to
MARC and it will be send/received as individual file/message The Pick Tickets marked as for MARC only will be send to MARC system There can be multiple error/exception messages at each stage of orchestration. A message will be send to BizTalk server for each every order-entry in the
temp table of the spare parts system except for the email orders Extranet/intranet/oracle form orders will start when an order is entered into
temp table. AIC will be written to put data directly into the temp tables in Spare Parts
database. The mailing functionality will be limited to sending mails based on the error
code. The content, subject and email IDs of the mail will be given by the applications.
Back Orders also will be treated as a part of a normal order.
Fig. Email Order processing
The order processing happens in three stages for email orders. For non-email orders the processing starts at stage 2. The stages are
ORDC
MARC
Spare Parts SystemExchange Server
Validation of Pick Ticket
Pick Ticket Confirmation
Packing Confirmation
Process Pick Ticket Confirmation
Generate Invoice
Email Order from Exchange Server
BizTalk Server
FundsValidation
OrderValidation
Inventory Allocation
Generate Pick Tickets
Order DataSyntax and File level validation
Suspended Queue
Fails
Send to MarcPickTicketsLoad Pick
Ticket
Send to Spare Parts
Order Completion
Extranet Orders
Back Orders
1. Detaching order files from emails and sending to Spare Parts System2. Processing and Sending the Order detail (Pick Ticket) from Spare Parts to
MARC.3. Processing and Sending the Order confirmation details (Pick Ticket) from MARC
to Spare Parts.
The various steps involved in the above stages are explained below.
Stage 1: Detaching order files from emails and sending to Spare Parts System
MUL receives orders by email attachments. Attachments are detached from the mail and are stored in a folder in a network
folder. These attachments are order details positional flat files. BizTalk server will get that file using file receive function. The file will be
validated against the XML schema defined. If any Parsing Error, Syntax error or invalid file error happens the order will be
moved to suspended Queue. BizTalk will send the validated order file to the Spare parts system using an AIC
component or FTP service
Stage 2: Processing and Sending the Order from Spare Parts to MARC.
o The Spare Parts system will load and validate the order fileso After validation the order will be checked against available fundso Then the inventory gets allocatedo Unavailable items/quantities will move to a back ordero Pick tickets will get generated for the allocated items/quantities in the ordero The Pick ticket will be send to BizTalk( By placing it in a folder monitored by
BizTalk)o If all the stages get executed successfully BizTalk will send a status message to
the dealer.o If any error, exception or delay happens during above steps, the spare parts
system will generate appropriate error messages.o Biz Talk will send the pick tickets to the MARC system which are marked for
MARCo BizTalk server will wait for pick tickets till the Spare Parts systems says that all
the Pick tickets are generated for that order including back orders and quantity adjustments from MARC.
Stage 3: Processing and Sending the Order confirmation details from MARC to Spare Parts
The MARC system will load and validate the pick tickets. After validation the Pick ticket will get confirmed. Then the Packing confirmation happens Then the ORDC (confirmation) files for pick tickets will be sent to Spare Parts.
If any error, exception or delay happens during above steps, the MARC system will generate appropriate error messages
After receiving the ORDC files the Spare Parts system will process the confirmation.
Then the Invoice will get generated A final status update will be sent to the Order after all pick tickets are processed
successfully.
Step Details (Email Order) Various steps and actions are detailed out below for the email order processing. Non-email orders starts from the order validation stage.
Process Step Inform Status On Failure On Delay Order State on Failure/Delay
Receive Order File
Notify Sys Admin Wait
Order Capture Notify SRS Abort (in case of error in file structure) Wait (in case of corrective action or terminate)
Order Validation
Notify SRS Notify Dealer in case of critical error
Wait
Funds Validation
Dealer is informed of order acceptance
Notify SRS Notify Dealer
Wait
Inventory Allocation Generate Pick Ticket
Notify SRS (after 2 hrs)
Wait
Send Pick Ticket to MARC
Notify Sys Admin Wait
Load Pick Ticket in MARC
Notify Sys Admin (MARC)
Validate Pick Ticket
Notify WAD Wait
Pick Ticket Confirmation Packing Confirmation
Notify WAD (for VORs after 6 hrs & for normal after 3 working days)
Wait
Send Pick Ticket Confirmation
Notify Sys Admin (MARC)
Wait
Process Pick Notify WAD Wait
Ticket Confirmation
Notify SRS
Generate Invoice
Dealer is informed of order status
Notify WAD Notify SRS
Orchestration of Email Orders The orchestration of email orders is depicted below.
Fig: Orchestration of Email Order
BizTalk Orchestration
SMTPReceive Email
Send To Spare Parts
Spare Parts
MARC
Spare Parts
Get all Pick Tickets
Receive Pick Tickets
Send To Marc
Receive Feedback
Send To Spare Parts
Get Confirmation
Start
Mail Server
End
5 Organizations (OR)1. Spare Parts 2. MARC 3. Maruti EAI (Home Organization)
Applications (AP) BizTalk Email
6 Messaging Ports (MP)Name Destination Schedule/portOrderToBizTalk Xlang
ScheduleOrder / ReceiveOrder
OrderPortToSP BizTalk AICOrderStatustoEAI BizTalk MSMQ/ receivestatusEmailBackupPort Email
ApplicationFile
ToBizTalkPort BizTalk MSMQ/ ReceiveEmailOrdBkpSaveLoopCorr BizTalk AICOrderStatusLoop BizTalk MSMQ/ receivestatusSendPickTicketToEAI Xlang
SchedulePickTicket/ ReceivePickTicket
SendPickTicketConfirmToEAI BizTalk MSMQ/ ReceivePickTicketConfirmSendPickTicketStatusToEAI BizTalk MSMQ/ ReceivePickTicketStatusSendPickTicketToMARC MARC FileSendSPPickTicketStatusEAI BizTalk MSMQ/
ReceivePickTicketStatusFromSPSavePickTktLoopCorr BizTalk AICReceiveXtranetOrder XlangSchedule Order/ ReceiveXtranetOrderStoreXtranetCorrInfo BizTalk AICORDCtoSPdb SP AICNonMARCCorr Spare Parts AICNonMARCPickTicket XlangSchedule PickTicket/
ReceiveNonMARCPickTicketSendORDCtoEAI BizTalk FileSendORDCtoBackup Spare Parts FilePickTicketXMLtoFlat MARC File
7 Distribution Lists (DL)
Name Channel used Port 1 Port 2EmailOrder EmailOrderBackup EmailBackupPort ToBizTalkPortORDCtoSP ORDCtoSP ORDCtoSPdbSendORDCtoEAI ReceiveORDC SendORDCtoEAI SendORDCtoBackup
8 Channels (CH)Name Port Source In(Out)bound
DocumentSendOrderToSP OrderPortToSP BizTalk EmailOrderDefinitionOrderStatusChannel OrderStatusToEAI BizTalk Order Status
DefinitionEmailOrderBackup EmailOrders BizTalk EmailOrderDefinitionEmailOrderToPort OrderToBizTalk XlangSch
eduleEmailOrderDefinition
SaveLoopCorr SaveLoopCorr BizTalk EmailOrderDefinitionOrderStatusLoop OrderStatusLoop Spare
PartsOrder Status Definition
ReceivePickTicket SendPickTicketToEAI Spare Parts
PickTicket Definition
ReceivePickTicketConfirm
SendPickTicketConfirmToEAI
MARC PickTicket Confirm Definition
ReceivePickTicketStatus
SendPickTicketStausToEAI
MARC PickTicket Status Definition
SendPickTicketToMARC
SendPickTicketToMARC
BizTalk PickTicket Definition
ReceivePickTicketStatusFromSP
SendSPPickTickectStatusEAI
Spare Parts
PickTicket Status Definition
SavePickTktLoopCorr SavePickTktLoopCorr BizTalk PickTicket DefinitionSendXtranetOrder ReceiveXtranetOrder Spare
PartsEmailOrderDefinition
StoreXtranetCorrInfo StoreXtranetCorrInfo BizTalk EmailOrderDefinitionORDCToSP ORDCToSP BizTalk PickTicket Confirm
DefinitionNonMARCCorr NonMARCCorr BizTalk PickTicket DefinitionReceiveNonMARCPickTicket
NonMARCPickTicket Spare Parts
PickTicket Definition
ReceiveORDC SendORDCToEAI MARC PickTicket Confirm Definition
PickTicketXMLtoText PickTicketXMLtoFlat BizTalk PickTicket Definition
9 Document Definitions (DD)
Order Definition
Name :Order DefinitionSpecification :OrderSpec.xmlGlobal Tracking : ORDER REFERENCE NO, CUSTOMER IDSelection Criteria :None
Order Status Definition
Name :Order Status DefinitionSpecification :OrderStatusSpec.xmlGlobal Tracking :OrderIDSelection Criteria :None
Pick Ticket Definition
Name :Pick Ticket DefinitionSpecification :PickTicketSpec.xmlGlobal Tracking :Ord_No((Pick ticket ID)
: ORD_TYPESelection Criteria :None
Pick Ticket Confirmation (ORDC) Definition
Name :Pick Ticket Confirm DefinitionSpecification :PickTicketConfimSpec.xmlGlobal Tracking :Ord_No(Pick ticket ID)Selection Criteria :None
Pick Ticket Status Definition
Name :Pick Ticket Status DefinitionSpecification :PickTicketStatusSpec.xmlGlobal Tracking :PickTicketIDSelection Criteria :None
10 Mapping (MA)None
11 Envelops (EN)
Order Envelope
Name : Order EnvelopeFormat : Flat FileSpecification :OrderSpec.xml
Pick Ticket Envelope
Name : Pick Ticket EnvelopeFormat : Flat FileSpecification :PickTicketSpec.xml
Pick Ticket Confirmation (ORDC) Envelope
Name : Pick Ticket Confirm EnvelopeFormat : Flat FileSpecification :PickTicketConfimSpec.xml
12 Receive Functions(RF)
File Receive
12.1.1
Name File Type
Envelop Channel
OrderStatusLoop xml OrderStatusLoopPurchaseSiteFuncReceicePickTicketXML
Ord PickTicketXMLtoText
ReceiveNonMARCPickTicket
Ord Pick Ticket Envolope ReceiveNonMARCPickTicket
ReceiveORDC Orc Pick Ticket Confirm Envelope
ReceiveORDC
ReceiveOrder Dat Order Envelope EmailOrderBackupReceiveOrderQ EmailOrdertoPortReceiveOrderStatus Xml OrderStatusChannelReceivePickTicket Ord Pick Ticket Envolope ReceivePickTicketReceivePickTicketConfirm
Orc Pick Ticket Confirm Envelope
ReceivePickTicketConfirm
ReceivePickTicketStatus
Xml ReceivePickTicketStatus
ReceivePickTicketStatusFromSP
Xml ReceivePickTicketStatusFromSP
ReceiveXtranetOrder Dat Order Envelope SendeXtranetOrder
MSMQ Receive
None
HTTP Receive
None
13 MSMQs (MQ)There will be many MSMQ will be defined in the local server. All queues are
private.
The MSMQs are
ReceiveEmailOrder(MQ1)ReceivOrderStatus(MQ2)ReceivePickTicket(MQ3)ReceiveORDC(MQ4)ReceivePickTicketStatus(MQ5)
14 Orchestrations
Order Orchestration
Pick Ticket Orchestration
15 Parsers1. XML Parser2. Flat File Parser3. EDIFACT Parser4. X12 Parser
Suspended Q MonitoringThere will be an application/service, which will monitor the suspended Q and take actions whenever an item got moved to the suspended Q. An action will be sending an email alert based on the error type, source, destination, and document type. Except error type all other parameters are optional. The email Ids associated with each error type will be stored in a lookup table.
Email The mail consolidation will be based on time and to_address basis. There won’t be any consolidation for email to the dealers.
All unconsolidated mails will be send immediately Each order will be associated with a region and any error in that region will be
sent to the people responsible that region.
To filed in the email.
For email to the dealers the dealer email ID will come as a part of the message. Other email Ids will be figured out at runtime based on the error code and region code.
From filed in the emailThe from will be set to some default email ID like “Maruti”.
Subject:If the subject field in the message is not empty then the subject will be taken from the message. Otherwise subject value will be based on the error code for unconsolidated mails. And this value will be taken from the lookup table in the local database.
For consolidated mail the subject will be something like this.“ Consolidated Mail”
All the orders will be listed in ascending order based on date/time.
The following field values will be provided in the mail.
Order Reference No.Order TypeCustomer IDCustomer CategoryConsignee IDConsignee CategoryError CodeError Description ( Default defined in the Lookup table)Error Details (if any provided as part of status message)
All the above fields will list horizontally like a report. There should be a header row to list the column names. The horizontal size will be limited to??? Both consolidated and unconsolidated mails will have the same message body structure.
Consolidation:Emails will be consolidated based on the To address.Based on the Order Type and Error Type consolidation frequency will change.Consolidation frequency will be defined in minutesAll error codes will be marked with a flag to say weather consolidation is required.
16 Database Schema (New database)There will be a new local database to maintain the correlation, consolidation, lookup and other information. The DBA/Sys Admin will maintain the lookup information in this database. This database will stay in the same server where biztalk databases are installed. The databases may get moved to a new machine when more applications are added to the EAI framework.
Lookup Tables
16.1.1.1 StatusCode
StatusCode : IntegerDescription(Subject) : Varchar(100) Details : varchar(500)RegionFlag : booleanDealerFlag : BooleanEndLoopFlag : integerStatus : varchar(50)
16.1.1.2 EmailIDLookUpId : IntegerEmailID : Varchar(150)Description : varchar(150)
16.1.1.3 RegionCodeVRegionCode varchar(50)vEmailID varchar (150)Id integer(identity seed)
16.1.1.4 StatusEmailLinkStatusCode IntegerEmail_Id Integer
16.1.1.5 ConsolidationInfo LookupStatusCode IntegerOrderType Char(2) (All pick tickets will be of the same type as order)Consolidate BooleanFrequency Integer
16.1.1.6 Consolidated EmailsOrderID Char (15)
PickTicketID Char (15)Statuscode integerTo Varchar (150)Subject Varchar (100)Body Varchar (500)SendFlag BooleanFrequency integer (Consolidation frequency In minutes)DateCreated date/time
16.1.1.7 SuspendQGUID varchar(250)
Correlation tables
16.1.1.8 Order CorrelationOrder ID Char(15)Order Reference ID Char(9)LoopInstanceID varchar(250)CustomerId varchar(7)CustomerCategory varchar(3)ConsigneeId varchar(7)ConsigneeCategory varchar(3)Status varchar(50)Lastmodified datetimeOrderType varchar(3)CustomerName varchar(30)RegionCode varchar(2)
16.1.1.9 Pick Ticket CorrelationPickTicketId Char (15)PickTicketInstanceId varchar(250)PickTicketLoopId varchar(250)Status varchar(50)Lastmodified datetimeOrderType varchar(3)CustomerId varchar(7)CustomerCategory varchar(3)ConsigneeId varchar(7)ConsigneeCategory varchar(3)CustomerName varchar(30)RegionCode varchar(2)
16.1.1.10 DelayInstanceId varchar(250)State varchar(25)TimeSent datetimeExpectedResponseTime datetimeProcessed integerInstanceType integer
16.1.1.11 HolidaysId integer (identity seed)Details varchar(50)Holiday datetime
16.1.1.12 Order StatusStatus varchar(50)
16.1.1.13 OrderTypesOrderTypes varchar(50)
16.1.1.14 PickticketFilenamesPickticketID varchar(15)Filename varchar(50)DateCreated datetime
17 COM components
OrderCorrelation Component This component will be responsible for get the order correlation info from the local database. The correlation is done using the instance ID as the message label. This eliminates the need for multiple instances of the Queue to receive messages.
CLASSES PRESENT IN ORDER CORRELATION AIC IgetCorrelation
o This gets the correlation details from the BizTalk and stores in the database.
IretrieveCorrelationo This retrieves the correlation details from the database and sends to
bizTalk for the process. IRtvLoopCorrelation
o This class takes care of the operations, which forms a loop in the process.
PickTicketCorrelation Component This component will be responsible for storing the pick ticket correlation info in the local database.
CLASSES PRESENT IN PICKTICKET CORRELATION AIC IGetPickLoopCorr
o This class takes care of the operations, which forms a loop in the process. IpickTktGetCorr
o This gets the correlation details from the BizTalk and stores in the database.
IpickTktRetrieveCorro This retrieves the correlation details from the database and sends to
bizTalk for the process. IrtvPickLoopCorr
o This class takes care of the operations, which forms a loop in the process.
ProcessStatus Component.This component will be responsible for sending emails and other alerts. This
component will also responsible for consolidating emails and alerts. The messages, which need to be consolidated, will be stored in the local database. The mail will be consolidated at specified time intervals and will be send using the CDO.
Email Consolidation exe
This sends a consolidated email by sorting Emails as per the TO ADDRESS, the status code and frequency.
GetOrderCorrelation(AIC) or IGetCorrelation This component will be responsible for doing the order correlation, which will pick up correlation info from the local database and place it the appropriate instance id as the message label.
GetPickTicketCorrelation(AIC) or IPickTktGetCorr This component will be responsible for doing the pick ticket correlation, which will pick up correlation info from the local database and place it the appropriate instance id as the message label.
CLASSES PRESENT IN CORRELATION AIC
IGetLoopCorrelationAICo This class takes care of the operations, which forms a loop in the process.
IGetPickLoopCorrAICo This class takes care of the operations, which forms a loop in the process.
PickTktGetCorrAICo This gets the correlation details from the BizTalk and stores in the
database. XtranetGetCorrelation
o This gets the correlation details from the BizTalk and stores in the database.
DBAdapter
OrderToDB(AIC) This AIC will insert the order directly into the Spare Parts Database temp table
InsertPickTicketIntoDB(AIC) This AIC will insert the pick ticket directly into the Spare Parts Database temp table
Preprocessor EXE Removes the additional carriage returns in the flat file, and makes it ready for
the Biz Talk to parse. Transfers the files from Source folder to the Destination folder (folders which
are present in the network, should be shared.). Keeps a back up of the flat file, if configured
o To configure for backup, set the registry entry of ‘BackUpFlag’ to ‘1’.
Delay Handler
18 FTP ServiceWindows FTP utility will be used to send and receive files from the Unix Server (Spare Parts). There will be 3 exe scheduled for FTP, they are
18.1.1 FTP Orders:
Used to get the XtranetOrder files from the spare parts to the Biz Talk Server
18.1.2 FTP Pick Tickets:
Used to do the following operations,
1. Put the PicklTicketConfirm files from BizTalk to SpareParts Server.2. Get the NonMARCPickTicket files from the spare parts to the Biz
Talk Server3. Get the PickTicket files from the spare parts to the Biz Talk Server
18.1.3 FTP Status:
Used to do the following operations,
1. Get the OrderStatus files from the spare parts to the Biz Talk Server2. Get the OrderCompletion files from the spare parts to the Biz Talk
Server3. Get the PickTicketStatusFromSP files from the spare parts to the Biz
Talk Server
Exchange Server
Network SharedFolder BizTalk
MessagingFile
Start
Receive Order
Order Orchestration
Send to Spare PartsSpare Parts
BizTalk Messaging Receive Status
Success?
Proces
Y
N
Order Completion
Success?
END
BizTalk Messaging
RF
CH MPDD
MPDDCH1
MPDDCH
RF
RF
FTP/File
FTP/File
StoreCorrInfoBizTalk MessagingAIC
CHDDMP
AIC
AIC
PICK TICKET ORCHESTRATION
Start
Send Pick Ticket to MARC
Receive Pick TicketSpare Parts
MARC
File
Receive Status
Success?N
Y
Receive ORDC
Send To Spare Parts
Receive Status
Success?N
Y
END
Action
Action
BizTalk MessagingFile
CHDDMP
BizTalk MessagingAIC/FTP
CHDDMP
BizTalk Messaging
MPDDCH
RFFTP/File
BizTalk Messaging
MPDDCH
RFFile
BizTalk Messaging
MPDDCH
RFFile
BizTalk Messaging
MPDDCH
RFFTP/File
Spare Parts
AIC
AIC
AIC
Error/Exception Cases
Process Step Description Error Cases Actions CommentsReceive Order File
The order file will be placed in a folder in BizTalk server. BizTalk server will get that using file receive function. The file will be validated against the XML schema defined for the order file.
Parsing Error, Syntax error or invalid file error
The order will be moved to suspended Queue.
No further action will be taken. Alert mechanism on suspended queue is under discussion
Send Order file to Spare Parts
BizTalk will send the validated order file to the Spare parts system using an AIC or FTP component
Delivery failure
Retry 3 times, after that the order will be moved to suspended Queue
Order paValidation
After receiving the order file Spare Parts server will load and validate the order information
Order Validation Failed
Notify SRS
Critical error Notify Dealer
Funds Validation
Check whether the dealer has enough funds to execute the order
Not enough funds
Email to SRS Email to Dealer
Enough funds Notify Dealer about the acceptance
Inventory Allocation
Allocate inventory
Generate Pick Tickets
Pick ticket will be generated for allocated orders. The unallocated items will be moved to a back order. Spare Parts system will inform BizTalk when the order is complete including the back orders
No action within 2 Hours
Email to SRS All the steps within the Spare parts system are considered as a single activity. Spare Parts system will send appropriate error code and messages to the BizTalk server. BizTalk will take appropriate action based on the error code
Send Pick Ticket to MARC
Each of the pick ticket will be send and tracked separately. The pick ticket level tracking will continue till the invoice generation. Pick Tickets will be consolidated after the invoice generation
Failed to deliver
Notify Sys Admin
Alert on suspended queue is required here. Because undelivered items will get moved to suspended queue by default.
Load Pick Ticket in MARC
Failed to load Notify Sys Admin (MARC)
Error code needs to be defined
Validate Pick Ticket
Validation failed
Notify WAD Error code needs to be defined
Pick Ticket Confirmation Packing Confirmation
VORs after 6 hrs & normal orders after 3 working days)
Notify WAD
Send Pick Ticket Confirmation
Pick tickets will be send via BizTalk
Sending failed Notify Sys Admin (MARC)
Process Pick Ticket Confirmation
Processing failed
Notify WADNotify SRS
Generate Invoice
Invoicing failed
Notify WAD Notify SRS
Success Inform dealer
19 Data ElementsThe data exchanged between the systems are
Indent details Pick Tickets Order Confirmation (feedback) Status Messages
The details about data being exchanged are given below.
19.1.1 Indent Details
This file is a positional flat file, which contains dealer indents for Spare parts. The following is the structure of the indent file and a sample indent file. Indent files are of the type DAT. The name of the file is …
Structure of Indent File
Header Information POSITION(1:1) constant "1" to indicate it as header POSITION(2:8) char CUSTOMER ID (1) POSITION(9:11) char CUSTOMER CATEGORY (2) POSITION(12:18) char CONSIGNEE ID POSITION(19:21) char CONSIGNEE CATEGORY POSITION(22:30) char ORDER REFERENCE NO (3) POSITION(31:40) date "dd/mm/yyyy" REFERENCE DATE POSITION(41:45) char TOTAL NO OF PARTS ORDERED POSITION(46:53) char TOTAL QTY ORDERED POSITION(54:57) char ORDER TYPE Detail Information POSITION(1:) constant "2" to indicate it as detail POSITION(2:5) char SERIAL NO POSITION(6:20) char PART NO
POSITION(21:27) char QTY
Sample Indent Data File
15803 DDL5803 DDL58030603R01/07/2002 0 0REG 2 103141M05163 200 2 209482-00448 20 2 314190M72F10 2 2 417700M60D52 5 2 522100M83060 3
19.1.2 Pick Tickets (Orders)
Pick tickets are generated by spare parts system. The pick tickets are positional flat files and contain multiple orders in a single file. These pick tickets are sent to MARC. Pick ticket files are of the type ORD and its name start with ORD and unique order number.
Structure of Pick TicketThe pick ticket file contains 5 sections, the transaction header, order header and line item details, end of transaction and the trailer.
ORDER HEADERRECORD_I FIELD_NAME FIELD_LENGTH FIELD_TYPE BEGIN_BYTE END_BYTE-------- ------------------------------ ------------ ---------- ---------- ----------ORDH RECORD_ID 4 CHAR 1 4ORDH ACTION 1 CHAR 6 6ORDH RECORD_DATE 8 DATE 8 15ORDH RECORD_TIME 5 CHAR 17 21ORDH COMP_CODE 3 CHAR 23 25ORDH CUST_NO 30 CHAR 27 56ORDH NO_LINE_ITEMS 5 NUMBER 58 62
ORDH ORD_NO 15 CHAR 64 78 (Pick Ticket No) – Unique KeyORDH ORD_TYPE 2 CHAR 80 81 (Order Type)ORDH ACCOUNT_NO 15 CHAR 83 97ORDH ALLOW_LOT_SPLIT_FLG 1 CHAR 99 99ORDH BO_POLICY 2 CHAR 101 102ORDH CARR_EXCL1_ID 15 CHAR 104 118ORDH CARR_EXCL2_ID 15 CHAR 120 134ORDH CARR_ID 15 CHAR 136 150ORDH CARR_TYPE 3 CHAR 152 154ORDH CONSOL_CNTRL_NO 9 NUMBER 156 164ORDH CUST_ADDR1 40 CHAR 166 205ORDH CUST_ADDR2 40 CHAR 207 246ORDH CUST_CITY 40 CHAR 248 287ORDH CUST_COUNTRY 10 CHAR 289 298ORDH CUST_DEA_NO 9 CHAR 300 308ORDH CUST_NAME 30 CHAR 310 339ORDH CUST_ORD_DATE 8 DATE 341 348ORDH CUST_STATE 2 CHAR 350 351ORDH CUST_ZIP 10 CHAR 353 362ORDH DATA_PASSED_THRU 150 CHAR 364 513ORDH DEA_FORM_NO 9 CHAR 515 523ORDH EXPE_ARR_DATE 8 DATE 525 532ORDH EXPE_SHIP_DATE 8 DATE 534 541ORDH FRT_PAY_CODE 2 CHAR 543 544ORDH HOST_PRIO 2 CHAR 546 547ORDH PARTIAL_SHIP_FLG 1 CHAR 549 549
ORDH PO_NO 15 CHAR 551 565ORDH SHIP_ORIGIN 4 CHAR 567 570ORDH SPEC_INSTR1_FLG 1 CHAR 572 572ORDH SPEC_INSTR1_LINE 40 CHAR 574 613ORDH SPEC_INSTR2_FLG 1 CHAR 615 615ORDH SPEC_INSTR2_LINE 40 CHAR 617 656ORDH SPEC_INSTR3_FLG 1 CHAR 658 658ORDH SPEC_INSTR3_LINE 40 CHAR 660 699ORDH SPEC_INSTR4_FLG 1 CHAR 701 701ORDH SPEC_INSTR4_LINE 40 CHAR 703 742ORDH SPEC_SHIP_DAYS_CODE 7 CHAR 744 750ORDH TYPE_SHIP 4 CHAR 752 755ORDH USER_ASSGN_DEST 10 CHAR 757 766ORDH WGHT_LIMIT_CARTON 7 NUMBER 768 774ORDH LAST_SHIP_DATE 8 DATE 776 783ORDH ORD_PRIO 2 CHAR 785 786ORDH ORD_REC_DATE 8 DATE 788 795ORDH SCHEDULE_CODE 1 CHAR 797 797ORDH WAVE_STATUS 1 CHAR 799 799ORDH PARTY_NAME 40 CHAR 801 840ORDH CUST_ADDR3 40 CHAR 842 881ORDH CUST_PHONE_NO 12 CHAR 883 894ORDH RF_PICKER 12 CHAR 896 907
Line details
RECORD_I FIELD_NAME FIELD_LENGTH FIELD_TYPE BEGIN_BYTE END_BYTE-------- ------------------------------ ------------ ---------- ---------- ----------ORDL RECORD_ID 4 CHAR 1 4ORDL ACTION 1 CHAR 6 6ORDL RECORD_DATE 8 DATE 8 15ORDL RECORD_TIME 5 CHAR 17 21ORDL COMP_CODE 3 CHAR 23 25ORDL ORD_LINE_NO 6 NUMBER 27 32ORDL ORD_NO 15 CHAR 34 48ORDL ORD_QTY 9 NUMBER 50 58ORDL SKU 20 CHAR 60 79ORDL SKU_KEY1 10 CHAR 81 90ORDL SKU_KEY2 10 CHAR 92 101ORDL SKU_KEY3 10 CHAR 103 112ORDL BO_FLG 1 CHAR 114 114ORDL CROSSDOCK_FLG 1 CHAR 116 116ORDL CYCLE_CODE 1 CHAR 118 118ORDL HOST_PRIO 2 CHAR 120 121ORDL MIN_SMNTHS_BEFORE_EXPR 3 NUMBER 123 125ORDL PARTIAL_SHIP_FLG 1 CHAR 127 127ORDL PKG_NO 3 NUMBER 129 131ORDL PROD_STAT 2 CHAR 133 134ORDL REQUISITION_NO 10 CHAR 136 145ORDL SPECIFIC_LOT_NO 15 CHAR 147 161ORDL TOT_PRICE 7 NUMBER 163 169ORDL UNIT_PRICE 7 NUMBER 171 177ORDL UOM_ABBREV 2 CHAR 179 180ORDL CNTRL_SUBST_FLG 2 CHAR 182 183ORDL HAZ_MAT_CLASS 7 CHAR 185 191ORDL LAST_SHIP_DATE 8 DATE 193 200ORDL LOT_CNTRL_FLG 1 CHAR 202 202ORDL MAX_CRIT_TEMP 6 NUMBER 204 209ORDL MIN_CRIT_TEMP 6 NUMBER 211 216ORDL ORD_PRIO 2 CHAR 218 219ORDL PROD_CAT 4 CHAR 221 224ORDL PROD_FAM 4 CHAR 226 229ORDL QTY_PICKED 9 NUMBER 231 239ORDL QTY_SHIPPED 9 NUMBER 241 249ORDL SERIAL_NO_FLG 1 CHAR 251 251ORDL WAVE_NO 9 NUMBER 253 261ORDL LIFO_FLG 1 CHAR 263 263ORDL PACK_BY_SKU_FLG 1 CHAR 265 265
ORDL PO_NO 15 CHAR 267 281ORDL ALLOW_VAS 1 CHAR 283 283ORDL ORIG_ORD_LINE_NO 6 NUMBER 285 290
Sample Picket Ticket File
TRNH 7902080801164 FFL I 08082002 16:20 ORD 000001164ORDH I 08082002 16:20 MUL DDLE401 00002 8200056 VR X SHAKTI MOTORS PVT LTD RAJA HOUSE,DABWALI ROAD SIRSA INDA SHAKTI MOTORS PVT LTD HR 125055 01 N DDLE401 NYYYYYY DDLE401 AORDL I 08082002 16:20 MUL 000001 8200056 000000002 58410-80010 3183893 EA 58410-80010 ORDL I 08082002 16:20 MUL 000002 8200056 000000001 72420-80010 3183894 EA 72420-80010 ENDT MUL 7902080801164 000000002 000000001TRLR 7902080801164 000000002 000000001
19.1.3 Order Confirmation
The order confirmation file also follows the same structure of the Pick ticket file, except that the data type is ORDC for order confirmation. Pick Tickets have the data type as ORD. The confirmation details are generated at MARC and are sent to spare parts system. These order confirmations files are of the type ORC and its name start with ORDC and a unique number
19.1.4 Spare Parts database Temp Tables
19.1.4.1 Mspr_ordh (Pick Ticket Header)
Name Null? Type File Field
ORDH_TRNH_TRAN_NO NOT NULL VARCHAR2(13) ORDH_TRNH_DATA_TYPE NOT NULL VARCHAR2(4)
ORDH_ORD_NO NOT NULL VARCHAR2(15)ORDH_RECORD_DATE NOT NULL DATEORDH_CUST_CCAT_ID NOT NULL VARCHAR2(3)ORDH_CUST_ID NOT NULL VARCHAR2(7)ORDH_ORD_TYPE NOT NULL VARCHAR2(2) ORDH_NO_LINE_ITEMS NUMBER(5)ORDH_CARR_ID VARCHAR2(15)ORDH_CARR_TYPE VARCHAR2(3)ORDH_PARTIAL_SHIP_FLAG VARCHAR2(1)ORDH_WAVE_STATUS VARCHAR2(1)ORDH_ERROR_FLAG VARCHAR2(1)ORDH_HOST_REMARKS VARCHAR2(100)ORDH_HOST_UPD_DATE DATEORDH_CREATION_DATE NOT NULL DATEORDH_USER_ID NOT NULL VARCHAR2(30)
19.1.4.2 mspr_ordl ( Pick Ticket Line Item)Name Null? Type Field in email
order file
ORDL_ORDH_TRNH_TRAN_NO NOT NULL VARCHAR2(13)ORDL_ORDH_TRNH_DATA_TYPE NOT NULL VARCHAR2(4)
ORDL_ORDH_ORD_NO NOT NULL VARCHAR2(15) ORDL_SERIAL_NO NOT NULL NUMBER(3) ORDL_RECORD_DATE NOT NULL DATE ORDL_ITEM_CODE NOT NULL VARCHAR2(15) ORDL_ORD_LINE_NO NOT NULL NUMBER(6) ORDL_MUL_ORD_NO NOT NULL VARCHAR2(15) ORDL_ORDERED_ITEM_CODE NOT NULL VARCHAR2(240) ORDL_ORDER_QTY NOT NULL NUMBER(9) ORDL_QTY_PICKED NOT NULL NUMBER(9) ORDL_QTY_SHIPPED NOT NULL NUMBER(9) ORDL_BO_FLAG VARCHAR2(1) ORDL_PARTIAL_SHIP_FLAG VARCHAR2(1) ORDL_PROD_STAT VARCHAR2(2) ORDL_CREATION_DATE NOT NULL DATE ORDL_USER_ID NOT NULL VARCHAR2(30)
19.1.4.3 mspr_cord( Order Header)Name Null? Type Field in email
order file
CORD_CUST_CCAT_ID NOT NULL VARCHAR2(3) VARCHAR2(3) CUSTOMER CATEGORYCORD_CUST_ID NOT NULL VARCHAR2(7) VARCHAR2(7) CUSTOMER IDCORD_CONS_CCAT_ID NOT NULL VARCHAR2(3) VARCHAR2(3) CONSIGNEE CATEGORYCORD_CONS_ID NOT NULL VARCHAR2(7) VARCHAR2(7) CONSIGNEE IDCORD_ORDER_TYPE NOT NULL VARCHAR2(3) VARCHAR2(3) ORDER TYPECORD_REF_NO NOT NULL VARCHAR2(50) VARCHAR2(50) ORDER REFERENCE NOCORD_REF_DATE NOT NULL DATE DATE REFERENCE DATECORD_BATCH_NO NOT NULL NUMBER(7) NUMBER(7)CORD_QTY NOT NULL NUMBER(6) NUMBER(6) TOTAL QTY ORDEREDCORD_ITEMS NOT NULL NUMBER(4) TOTAL NO OF PARTS
ORDEREDCORD_STATUS VARCHAR2(1)CORD_EXPIRY_DATE DATECORD_CORRECTED_DATE DATECORD_CREATION_DATE NOT NULL DATECORD_USER_ID NOT NULL VARCHAR2(30)CORD_LAST_UPD_DATE DATECORD_USER_ID_UPD_BY VARCHAR2(30)CORD_CURRENCY VARCHAR2(4)CORD_TRANS_MODE VARCHAR2(3)CORD_DISC_FACTOR NUMBER(5,2)CORD_DISC_FACTOR_PRINT NUMBER(5,2)CORD_DISC_FACTOR_SMC NUMBER(5,2)CORD_DISC_FACTOR_SMC_PRINT NUMBER(5,2)CORD_SHIP_MARK VARCHAR2(180)CORD_CREDIT_IND VARCHAR2(1)CORD_VALUE NUMBER(10,2)CORD_CATG VARCHAR2(3)
19.1.4.4 mspr_cuod(Order line Item)Name Null? Type Field in email
order file CUOD_BATCH_NO NOT NULL NUMBER(7) CUOD_SL_NO NOT NULL NUMBER(4) CUOD_CUST_PAGE_NO NUMBER(2) CUOD_CUST_SL_NO NUMBER(4) SERIAL NO CUOD_ITEM_CODE NOT NULL VARCHAR2(15) PART NO CUOD_QTY NOT NULL NUMBER(6) QTY CUOD_ERR_IND VARCHAR2(1)
CUOD_REF_SL_NO NUMBER(4) CUOD_USER_ID NOT NULL VARCHAR2(30) CUOD_PART_REPLACED_BY
VARCHAR2(15)
CUOD_RATE NUMBER(8,2)
19.1.5 Error/Status Codes
Error/Status Messages1 Status file Back from Spare Parts to BizTalk ( Order level)2 Status file Back from Marc to BizTalk (Pick ticket level )3 Status file from Spare Parts to BizTalk(Pick Tick level)4 Status file from Spare Parts to BizTalk(Order Level)
Field Required? Size Type1 Message Orderid 15 Text
StatusCode Req IntegerDescription Req 150 Text
Email Ids Opt 250 Text
Separed by ; dealer email Ids will be a part of message
Subject Req 100 TextOrderType Req 2 TextRegionCode Req 25 TextReferenceID Req 15 TextCutomerID ReqCustomer_Cat Req
Type of Message ActionsStatusCode 0 Success Send Email
1001 Cancel Order Stop Order1002 Error Notification Send Email1003 Delay Notification Send Email
1004 Critical ErrorSend Email and Stop Order
2 MessagePickTicketIDStatus Code IntegerDescription 500 TextEmail Ids 150 TextSubject 100 TextOrderTypeRegionCode
Type of Message ActionsStatus Code 0 Success
2001 Cancel Order Stop Order2002 Error Notification Send Email2003 Delay Notification Send Email
3 MessagePickTicketIDStatus Code IntegerDescription 500 TextEmail Ids 150 TextSubject 100 Text
Type of Message ActionsStatus Code 0 Success
3001 Cancel Pick Ticket Stop Order3002 Error Notification Send Email3003 Delay Notification Send Email
4 Message OrderIdStatus Code IntegerDescription 500 TextEmail Ids 150 TextSubject 100 Text
Type of Message ActionsStatus Code 0 Success
3001 Cancel Order Stop Order3002 Error Notification Send Email3003 Delay Notification Send Email
20 Transport Mechanismso Currently the Indents are received thru Email (SMTP)o The orders and order confirmations are sent using FTPo Dealers view the order status using extranet (HTTP/S)
21 Platform Information There are 5 systems in the current scope. The details about platform, database and other tools installed are given below.
Spare Parts: OS : DigitalUnix Database : Oracle 8i
Front end : Oracle forms MARC:
OS : Windows NT Database : Oracle 8i
Front end : Java Email Server: OS : Windows 2000
Mail server : MS Exchange Server 2000 Tools : MailRoboI2DP:
OS : Windows 2000DB : Proprietary
Tools : I2DP
Sales System: OS : DigitalUnix Database : Oracle 8i
Front end : Oracle forms
22 Data volume and performanceThe data transfer happens at three places.
1. Indents from dealers via email Happens at every 15 minutes. File size is: Average number of files: Connectivity type: LAN
2. Pick tickets from spare parts to Marc Happens at every 15 minutes. File size is: Average number of files: Connectivity type: LAN
3. Order confirmation from MARC to spare Parts Happens at every 15 minutes. File size is: Average number of files: Connectivity type: LAN
23 Data Transformation (Mapping)None. Currently no data transformation is required between the applications.
24 TransactionsNone
25 Application ExceptionsThe data has to be validated at various stages. In case of validation failure the administrator has to be notified. The following are places where the validation occurs.
o The spare parts orders received by dealers will be validated by spare parts system. o Pick ticket validation failure at MARCo Order confirmation failure at Spare parts system.o Delay exceptions where ever required
The failure of data delivery between the systems should be notified to the administrator.
26 Acknowledgements And ReceiptsThe system will have to generate the acknowledgements for the successful delivery of the messages between the applications. The acknowledgements should be generated for the following:
o When the Pick tickets are delivered to MARCo When the spare parts receives the order confirmation from MARC.
27 Recommendationso Use standard framework to transfer the data between the different systems.o Use XML files for data transfer between the systems instead of flat fileso Trap the errors and exceptions at the application level.
28 IssuesPlease see the Pending Items (issues) document for details. Most of the issues are resolved except the Delay mechanism.
29 Limitations BizTalk server cannot access the files from UNIX server directly. Custom
component will have to be developed to get the files from UNIX server. BizTalk does not generate any alerts automatically. Custom development is
involved in generating the alerts.
30 Unit Testing GuidelinesThis describes the approach to be followed for unit testing. Order processing should be tested for the following
o Successful loading of the order information to the temporary tables.
o If validation fails then email should be sent for administrator.o Validation of order data and generation of the Pick Ticket.o Transfer the Pick Ticket to MARC server.o If the transfer of Pick Ticket fails, the administrator has to be notified.o Pick up the Feedback from MARC servero Transfer the order feedback to Spare parts servero If the transfer of order feedback fails then the administrator has to be notified.o Upload the feedback details to Spare parts o Overall process flow and exception handling
31 Initialization and Termination The BizTalk process will start whenever the order is received by mail.
The BizTalk process terminates whenever there is a critical failure/exception or after the successful completion of order processing.
32 Revision HistoryDate Version Description Author
26/Sep/2002 1.0 Design Document Prince Manuel
5/Oct/2002 1.1 Design Document Prince Manuel
25/Oct/2002 1.2 Design Document Prince Manuel
15/Nov/2002 1.3 Detailed Design Document Prince Manuel
23/Jan/2003 1.4 Updated Design Document Prince Manuel