I have my own defined schema for parsing the flatfile and I am able to receive the data in TN and this document is appearing in the TN with corrosponding matching document type and processing rule but there is no data and byte-length is 0 bytes.
I am using wM 6.0 and my flat file is comma seperated.
I do appreciate your replies in advance
Be sure that the HTTP POST has the proper variable name assignments. It sounds like the FORM is successfully posting via HTTP, but is not carrying the proper name-vale pairs.
As a debug step, set pub.flow:savePipeline as the first step of your Flow. After running your test, manually execute pub.flow:restrorePipeline using CTRL-R. From the Results tab, you will gain access to the pipeline variables passed to your Flow.
To recap: Review the HTML and confirm your pipeline cariables at Flow invocation.
This also can be a TN problem. I have encountered similar case when sending custom data of say Word document when I actually constructed bizdoc and set up document type and sender reciever was correct I also created Content parts array element with data in it in TN I see the document type recognized and processing rule started too but there is no data showing in Content? If I constructed document with plain text data or string or XML same document does persist the content and I can see it. It is stored in BizDOc ContentParts array/list. I have not yet figured out if its a bug in TN or I am missing something. I recall spending some time o this problem. In your case you have flat file and if you parse it using EDI adapter custom template than your data will be in form of XML record and not flat data in TN.
Thanx a bunch Igor and Dan…Let me try it out and let u know.
I am new to webmethods 4.6. I need ur help urgently…!
How to read a a flat file and store them in a record array. (Plz help me how to create a record array).
I would appreciate your help.
You need to create a flat file schema first.
You can then create a flow service that will use the following convertToValues service found wmPublic. I found the flat file documentation provided with Developer quite usefull in getting this setup.
Hope this helps.
Sorry… I hit the wrong button…
convertToValues service found in wmPublic will allow you to take your flat file in.
The ISFlatFileSchemaGuide should help you with setting up a schema. I found this PDF document under the webMethods6\Broker\Developper\plugins\FlatFilePlugin\Doc folder on my IS server.
You may also want to look at the ISFlatfileSchemaGuide.pdf and the flat file samples provided in Developper.
Please go thru the ISSchema guide located in packages/WmFlatFileSamples/doc or pub/doc folder.It will be helpful for starters.
If you are using 4.6 as you mentioned, you won’t have the flat file schema functionality as described above.
If this is the case, use the getFile service and then tokenize the string (is it a comma delimited or tab delimited file for example) - which is breaking it up separating it by carriage returns and then by tabs or commas. Or you can write some java code to read a line at a time and then tokenize it. Prior to v6.0 this is not a fun exper
And as I’ve said many times - please read the wonderful docs thoroughly.
Oops,If you using IS4.6,please follow the will Kriski steps/suggestions.
I was fast and responded with out observing your IS version mentioned in your post.
Thank you for your help. Thanks Will…i did what u said and I could get the data from the flat file into record. Actually, I i used getFile service, then tokenized and then converted those to StringTable and then used tableToRecordList…I took the help of wmSamples…Flatfile parsing…
Thank you all…
i have records like this in which…20(indicates record type) is the main record and 30-80 are the subrecords. I need to read line and place these values into record(record list)…Can any one could help me please.
I can break these lines into:
and loop …but i am not getting the logic…so please help me…
I would appreciate your help…Thank you
Other way around is to use the capabilities of wmEDI module to do the flat file parsing if you are using wm 4.6 Integration Server. You can define custom input formats and output formats and handle hierarchy flat file structures easily with EDI module.
Please respond !!! Urgent help required !!!
I have a flat file with records of form
and so on …
where 20 represents the main record and 30 represents its sub records. Here first one(Name1) has 2 sub records(Laredo,Portjefferson). 2nd one(Name3) has one sub record(city1). And it goeson as such.
What i need to do is to read the flat file and store these records in a record list as main records and subrecords. Plz help me out, how to do this task.
I would appreciate your help…
What is the version of Integration Server that you are using? As I understand, it is 4.6. You need to use WmEDI package. There is a service called as convertToValues. This service needs to be provided with the data and a template, which will be able to understand that data. If you look at documentation provided with WmEDI package, and WmEDISample Package it will help you to write a FlatFile Template (which looking at file structure that you have, seems to be easy to create based on similar samples that have been provided in WmEDISamples), and process data.
Find the documentation and examples for the webMethods Flat File adapter that ships with 6.x. Read the docs and work through the examples. This should get you most of the way there. Then post any more specific questions you have here.
If you haven’t worked with the webMethods Integration Server before, I suggest working through the tutorials to gain a basic familiarity with the product. That will serve you well before you tackle parsing an EDI document and attempting to do something useful with it.
I created on flatfile schema for a flat file. I succeeded in the test case. Can anyone explain me how to validate a flatfile upon the schema. I mean how can i utilize the service convertToValues?
I need your urgent help.
Yes, you need to use the converToValues service from the flatFile package.
This service has a input parameter called validate. Setting this parameter as true, the flatfile passed as parameter (ffData) will be validated against the schema (another input parameter - ffSchema). It´s interesting to set the parameter returnErrors as asArray. It will make easier to you to treat an error within a try/catch implementation (my point of view) if they occur.
You are asking for two things:
- How to validate flat file using a FF schema.
- How to utilize the service convertToValues.
Answer to #1:
Use the service: pub.schema:validate. Pass in the Document as the object. In the conformsTo input, put in the fully qualified name space name for the document. You can set maxErrors to -1 to get all the errors back. Probably want to set failIfInvalid to false so you can trap and handle yourself in your code.
Answer to #2:
The guide displays this info, but here’s a quick explanation: I assume you are using pub.flatfile:convertToValues. If so, then pass in the string containing the flat file data into the input field ffData. In the ffSchema input field, put in the fully qualified name space name for the flat file schema. The rest are optional. It will convert your file to the ffValues record which should contain an xml version of your flat file. I say this in that you should be able to pick out various pieces of data according to your ffSchema/ffDictionary setup. Also, it will output an errors array which should help out a bit.
Thanks for your nice help for validation of flatfile. can u give me the idea about how to access the Idata objects from the service convertTovalues. Now i am trying to take some operations on those field values.
Something that really confused me about flat file schemas was the requirement to name the root node of your record definition the same thing as the record ID of the flat file record you are working with.
For those of us new to EDI, this isn’t intuitive. In EDI scenarios (and other similar standards), records in a flat file are parsed differently based on the first few characters of the record (called a record ID). By naming the root node of your record definition by this record ID you tell the flat file schema how to parse each record in your flat file.
Some flat files only contain one type of record. These file often do not have a record ID. There are also times when you are using a flat file schema to process a single text string such as when you are reading or writing messages to MQ Series queues. In these cases you have to name the root note of your flat file schemas record definition with the string “recordWithNoID”.
The screen shot below shows a flat file schema which was designed to parse a 121-character string with fields in fixed positions. The record type in this example does not require a recordID so the “recordWithNoID” string is used.
The next screen shot shows the call to the pub.flatFile:convertToString service which is used in this case to create a 121-character string from a document type that contains the data fields. In this example, I only needed to create a single string to be sent as a message to a Websphere MQ queue. By using a documentList as input and setting the Max Repeat attribute of my record definition to unlimited, I could have created a sting containing multiple records to be written to a file.
In general, I haven’t found the docs for the flat file package or the “Flat File Development Guide” to be as useful as I would like. I also think the Developer UI for creating and maintaining flat file dictionaries and flat file schemas needs some work to make it more intuitive. That being said, if you work at it long enough, it eventually makes sense and does what you’d expect it to do.