Converting a string list into a document list

Hello evrey body,
i am a new WM developer and i have a problem with a flow that i developet, i am reciving a string list from another flow that i am calling on the current flow and i want to convert that string list into a document list with key value columns.
the reciving string list has only one key, i tried ti use a loop and create conversion my self but i havent had any success.
i allso tryd transformers by i havent had any success using multipol transformers
can you please give me the steps or tell me in what way can i resolve the problem??

thanks

Hello mengesha,

I am not sure if the sample attached provides exactly what you need, but maybe it will get you started. It’s a Java service with the following specs for inputs and outputs as listed below.

It transforms an input StringList into individual elements nested under the outDocument.
This service adds a suffix value, a sequence number, to the itemName nested under the outDocument.

@param inStringList an array of strings
@param itemName the name of the element nested under the outDocument document.
This service will add a sequence number as a suffix to the itemName value.
For example, if the value entered is workOrder, the elements nested inside outDcoument
will be workOrder_1, workOrder_2, workOrder_3,…

@param outDocument a document with the nested itemName values.
SampleList.zip (11.1 KB)

Hi,

Did you tried using inbuilt flow service WmPublic/pub.list:stringListToDocumentList .I guess it will be able to convert string list to document list using the specified key.Please refer documentation.

Regards,
Amol.

1 Like

Hi all,
i downloaded that sample package and repicate and instaleed.when i am trying to run the service it is showing To run this service, first recompile the Java source…how to achieve this…