Last month I had a post were described how to debatch XML message in orchestration using XPath. http://biztalk.kirakosyan.com/2010/02/debatching-records-from-wcf-sql-using.html 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 http://biztalk.kirakosyan.com/2010/02/how-to-pull-database-using-wcf-sql.html 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 Then change the last node to have Max Occurs = 1 Now we should remove hidden stones :-) When you
1. Create database and tables 2. Create stored procedure 3. Create BizTalk project 4. Create orchestration 5. Consume WCF-SQL 6. Write received data to file share First create TESTWCFSQL database from you SQL Management studio Run the script to create table: USE TESTWCFSQL GO IF OBJECT_ID('dbo.MainData', 'U') IS NOT NULL DROP TABLE dbo.MainData GO CREATE TABLE dbo.MainData ( MainDataID int primary key identity(1,1), FirstName nvarchar(30), LastName nvarchar(30), Amount int ) GO Run script in SQL management studio to create procedure IF EXISTS ( SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE SPECIFIC_SCHEMA = N'dbo' AND SPECIFIC_NAME = N'PollData' ) DROP PROCEDURE dbo.PollData GO CREATE PROCEDURE dbo.PollData AS select MainDataID, FirstName, LastName, Amount from dbo.MainData delete from dbo.MainData GO insert some sample lines executing use TESTWCFSQL insert into MainData (FirstName, LastName, Amo
I am investing more and more time and efforts into building Azure Functions and using serverless instead of WebApps. Greater stability and balancing makes it my first choice when need high quality API. Being big fun of automated testing, faced some issues when coding tests and could not find any useful/working examples. Sources can be found here Some steps here Create function with HTTP trigger using template, dont need anything fancy there. Base it on .Net Core 3.1, you can change it, but then check the path in Test project Create MS Test project Folder structure Project structure Important step, install Azure Function tools from command line, just run npm i -g azure-functions-core-tools after that you can test if it is available from command line The idea is to start functions engine from test project. In local environment you can start it from your command line using Func utility, same can be done from Test project. From command line it will look like this F
Comments