Conversion Object to DocumentList

How does one convert an object into a documentlist?
The object has been created from a documentlist and now needs to be converted back into a documentlist. Is there some inbuilt service for the same? If not then what can be the alternative for it?

How was the object “converted” from a documentlist to begin with?


The document list was directly mapped to the object. The object was thus created and it got the values of the documentlist. Mappinig the object back into the documentlist doesnot seem to be working. Is there some other solution?

Does anything else affect the object in between the original mapping into the object and the desired mapping out of it?

I have a resultSet documentList from an adapter service that is directly mapped to an object in the pipeline, and then several lines down, I map it back to a new documentList and it works just fine. I would suspect something must be affecting the object upstream if it cannot map back out.

There’s nothing affecting the object. It is not used once it has been created. The object is created from a documentlist, and then published in a document. This document is subscribed by another service. It is in this service that the object needs to be converted back into a documentlist. Simply mapping it back into a documentlist doesnot seem to be working out.

Why are you converting a document list into an object again???

Why not just publish the documentList?

I just tried this to see if there was something the Broker may do to it that causes a loss of structure, but it worked just fine. Here’s what I did:

  1. Created a publishable document containing an object.
  2. Created a flow service that mapped a documentList to the object in the publishable document and then published the document to the Broker.
  3. Created a handling service that mapped the object from the document to a documentList, looped through the list, and wrote results to the server log.
  4. Created a trigger subscribing to the document, and calling the handling service.
  5. Finally… ran the mapping/publishing service and watched as the handling service received the object and mapped it to a docList with no problems.

So this should work.

The only way I could get it to fail was to map the object to a documentList of a slightly different structure that the original docList.

Are both docList structures (on the publish side and the subscribe side) exactly the same?

It finally worked! Thanks alot for your suggestion.