webMethods step by step EDI to Flat file
Task: EDI to Flat file
OS: WindowsOS Platform: webMethods 6.1 create empty dictionary create flow service. drag the SEFParse service which is in WmPublic.wm.b2b.edi to validate the EDI document we copy the path of 4010.sef file name(D:webMethods61IntegrationServerpackagesWmEDIpubSEFSX124010.sef) into the SEFfilename variable. Fill the EDIDocName with the transaction type of the edi document we use. set the includeEnvelope variable to true specify the version edi document we use(say 4010) specify the schema name along with the folder name in which the schema is to be generated separated by colon in the targetSchema variable specify the targetPackage copy the dictionary which has been created before in the targetDictionary variable Fill the details as mentioned above and run the service. once refresh the page automatically flatfile schema is generated and also dictionary is filled with the segments of EDI document create the schemaDT . Open the schema and click on the tab Flat File Structure, there you click on the document icon which will inturn generate schemaDT for you. create another dictionary. select the field definition.
select the Extractor type as NthField. Give the required fields to be mapped in the document. (Say ISA06, ISA08, ST01)
create a schema(Say schema2)
select the Flat File Definition tab, select the delimiter. Specify the record character as newline. specify the field character as *. select the nth field in the record identifier.
create new flow service. Copy X12ToValues service which is in the package WmEdiSamples.SampleServices. into the new flow service.
For the envelopeProcess provide the input file into the variable edidata and set validate to true.
Expand the branch step, go to getEDIString service map ST document to values
go to convertToValues service drop the EDIstring and map edistring to edidata and copy and paste schema which was generated by SEFParse into the variable EDIFFschema.
copy the schemaDT related to the schema which was generated by SEFParse into the PipeLineOut and map the EDIValues to schemaDT document
insert the map flow step. Map the individual fields of the schemaDT which was generated by SEFParse to the second schemaDT which will contain three segments( ie, ISA06, ISA08, ST01).
Insert ConvertToString service, map the schemaDT(with three segments) to ffValues.
Fill the ffschema with the schema(containing three segments)
specify the destination filename and map string to file content and set overwrite flag to true. Run the flow service.
