Google
 

Monday, October 29, 2007

Resuming Rules from the Point of Failure

Normally in a day today life the Business Rules in BizTalk might fail because of the Exception raised by SQL Connection Unavailable or a Permissioning Issue or Rules might have not deployed properly. In these scenarios the messages are terminated generally. Instead of terminating the messages, the messages can be resumed after handling the exception raised by the Business Rules Engine (BRE). This article will deal with this in detail.

The Rules can be retried with the help of the default mechanism provided by BizTalk instead of working with a custom logic. In order to work with such a mechanism, the rules need to be called from an Atomic shape with the property ‘Retry = True’.

We are all aware that an Atomic Scope cannot have an exception handling, in order to capture the exception, we need to have a Scope with the ‘Transaction Property =None’. The Outer Scope will be an Atomic Scope and there will be a inner Scope (Transaction type - None) from where the rules will be called. We can add an Exception Handling block to the existing ‘None Scope’, where the exception object of type ‘Microsoft.RuleEngine.RuleEngineException’ should be used to capture the Exception.

After once we track the exception, we can work with the default retry logic, by throwing the exception with the help of the “Throw Exception Shape”. While Throwing the Exception we need to throw it as a “RetryTransactionException'” which can be inherited from the XLANG base class of type ‘Microsoft.XLANGs.BaseTypes.RetryTransactionException'.

Limitation: -
When the ‘Retry Exception’ is raised then BizTalk continuously retries for 21 times, and after retrying for 21 times then it suspends the message. The count 21 cannot be reduced but where as the retry interval can be programmatically controlled.

Programmatically Controlling the Retry interval: -

Just before the ‘Throw Exception’ Shape in the Catch Block, the retry interval can be specified with the help of the Expression Editor.

E.g: -
//Create a retry exception, and set the Delayfor to 1 sec.
retryException = new Microsoft.XLANGs.BaseTypes.RetryTransactionException();
retryException.DelayFor = new System.TimeSpan(0,0,1);


Note

The atomic scopes cannot have any transactional scopes.
Here in this sample we are specifically working with the Rule Engine Exception (we can even work with the “General Exception” as well), and then rethrows a RetryTransactionException whose DelayFor property is one second.

An atomic transaction retries when the user deliberately throws a RetryTransactionException at the time that the atomic transaction tries to commit. If this happens for an atomic scope that has Retry=True, then it will retry up to 21 times. The delay between each retry is two seconds by default. The sample orchestration overrides the default value and specifies a one-second delay by using the DelayFor property. After 21 retries, if the transaction is still unable to commit, the whole orchestration instance is suspended. It can be manually resumed, in which case it starts over again, with a fresh counter, from the beginning of the offending atomic scope.

The Same logic can be used to retry Rules with both BizTalk 2004 and 2006

You can download this sample from:

Thursday, October 25, 2007

BizTalk 2006 Features and Enhancements

Adapters. Most of these were available as add-ons, but now they’ve been enhanced and are included with BizTalk Server.

POP3


  • Ability to receive messages (or stuff) via emails and attachments from a mailbox.

SharePoint


  • Send and receive documents stored on SharePoint

MSMQ


  • Send and receive messages via a standard MSMQ queue. We use MSMQ today, but only for the API – the messages we send still go to a MSMQt queue (which is just the BizTalk MessageBox). This actually integrates with a true MSMQ queue.

SMTP


  • Updated for sending of plain text or HTML emails with multiple attachments

File


  • Updated a few features such as specifying credentials (instead of relying on the host instance account… but that account can also be used).
  • Now able to specify a polling period (instead of “as fast as you can.. go BizTalk go!” J)

Operational Management/Administration

Logical Applications


  • New feature provides ability to create a logical grouping (an “application”) to house related artifacts such as orchestrations, schemas, maps, pipelines, ports, and locations. As compared to 2004 (and even worse before that) where all these are in one big jumble that gets hard to manage when multiple applications are deployed.

Administration Console


  • Contains runtime message and service monitoring features provided by HAT. Still must use HAT for tracking and orchestration debugging though.

Application Views


  • Shows information by application grouped by artifact type. Similar to 2004 MMC, but only shows artifacts in the selected application instead of all of them.
  • An “all artifacts” view, similar to BizTalk Explorer in Visual Studio

Operations Page (Group Hub). View showing overall status of group.


  • Indicators showing green, yellow, or red (instance went from running to stopped for example).
  • Shows work items in progress, number of suspended instances, suspended messages, etc.

Group by Application


  • HAT runtime monitoring features in the MMC to query on a logical application

Application Management


  • Ability to manage the entire logical application as a set rather than separate artifacts. For instance, a single click can start all artifacts in the application in the correct order (where dependencies are important, but not always known by a sysadmin).
  • Can stop, start, configure, import, export, and other operations on an application.

Application Import/Export


  • Instead of exporting simply a bindings file, 2006 can build a completely self-contained MSI file containing all binaries and configuration information to recreate the entire application on another system.

Development

Deployment


  • Can build and deploy all BizTalk projects in Visual Studio solution (in correct order) rather than just one at a time.
  • Can specify which logical application to deploy all binaries and configuration to

Flat File Schema Wizard


  • Was previously a highly manual process creating a schema and specifying flat file delimiting (or positional) attributes to each element
  • Has designer to create flat file specific attributes
  • Can start with flat file instance as a base for creating a schema, and the wizard creates XSD which can then be modified with flat file designer tool
  • Works much like DTS Import

Orchestration Designer


  • Zoom Support
  • Preserves collapsed and expanded shapes upon close and reopen of orchestration
  • Expression dialog is bigger (although still fixed size)

Runtime

Failed Message Routing


  • “Generate error report on failed messages” – new checkbox on receive port. When checked, instead of a message getting suspended on failure they get sent back to the message box with new special error handling promoted properties set
  • End point filters can be created on an orchestration (or send port) that subscribe to failed messages
  • When used appropriately, failed message routing can be used to notify users of failed messages, building rich error handling, or message repairing.

Message Resume


  • More support for resuming a stopped or suspended message

Large Message Transformation


  • Improved so that large messages can be transformed more efficiently using disk instead of utilizing tons of memory and resources.
  • Both in-memory and disk methods available
  • Registry entry providing message size threshold


BizTalk Setup

Installation


  • Prerequisites now included with BizTalk, so setup is much easier and quicker than in 2004
  • Has two setup types – a flexible advanced installation experience for sysadmins and a simple installation experience for developers/single-machine users/first-time users.

Upgrade


  • Has smooth upgrade from 2004 capabilities


Preparation Guide for MCTS: BizTalk Server 2006 Certification (70-235)

Preparation Guide for Exam 70-235 :-
A Microsoft Certified Technology Specialist in Microsoft BizTalk Server 2006 (MCTS: BizTalk Server 70-235) has a deep and broad understanding of the design and development of distributed applications that use BizTalk Server 2006. The credential holder has also demonstrated expertise in deploying and managing a BizTalk Server 2006 solution and can create a BizTalk orchestration, integrate business rules and human workflow services, manage business processes, troubleshoot BizTalk solutions, and consume and publish Web services.

The MCTS: BizTalk Server 2006 (70-235) credential is part of the new generation of Microsoft certifications, which enables professionals to target specific technologies and to distinguish themselves by demonstrating in-depth knowledge and expertise in their specialized technologies.
BizTalk Server 2006 Exam (70-235) Preparation Diary :-

BizTalk Server 2006 Exam (70-235) Preparation Diary by Saravana Kumar. is a very good Blog which will help the deleloper's in preapring for the Certification.

http://www.biztalk247.com/v1/articles/exam70235.aspx

For those who are sitting the exam, there are 50 questions and you get a little over 2 hours.I used MSDN ,blogs and tutorials & my own experiences to study.

About 10 question each on BRE and BAM. So BRE and BAM are important parts of the exam.
Rests of the question were not that difficult; if you have worked on BizTalk 2004/2006 then you can certainly take a chance.

But now there are lots of questions which are either multiple choice or “Drag and Drop and arrange in sequence” type.

Things to focus on:
BAM
Business rules engine
Persistance points
Deployment
Orchestrations


Skills measured by Exam 70-235:-

Planning a BizTalk Application

Identify the application requirements
Plan the BizTalk Server environment for reliability and scalability
Design schemas
Identify the security requirements
Install BizTalk Server 2006 for a development environment
Developing and Debugging an Integration Application

Create a schema
Create a map
Create a pipeline
Configure connectivity
Configure message subscriptions
Track a message
Developing and Debugging a Business Process Application

Create and debug an orchestration
Configure correlation
Identify persistence points
Configure exception handling
Create business transactions
Consume and publish Web service
Create and configure role links
Implementing Business Rules

Compose business rules
Publish and deploy business rules
Enabling Business Activity Monitoring

Identify the steps required to enable business activity monitoring
Link the event source to the activity definition
Deploying a BizTalk Application

Choose a deployment method for distributing an application
Create a deployment package
Start an application
Test the deployment

Mock Exams for 70-235:-


www.4shared.com/file/27417874/ab61ebff/70-235_Mock_Exams.html

http://www.measureup.com/catalog/product.aspx?vid=5&cid=MCTS&tid=91&pid=1908

Biztalk 70-235 Dumps :-

There are a couple of sites in Internet which gives you BizTalk 70-235 Dumps For Free Download, but reading a dump may just help you in clearing the Exam. It will not help you in long Term.

For more details on 70-235 :-

http://www.microsoft.com/learning/exams/70-235.mspx

Best Of Luck!