Join wMUsers | Blog at wMUsers | Edit my wMUsers Profile | Site Map | webMethods Jobs |For Employers

wMUsers  
  #1  
Old 02-04-2010, 02:51
roberto.simoni roberto.simoni is offline
Junior Member
 
Join Date: Feb 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Flow, Document List to Document transformations...

Hi to all.
I'm trying to read a flat file and do some document transformation.
I'm reading the file supposing i'm goind to handle large files.
The problem is, when i have my raw document (from flat file) i try to
convert in a more convenient document where for example i "transform"
two fields (a date part and a time part) in a date field of java type set
as date.
To do this, i have trouble with document list and document transformations.
I have this steps:

== parseFile ===================================

pub.file:getFile
REPEAT
pub.flatFile:convertToValues
pub.flow:tracePipeline (*)
MyPackage.myFlow:transformRowToItem
pub.flow:tracePipeline (**)


== transformRowToItem ==========================

input .....: rawDocument
recordWithNoID(List)
ddate: String
dhour: String
output ....: itemDocument
thedate: Object[java.util.Date])

LOOP over '/row/recordWithNoID'
MAP (here handle transformation and map results to the output item)


What I would like to obtain is to have a unique itemDocument in the
pipeline at point (**) with a wonderful thedate field as java.util.Date

Instead, if I go in "trace here" mode till "transformRowToItem" all run
correctly. If I run all "parseFile" flow an error occur saying
"Dimension mismatch, List expected".

I'm using webmethods 6.5
I have tried some forum suggestions without success. I have tried to
use documentListToDocument but I don't know how to use it... absolutely
stacked.

Thanks in advance for any help.
Reply With Quote
Advertisement
  #2  
Old 02-04-2010, 03:19
roberto.simoni roberto.simoni is offline
Junior Member
 
Join Date: Feb 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default The answer...

Found the answer. The problem is the raw document type created
automatically from the flat file schema. That doc type has a recordWithNoID
set as DocumentList, but when you read file record by record in a REPEAT
step
it is more better to drop that document type and create a new one
with recordWithNoID set up as Document.
Mapping ffValues of convertToValues to the new document type give a
unique raw document (as expected) and after that, you can add simply a
MAP step with transformations (so the LOOP step can be removed).
This is more readable and run correctly.
Hoping this could help someone else.
Bye
Reply With Quote
Reply

Bookmarks

Tags
document, document list, loops, transformations


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Null elements in output array when mapping EDI to output FF schema duffymo webMethods EDI 57 09-17-2009 13:44
pub.publish:publish waits for top-level service mystiqu Flow and Java services 0 09-16-2009 02:24
flow creates document list to be looped over 500chill Flow and Java services 1 07-03-2009 02:32
how to dynamically add values to a Document List Sayli.Consultant Flow and Java services 4 08-21-2008 09:34
Creating document list in DSP and passing to flow service JP50 Flow and Java services 1 07-02-2007 02:44


All times are GMT -6. The time now is 00:15.


.
All Content Copyright ©2002-2009, Conneva, Inc. DBA wMUsers.Com

wMUsers is an independent organization and is not sponsored in any manner by Software AG or webMethods, Inc.

Page generated in 0.07121 seconds with 16 queries