XML debatch in pipeline
Last month I had a post were described how to debatch XML message in orchestration
How I wrote it is not the best solution , in case if you will have hundreds of records the debatching using XPath will consume too much memory and processor.
In this post I am going to show how to debatch using pipeline.
The sample will fetch multiple records from MS SQL database and after debatching put them to folder.
How to create simple WCF-SQL ports and SQL polling you can read in my old post
I will use the same procedure and table to generate Schemas and PortTypes
In generated schema change envelop type to yes
Next click on TypePolling which is the root for schema
In properties find Body XPath
and edit it as in picture is
In properties find Body XPath
and edit it as in picture is
Then change the last node to have Max Occurs = 1
Now we should remove hidden stones :-)
When you added adapter metadata from wizard to your project
PortType was generated, DO NOT use it while creating logical receive port in orchestration.
PortType was generated, DO NOT use it while creating logical receive port in orchestration.
DO NOT Use multipart message type while creating Message
your mesage now has simple structure
your mesage now has simple structure
Thats all
now in output folder you should have many files where each will contain a single record from SQL
now in output folder you should have many files where each will contain a single record from SQL
Comments
I'm using TypedPolling to get my schema and data from db. I changed the Schema to Envelope=Yes, updated the Body XPath, and set leaf node to Max Occurence = 1. Created a File Send port to consume the receive port (no orchestration) but I'm still getting a single file in output folder.
What am I missing? Thanks!
It should be Ok
leave me your email, I will send a solution MSI file, where you can check it. (next week)
Is this possible (debatch using pipeline) with the schemas created by the Select operation in the Consume Adapter Service wizard?
Thanks,
Gilson
Is it possible to debatch in the pipeline using the schemas generated by the Select method of the Consume Adapter Service wizard?
Regards,
Gilson
Sure , if your schema is Taken from WCF-SQL adapter you can debatch in the same way.
Changing that values will not break your XSD
Thanks for your post..
Remove hidden stones section help to solve my problem
thanks again.....
Regards,
Nilesh
Thanks
sure you can do it in the same way as described latter
Check pooling interval,
also check that you mark that records as retrieved so next time SP will skip records.
run SQL profiler to understand what's going on
Thanks for the details I am now debatching my messages on the pipeline ;)
Much Appreciation,
OldBeno
Thanks for the details I am now debatching my messages on the pipeline ;)
Much Appreciation,
OldBeno