| Join wMUsers | Blog at wMUsers | User Control Panel | Site Map | webMethods Jobs |For Employers |
![]() |
![]() |
IntroductionI’d like to welcome everyone back to the webMethods Ezine. This article highlights an actual development challenge and solution using the Integration Server 4.6 repository store. The names and processes were changed to protect the innocent (and to keep my job). However, this article represents a real, Production-deployed webMethods solution. The Use Case DescriptionA client requested the ability to drop a large batch file containing XML documents into a local file server directory. The Integration Server must poll that directory at scheduled intervals and, if a document is found, begin processing it. Normally, a developer works with only one inbound XML document at a time. For this client, though, the large batch file would contain between 1500 and 2500 sub-documents -- each an XML document itself. The basic requirements:
A sample acknowledgement message follows: File Name: AM_ST_999_20020805T135107286 (AM = Ack Msg; ST = Statement) File Name: AM_ST_999_20020805T135107286 File Count: 218 Actual File: Count: 218 Valid File Count: 217 Invalid File Count: 1 Files Sent To Exchange: 217 ************************************* FILE ERROR COUNT: 1 ---------- File Name: ST_999_20020805T135107286-146_20020805T135532517 Number of errors in file: 7 StatementID: 569635 Error # 1: /StatementHeader/StatementType VV-001 [B2BCORE.0082.9025] Missing Object Error # 2: /StatementHeader/PurposeCoded VV-001 [B2BCORE.0082.9025] Missing Object Error # 3: /StatementHeader/StatementtYpe VV-002 [B2BCORE.0082.9026] Undefined Object found Error # 4: /StatementHeader/PurposecOded VV-002 [B2BCORE.0082.9026] Undefined Object found Error # 5: /StatementDetail/DeliveryIdentification/BuyerLineItemNumber VV-001 [B2BCORE.0082.9025] Missing Object Error # 6: /StatementDetail/DeliveryIdentification/ContractRate VV-002 [B2BCORE.0082.9026] Undefined Object found Error # 7: /StatementSummary/TotalNetWeight VV-002 [B2BCORE.0082.9026] Undefined Object found Tackling the Use CaseAt first, this may seem like a simple task. Once the Integration Server processes are defined, however, the seemingly easy task becomes difficult. The three main processes are as follows:
To manage the information required for the Acknowledgement Message, an IData record (ProcessRecord) was created: IData Record: ProcessRecord -- String: Original Batch XML Document Name -- String: Start Time (ISO-8601 Format) -- String: End Time (ISO-8601 Format) -- String: Stated Sub-Document Count -- String: Actual Sub-Documents Count -- String: Number of Valid Sub-Documents -- String: Number of Invalid Sub-Documents -- String: Total Sub-Documents Sent to Exchange via HTTP -- RecordList: Specific Sub-Document Errors -- String: StatementID -- String: Sub-Document name -- RecordList: ActualErrorRecordList -- String: ErrorCode -- String: ErrorMsg -- String: Path Note that the RecordList ActualErrorRecordList is a copy of the error array provided by the pub.record:validation service. Go Deeper on the Subject: The wMUsers Discussion Forums Ray Moser is a a Principal Consultant with Zettaworks LLC, Houston, Texas and is working in Sydney, Australia on various webMethods projects. He has over 10 years experience in application architecture and development. He has architected and built several successful integration projects using the webMethods Integration server, Trading Networks and Enterprise Broker.
Ray can be reached at |
| © All Rights Reserved, 2001-2008. |