Professional Documents
Culture Documents
What is BizTalk
Xml Schemas
BizTalk Components
Architecture Overview
Adapters
Ports
Receive Ports
Send Ports
PipeLines
ReceviePipeLine
SendPipeLine
Stages
Messages
Messages Delivery Patterns
Subscriptions
Message Box
Demo
Mappings
Functoids
How to use Functoids
Business Process
Orchestration
Shapes / Activity
A Simple Orchestration.
<xs:schema xmlns:xs=”http://www.w3.org/2001/XMLSchema”>
<xs:element name=”Person”>
<xs:complexType>
<xs:sequence>
<xs:element name=”Name” type=”xs:string”/>
<xs:element name=”Age” type=”xs:int”/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
This schema defines an element called Person that contains a complex type, which, in
its simplest form, is a collection of subelements (like a class in object-oriented
rogramming). Two further elements with differing data types have been defined within
this complex type.
Scatter-gather
Price Bidding Example.
Request-reply
HL7 Messaging Example.
Publish-subscribe
Adapters provide connectivity for BizTalk to and from the outside world.
Adapters work with a transport and have no underlying knowledge of the data that will be sent or
received. They receive a byte stream from the wire and feed the BizTalk engine.
In the receive case, the adapter is responsible for listening or polling for data and wrapping that
data in a BizTalk message.
In the case of listening, it may listen on a endpoint (or URL) for incoming data and will
communicate with the remote system.
In the polling scenario, the behavior will typically involve periodically checking an endpoint for
new data that needs to be received into BizTalk.
In the send case, the adapter is responsible for receiving messages from the BizTalk
MessageBox and transmitting them to the remote system, using their associated transport or
protocol.
Once an adapter has received the message, it’s then responsible for passing that message to
the BizTalk Messaging Engine for processing. The Messaging Engine will process the message
in a pipeline after receiving a message and before sending a message.
Context Properties
Context properties are used extensively by BizTalk adapters.
An example of a context property is the filename of a file that BizTalk has
retrieved from a filesystem using the File adapter. The File adapter writes the
filename into the context during processing; this can then be accessed via
pipeline components and BizTalk orchestrations.
Batching
Batching is an optimization within the engine, enabling a receive location to
process multiple units of work as part of the same batch, thereby reducing the
number of BizTalk MessageBox roundtrips required and enabling asynchronous
processing for messages
In-Box Adapters
JD Edwards EnterpriseOne
JD Edwards OneWorld XE
ODBC Adapter for Oracle Database
PeopleSoft
SAP
Subscriptions
Once a message has been processed by the adapter and associated pipeline, it
needs to be routed to an interested party. A BizTalk orchestration or send port
can register its interest in a specific message via subscriptions.
MessageBox
Once the message has passed from the adapter and through the pipeline, the
BizTalk Message Agent,which runs as part of a BizTalk host instance, is
responsible for evaluating who has subscribed to this message and committing it
into the BizTalk MessageBox.
The MessageBox is the heart of any BizTalk solution in that without it nothing
would work. All inbound and outbound messages, along with orchestration
execution, dehydration, rehydration, and message tracking, rely on the BizTalk
MessageBox.
Hosts
A BizTalk host is a logical representation of a runtime process. Each host may
contain a combination of Receive or Send adapters (and their associated receive
and send ports) or orchestrations.
Orchestration
The most basic definition of a BizTalk orchestration is that it is a collection of code
that can be used to process data.
BizTalk orchestrations enable you to implement a business process using a visual design
tool called the Orchestration Designer.
The orchestration is compiled into .NET code and, ultimately, into a .NET
assembly;
leverages the .NET side-by-side (SxS) functionality, which allows multiple
versions of an orchestration to be deployed at any time.
An orchestration can be created either by a message that it subscribes to or by
being invoked by another orchestration.
In the case of an orchestration subscribing to a message, the orchestration must
have a Receive shape at the top.
Pipelines
Pipelines provide the ability to perform data processing and validation operations on
incoming and outgoing messages.
Incoming messages use receive pipelines, and outgoing messages use send pipelines.
Resolve Party:- The Resolve Party stage is used to identify the sender of
the message, typically using an X509 Certificate or the Windows user, which
is supplied by the adapter.
Assemble:- The Assemble stage is the opposite of the Disassemble stage in that
it is responsible for converting the message from XML, typically to a different
format such as a flat file. It’s also possible to assemble multiple messages into
one output message.
Encode:- The Encode stage is used to perform any final changes to a message.
Typically, these include encoding, encryption, or compression.
Ports
A port is essentially a container of locations where you can obtain data.
A port is a “logical” container for the “physical” receive location.
Receive Port Structure
The File adapter is arguably one of the most frequently used adapters that BizTalk provides. As the name
implies, it can monitor a filesystem directory for files matching a configured extension to arrive.
The File adapter works in two modes. After detecting a new file, the File adapter places a lock on it to
ensure that another thread or machine doesn’t try to process the file at the same time. It maintains the
lock until the file has passed through the pipeline and has been successfully written to the MessageBox.
Alternatively, it can be configured to rename the file to prevent another process from picking up the file
while it is being processed.
If the MessageBox persistence of the message is successful, the file is deleted from the filesystem.
Conversely, if an error occurs during adapter or pipeline processing, the file is returned to the filesystem
and will be processed again. In the case where it was renamed, it will be renamed to its original name.
Orchestration
The most basic definition of a BizTalk orchestration is that it is a collection of code
that can be used to process data.
BizTalk orchestrations enable you to implement a business process using a visual design
tool called the Orchestration Designer.
The orchestration is compiled into .NET code and, ultimately, into a .NET
assembly;
leverages the .NET side-by-side (SxS) functionality, which allows multiple
versions of an orchestration to be deployed at any time.
An orchestration can be created either by a message that it subscribes to or by
being invoked by another orchestration.
In the case of an orchestration subscribing to a message, the orchestration must
have a Receive shape at the top.
Activation
By a message arriving in the MessageBox to which an orchestration has
subscribed. This is called an activating receive.
Activating Receive
Invoked
The second scenario is when an orchestration is created from another
orchestration. This is configured by dragging a Call Orchestration or Start
Orchestration shape onto the orchestration design surface.
Persistence Points
BizTalk itself has been designed to be entirely stateless at the BizTalk Server
layer.This stateless model is achieved by persisting the in-memory representation
of an orchestration and any associated messages in SQL Server, which acts as a
durable store. The engine does this in an intelligent manner rather than persisting
the entire orchestration each time. It will persist only the parts that it needs to.
Dehydration
Explain with Scenarios.
Versioning
BizTalk leverages the .NET side-by-side capability by utilizing the Global
Assembly Cache (GAC).
The GAC enables multiple versions of .NET assemblies to be deployed side by
side. Because an orchestrations is compiled into a .NET assembly, it can
leverage this feature. So, if you have an orchestration already deployed and have
instances of this orchestration dehydrated, you can modify the orchestration,
update the version number, and deploy to your BizTalk servers.
After this new version has been deployed, you will see both versions in the GAC.
When one of the dehydrated orchestrations wakes up, it will continue to use the
original .NET assembly version, not the new version. Any new activations of this
orchestration (i.e., not orchestrations rehydrating) will use the new orchestration
version deployed as part of the new assembly.
Port Binding
Specify Later, which enables you to bind your logical ports to physical receive or
send ports at deployment time, which is advisable in almost all cases
Specify Now, which enables you to configure the physical port at development
time, which is effectively hard-coding your configuration. This is not advisable,
because any configuration changes will require the orchestration to be recompiled
and deployed.
Direct port binding enables you to loosely couple orchestrations together or loosely
couple orchestrations from the message source. This approach is particularly useful
when you want to implement a publish-and-subscribe messaging architecture
Direct binding has three types: direct to message box, self correlating, and partner ports.
Used to route message between the message box and Orchestrations without using bindings
or from one Orchestration to another Orchestration
Orchestrations with direct bound ports are not bound to physical ports at deployment time but
instead rely on messages arriving from other receive ports or being created from other
orchestrations at runtime.
Correlation
Correlation Set
you’ve been asked to construct a routing application that will facilitate an external
authorization process for purchases over $1,000. You’ll have an inbound
message that you accept on an input port. Based on the dollar value of the price
element, you’ll either send the message straight to a final send port or you’ll direct
it to an external authorization process. If the message is sent for approval, you
want the orchestration to “pause” and wait for the same message to return before
it continues processing,To accomplish that, you’ll need to create what is known
as a correlation set.
a correlation set allows you to declare that a promoted property will be used for
identification on any related messages that leave and return to the orchestration.
Portions of the orchestration must subscribe to this correlation set so that the
BizTalk engine is able to differentiate between an original message and one that
is a continuation of work previously done.
Consuming a WebService
The BizTalk orchestration retrieves the XML purchase order (PO) message file
from the receive location In folder.
The orchestration passes the XML PO message as a string to the Web service.
The Web service receives the XML PO message string, converts it to a
corresponding XML invoice message string, and returns it as a string to the
calling orchestration.
The orchestration writes the invoice message to an .xml file in the Out folder.
In the middle of the orchestration, a Send shape and a Receive shape are
connected to a port named POWebServicePort. This is where the orchestration
makes a synchronous Web method call to the external Web service through a
request-response port, specifying to send the message first.
The logical request-response port is bound with a physical Solicit-Response send
port. When calling the external Web service, you must make sure that the Web
method name you are calling matches the Operation name on
the port, or you will receive a SOAP exception.
Correlation Set
you’ve been asked to construct a routing application that will facilitate an external
authorization process for purchases over $1,000. You’ll have an inbound
message that you accept on an input port. Based on the dollar value of the price
element, you’ll either send the message straight to a final send port or you’ll direct
it to an external authorization process. If the message is sent for approval, you
want the orchestration to “pause” and wait for the same message to return before
it continues processing,To accomplish that, you’ll need to create what is known
as a correlation set.
a correlation set allows you to declare that a promoted property will be used for
identification on any related messages that leave and return to the orchestration.
Portions of the orchestration must subscribe to this correlation set so that the
BizTalk engine is able to differentiate between an original message and one that
is a continuation of work previously done.