converting IS DOC into csv flatfile

can any body suggest me how to convert IS doc to flatfile
how to write the ff schema for creating flat files.( ex. csv) which has to be given as input to the convertToString service

for ex.

IS doc has two fields

No sweat, it is a simple 19 step process (grin):

A) Create and populate a dictionary

  1. create and name a new dictionary
  2. in the new dictionary, select the “Record Definition” line
  3. Click the “new definition” button. (looks like a folder with a motion accent on its upper right)
  4. name the new record, for example: record
    4a) click finish (this should create the new record and highlight it)
  5. Click the “new definition” button again. The popup now shows more options
  6. Select the field definition radio button and click next
    6a) on the next screen change the “Extractor Type” to Nth field
    6b) Click on the “Insert Row” button since you will have two fields (one is there by default)
    6c) name the first field (e.g. ponum), set position to 0.
    6d) name the second field (e.g. potype), set position to 1.
    6e) Click finish
    B) Create and populate a Schema
  7. Create and name a new schema
  8. Select ‘Delimiter’ in the Record Parser section of the editor
    8a) Choose Record Character to be “newline” from the Character dropdown
    8b) Choose Field or Composite Character to be a comma (actually type a , in the field)
  9. In the properties section (upper right side of screen) set “Undefined Data” to True.
  10. Click the “Set” button in the properties - a popup will appear
  11. Navigate to the dictionary you created in section A. Click Next.
  12. Select the record you created in step 4. Click Finish.
  13. Click on the “Create Document Type” button in the main editor window (looks like a wM document)
    13a) This automatically creates a document type in the same folder.
  14. Save your work.
    C) Use your schema in a flow
  15. Create and populate a reference to your document type (from step 13a) in your flow (i did mine as an input to the flow so that i could populate when “running” the service on its own).
  16. In your flow create a pub.flatFile.convertToString step (from the WmFlatFile package)
  17. Map your document type (from step 15) to the Service Input for the convertToString, ffValues field.
  18. in the Service Input for the convertToString, ffSchema field, use the fully qualified schema name (e.g. copy/paste the schema into it)
    D) The results
  19. When run, the CSV file shows up as the convertToString Output named “string”

Don’t skip any steps and i hope this helps!

1 Like