Tuesday 5 July 2016

Message Routing In BizTalk | Intro BizTalk Admin Console | Basic Concepts - Part 3


In this article, I would give a walk-through of BizTalk Administrator Console and Routing Messages in BizTalk. 

BizTalk Administration Console: 
In order to help make administration and operation more efficient, a number of enhancements have been built into BizTalk Server 2013 R2. 

The BizTalk Administration Console includes two pieces of key functionality: the Group Hub page and Application Views. The Group Hub page exposes information for a single BizTalk Server, providing a view into the health of the server and allowing for troubleshooting and triage of issues. 

To open the BizTalk Server Administration Console, 
  • Click Start, click Programs, click Microsoft BizTalk Server 2013 R2, and then click BizTalk Server Administration.
  • Click Start; click Run, type BTSmmcLauncher.exe, and then click OK. 

The Application Views expose information for a single BizTalk Server application. An application is a logical grouping of BizTalk artifacts. By grouping artifacts, applications allow them to be managed as a single unit as opposed to individual items. Applications can be started and stopped, which starts and stops all the underlying artifacts, such as orchestrations, receive locations, and send ports. 

Group Hub page provides the following: 
  • Queries for work in progress and suspended items (service instances and messages). 
  • The ability to perform bulk operations (terminate, suspend, or resume) on service instances. 
  • The ability to build and save custom queries to return information on service instances and messages 
Double-click on suspended resumable instances, this would open up a new query window suspended instance that are resumable, to investigate on particular message double click the message instance and navigate 
between the tabs, as shown.

On analysis Admin can either resume or terminate the message instance. 

Tracking Messages

You want to be able to view the contents of messages that have arrived in a given BizTalk solution, to monitor messages and actions that have been processed through ports and orchestrations.The ability to monitor orchestration activity and access message contents and flow is known as tracking messages. You can configure tracking using the BizTalk Administration Console. 

Choose the BizTalk application and then navigate to Receive/Send ports or Orchestrations and then enable the relevant tracking properties as shown.


In Group Hub, you can find separate query sets to view the tracked services, 
Routing Messages in BizTalk

Microsoft BizTalk Server provides a mechanism for routing, processing, and sending messages between business processes. The BizTalk messaging system consists of components such as receive locations, receive and send ports, pipelines, and the MessageBox database. 

Publication is the process by which messages are placed in the MessageBox database. 

Subscriptions are criteria on which message routing is determined. Each subscription allows the subscriber to initiate or continue the processing of a message. Subscriptions are managed by the MessageBox database. When a message meets the specifications of a subscription, the message is passed from the MessageBox database to the subscriber. If multiple subscribers exist for a given message, each gets a copy of the message. Each subscriber will receive a copy of the message (with a unique message ID). The message stays in the MessageBox database until all subscribers have received and successfully processed the message. 

As for the walk-through purpose, we would deploy our artifacts under BizTalkDJ.Concepts 

Create and Configure a Receive Port
BizTalk Server uses receive ports to receive messages from internal systems and trading partners. Receive ports can be configured to use one or more maps for incoming message transformation. If more than one map is specified, only the map that matches the inbound message will be applied. 
A receive port can have multiple receive locations associated with it. This is useful when you have messages being received from multiple physical locations, such as from a file folder and an FTP site, open the BizTalk Server Administration Console, and expand BizTalk Server Administration, BizTalk Group, Applications, and then BizTalkDJ.Concepts. 
  • Right-click Receive Ports, point to New, and then click One-way Receive Port. 
  • In the Receive Port Properties dialog box, in the Name box, type ReceivePort.OrderRequest, and then click OK. 
Create and Configure a Receive Location
  • In the BizTalk Administration Console, in the left pane, right-click Receive Locations, point to New, and then click One-way Receive Location. 
  • In the Select a Receive Port dialog box, double-click ReceivePort.OrderRequest. 
  • In the Receive Location Properties dialog box, in the Name box, type OrderRequest.RcvLoc.File. 
    • It is helpful to include the Transport Type in the name of the receive location. 
  • In the Type list, click FILE, and then click Configure. 
  • In the FILE Transport Properties dialog box, click Browse and provide the file directory 
  • In the FILE Transport Properties dialog box, click OK. 
  • In the Receive Location Properties dialog box, in the Receive pipeline list, click XMLReceive, and then click OK. 
  • Once receive location is created; Right-click OrderRequest.RcvLoc.File, and then click Enable.
Configure Send Port

Send ports are the locations to which BizTalk Server sends messages. A send port can function as either a one-way port or a two-way port. Send ports and send port groups always have a state. The state of the send port determines whether it accepts messages, processes messages, or does neither. The state of the send port group can be changed by actions invoked on a send port it contains. You can change the state of a send port by using either BizTalk Explorer or the BizTalk Administration Console. 

  • Under BizTalkDJ.Concepts Application, right-click Send Ports, point to New, and then click Static One-Way Send Port. 
  • In the Send Port Properties dialog box, in the Name box type OutboundFormat. 
  • In the Type list, click FILE, and then click Configure. 
  • In the FILE Transport Properties dialog box, click Browse and provide the directory path and then click OK. 
  • In the File name box, type %MessageID%.xml, and then click OK. 
  • In the Send pipeline list, click XmlTransmit. 
Configure Send Port filters
Filter expressions are used to create subscriptions. Subscriptions determine which messages will be delivered to a specific port. You can use both the promoted properties from the inbound message schema and the BizTalk global properties to create the filter expressions on a send port. This is known as content-based routing because the actual contents of the message are used to determine how the message should be routed. 

  • In the left pane of the Send Port Properties window, click Filters. 
  • In the Property list, click BTS.ReceivePortName. 
  • Verify that the Operator is set to ==. 
  • In the Value box, type   ReceivePort.OrderRequest and then click OK. 
Execution of Map at Receive/Send Port(s)

At ReceivePort
BizTalk allows you to configure the map at receive port, as shown below. This means all the incoming messages would be transformed to a desired format and published to MessageBox.

At SendPort
On successful subscription of message at the send port, the message would be transformed to desired format and the sent to the destination system. 

Reminder, you can't execute the same map at both receive and send port as shown above. 

Conclusion
In this article, you have seen
  • Overview of BizTalk Admin Console and Group Hub queries to monitor the service/message instances
  • Creating and configuring Receive and Send ports Filters at Send Ports. 
  • Creating a simple messaging solution and executing map at Receive/Send Port 


No comments:

Post a Comment

Note: only a member of this blog may post a comment.