Group Max Occurs vs Max Occurs in BizTalk Schema Skip to main content

Group Max Occurs vs Max Occurs in BizTalk Schema


Group Max Occurs: Specifies us the maximum occurrences of a group of fields irrespective of the Group Order Type property value.

Max Occurs: Specifies the maximum number of times that the element or record corresponding node can occur.

Group Order Type: If Group Order Type is "Sequence" then all below child node repeat in same order as defined in xsd file and if Group Order Type is "All" then all child node repeat without in sequence but all child node must be available and if Group Order is "Choice" then all child node is not mandatory in repeating node.

Note: Default value of Group Max Occurs, Max Occurs, Group Min Occurs and Min Occurs is "1" and also Group Min Occurs and Min Occurs is not less than Group Max Occurs and Max Occurs respectively.

Please follow below very simple example to verify your doubt.

1. Firstly see below image and create same schema in your visual studio
2. Now click on Solution Explorer and  Right click same schema that already created from list and Generate Instance and copy yellow records two more time as shown in below picture.
3. Click on child record "AHDetails" and go to property of same record node set Max Occurs as "unbounded" or "*". Now browse same xml file in the Input Instance Filename from the same xsd file property.

4. Click Validate Instance from the list of same xsd file and see the below result as showing in following image.
5. Keep same Input Instance Filename and change "AHDetails" property from Max Occurs to Group Max Occurs as "unbounded" or "*". Now Right click xsd file property and click on Validate Instance then see the below error as showing in below picture because I have change Group Max Occurs as "unbounded"  and Default Group Order Type is "Sequence" so all below child element repeat in same order in same Record name "AHDetails" but my xml file there are multiple time "AhDetails" tags.
6. Do not change "AHDetails" property i.e. Group Max Occurs is "unbounded" and browse another xml file in Input Instance Filename as showing in following picture i.e. there is yellow Record node "AHDetails" is one time but multiple time repeat there child element.
7. Again go to solution explorer list and right click on same xsd file property then click Validate Instance and see the below following successfully validated result.
8. See the below another xml file, there are multiple record node "AHDetails" and also Name elements
9. To Validate Instance of above xml file, Click "AHDetails" node then go to their property and set Max Occurs value as "unbounded" and also same "unbounded" value for "Name" element as showing in below picture and finally click Validate Instance from same xsd file property then see the following successfully result.
10. Create one more xml file as showing below picture
11. In above image there is only one "AHDetails" record note but multiple "Name" element so Validate Instance as successfully, Please set value as "unbounded" of "AHDetails" Group Max Occurs and same "Name" element property.
Please follow in same way for Group Min Occurs and Min Occurs.

                     Click to download BizTalk application and same test xml files

!! Keep visiting BizTalkLive !!

Comments

Post a Comment

Please write comment only that belongs to this blog

Popular posts from this blog

BizTalk Interview Question and Answer

1. What is BizTalk? BizTalk is a middleware that sits in the middle of any two software who wish to communicate with each other and agree on some specified communication pattern. It uses SQL Server as back end database. “Microsoft BizTalk Server is an Inter-Organizational Middleware System (IOMS) that enables companies to automate business processes, through the use of adapters which are tailored to communicate with different software systems used in an enterprise. Created by Microsoft, it provides enterprise application integration, business process automation, business-to-business communication, message broker and business activity monitoring.”                 2. What is BizTalk Server Architecture and Life Cycle of Message? BizTalk Server Architecture: Life Cycle of Message: In this simplified view, a message is received through a receive location defined...

Configuring BizTalk WCF Timeout Values on a Binding

There are a number of timeout settings available in WCF bindings. Setting these timeout settings correctly can improve not only your service’s performance but also play a role in the usability and security of your service. The following timeouts are available on WCF bindings: OpenTimeout CloseTimeout SendTimeout ReceiveTimeout Open Timeout :  This property represents the amount of time a channel open operation has to complete. Send Timeout :  Use this property to set the amount of time that a send operation has to complete. When used as part of a solicit-response scenario, this value encompasses the total amount of time for the interaction to complete. If we are sending a large message, we may need to increase this timeout to allow for the request and response messages to be processed within this window. Close Timeout :  A time-stamp that is used to indicate the amount Receive Timeout :  Used by the Service Framework Layer to initialize the...

PowerShell Script to enable BizTalk Receive Location

We are facing problem in BizTalk server 2016 that few of running SFTP Receive location would be stopped after some time due to sftp connectivity issue of their threshold so I am going to share PowerShell script to enable receive location by window task scheduler. Before execute following script Please do following task a. Set Server name in ConnectionString b. Set ( $hostname) host name value that is using in SFTP Receive location c. Set ( $rcvLocation) Receive location name # Import external assembly and create a new object [ void ] [ System.reflection.Assembly ]:: LoadWithPartialName( "Microsoft.BizTalk.ExplorerOM" ) $Catalog = New-Object Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer   #BizTalk Config $Catalog . ConnectionString = "SERVER=.;DATABASE=BizTalkMgmtDb;Integrated Security=SSPI"   #connectionstring for the BizTalkMgmtDb $hostname = "BizTalkServerApplication" #hostname $rcvLocation = "RL_GetAccReq_SQL...

Publish a web service in biztalk using BizTalk WCF Service Publishing Wizard

Welcome you again in my Blog and let us do another mind blowing achievement that how to publish a WCF web service in BizTalk and as in previous post to Complete BizTalk project to host Schema as Web Service  so If you want to expose/publish a web service, you should run through the BizTalk WCF Service Publishing Wizard. This wizard guides you through choosing what you want to expose as a web service. This section walks you through the wizard step by step to publish WCF Web Service using  WCF-WSHttp- Step-1:  To start the wizard, go to Start, All Programs, Microsoft BizTalk Server 2016(version), BizTalk WCF Service Publishing Wizard. This fires up a welcoming screen, on which you just click Next. Consider disabling the welcoming screen for the future by checking the check box at the bottom. You will now see the screen shown in above figure. Step-2: Choose the Service Endpoint option, and choose which adapter to use. Check Enable Metadata Endpoint if you wa...

Step by step solution of BizTalk Two-Way WCF-SQL XmlPolling in Send Port

I am going to share most awaited Two way WCF_SQL Two Way XmlPolling so that you can easily enhance your old SQL procedure and BizTalk Map without any big change. I know there is no content available in any website to how work with XmlPolling in WCF-SQL two-way adapter. In the last of this post you can download complete source code with an example. Please follow carefully all steps – 1. Open Microsoft Visual Studio as Administrator user and Click File>New>Project… In Installed Templates click BizTalk Projects then Empty BizTalk Server Project and Name as “BizTalkLive-WCF-SQL” and click OK. 2. Now see the below picture and create all respective folders separately for Schema, Map, Orchestration, Pipeline, Binding- 3. Create Schemas in Schema folder as shown below picture to get Account request using One Way WCF-SQL XmlPolling a) Create Envelope Schema first with Target NameSpace - http://BizTalkLive_WCF_SQL.AccountRequest b) Create Second Sch...