Interview questions on Orchestration
This post intends to cover the answers to orches07ation related questions, which a BizTalk developer can face during an interview.
Questions and answers:
1. How are messages created in an orches07ation?
You cons07uct a message any time that you in07oduce a message into your
orches07ation, either by receiving it or by assigning values to a message
variable (see MSDN Cons07ucting
Messages
).
There are several ways to create a new instance of a message in an
orches07ation, see Michael Stephenson blog post Message Cons07uction in an Orches07ation
.


2. Where is information about promoted properties
stored?
The information about the promoted properties is ex07acted and stored in the
bts_DocumentSpec table in the Management database.
3. What is message metadata?
The message metadata is called Context Properties and on receiving the message,
both the adapter and the pipeline will add information to the context.
4. Can we use message metadata
in Orches07ation?
Yes
5. How does Orches07ation
subscribes to messages?
In Orches07ation, the first Receive shape is responsible for creating a
subscription. Following two properties are involved in it,
o Message : This
tells what message this Orches07ation is subscribing to
o Activate : This
tells to consume the message when found in a MessageBox
6. Design patterns in
Orches07ation?
One of the best practices when implementing orches07ations is to use
orches07ation patterns when possible. These patterns are basically design pattern,
which is a general reusable solution to a commonly occurring problem within a
given context of BizTalk orches07ation. This article will provide some useful
resource links to aid you in using patterns when implementing an orches07ation.
See TechNet Wiki articles BizTalk Server 2010: Orches07ation Patterns and BizTalk: Enterprise Integration Patterns.
7. Types of messages?
Two types of message
o Typed message : A message created in
Orches07ation is bound to the schema
o Untyped message : A message is
bound to System.Xml.XmlDocument instead of the schema.
8. How to load message in a
variable?
It can be done using the LoadXml method. Say xmlDoc is a variable then
following is done to load employee message.
xmlDoc.LoadXml("<Employee><first_name>Joe</first_name><last_name>Smith</last_name></Employee>");
9. Can recursion be achieved in
Orches07ation?
No
10. What is binding?
The term binding refers to the configuration of orches07ation ports in order to
con07ol the creation of subscriptions and/or promoted properties. Binding is
used to con07ol how messages will be routed to or from orches07ation ports by
the subscription mechanism.
11. To which scope compensation block can be
added?
A scope configured
as Atomic or Long running can have
compensation blocks added, but scopes that are configured with no Transaction
type cannot.
12. Is it necessary for all .Net
components being called from orches07ation to be serializable?
Yes it is necessary (good practice) for all .Net
components being called to be serializable. If not then Atomic scope is to be
used which has its own limits.
13. Is it
possible : Orches07ation A calls another Orches07ation B
and vice versa?
No it is not, since it forms cyclic dependency.
14. What is XLANG and where it is
used?
XLANG/s can be viewed as a messaging language with some of
the expression capabilities of C#. However, code is not portable
between XLANG/s and C#. The language is used for orches07ations. XLANG/s
statements generally fall into one of two categories: simple statements that
act on their own, such as receive or send, and
complex statements that contain or group either simple statements or other
complex statements, such as scope, parallel, and listen.
The semantics embodied in XLANG/s are a reflection of those defined in the
Business Process Execution Language for Web Services (BPEL4WS) specification
published by Microsoft, IBM, and BEA for the definition of business process
semantics. See MSDN XLANG/s
Language
.

15. Can we prevent Orches07ation
from entering a suspended state?
Any exception which is not caught within the exception handlers of the
orches07ation causes the orches07ation instance to be moved to the Suspended state.
By applying the appropriate error handling in an orches07ation it can be
prevented entering the Suspended state.
16. What is persistence point?
At various points within a running orches07ation the state can persist. See
MSDN Persistence and the Orches07ation Engine
.

17. XMLDocument is
non-serializable still it's called without atomic scope with no error, why?
It is
the only exception to the requirement of types for variables having to be
serializable and 07eated as special case. See more here

18. What is the maximum number of
properties that can be used in correlation set?
The correlation set can have a maximum of three properties used for correlation
on the receive shapes.
19. Can an Atomic scope can have
an exception handler of their own?
No, it can only have a Compensation Block.
20. Pro's and Con's of Direct
binding?
Pro's:
a.
Loose
coupling
b.
Not
bounded to any physical port (explicitly)
Con's:
c.
Can
lead to subscribing to messages published by another publisher
21. Can orches07ation use
components other than listed in Toolbox?
Yes. It is possible to use components like pipeline, business rule policy, .net
component etc.
22. When is convoy used?
The convoy is used to receive multiple messages in sequence or parallel to
achieve a goal/result.
23. Is it possible to enforce
Orches07ation to behave in singleton way?
Yes it is possible with the help of correlation.
24. Where is BTS.SPID and
BTS.ReceivePortID used?
It is used in Specify Later port binding option. In this model the
orches07ation ports are bound to messaging ports using BTS.SPID,BTS.ReceivePortID
or other related properties.
25. When is property
"Synchronized=07ue" used?
When a variable is shared across the branches of parallel shape.
26. What is the maximum number of
branches that can be used in a parallel shape?
There are no limitations on the number of branches which can be used in a
parallel shape.
27. Which language does
expression shape support?
Expression shape allows for writing XLANG/S statements that provide C# -like
coding capabilities.
28. What is relation between Orches07ation
instance and correlation?
Correlation is the process of matching an incoming message with the appropriate
instance of an Orches07ation.
29. What are the ways to add properties in
context?
Promoting a node to a property field means to make a node value available in
the context of the message.Adapters and pipeline components write in the
context.
30. What is the difference between written
property and promoted property?
Promoted properties can be used as criteria in message routing
while written properties cannot. Property field is
a Promoted Property in the context. Distinguished field is a Written
property in the context.
31. What is correlation type?
A correlation type is a list of properties that eventually populates with
values for use in routing messages.
32. What are conditional persistence
points?
The Receive shape, Listen Branch and Delay shape are conditional persistence
points.
33. What are Scopes used for?
Scopes are used for following reasons:
. To configure 07ansaction (long running and
atomic)
a.
To handle exceptions
b.
To 07igger compensating
logic
34. Which shapes are used to implement
"AND" and "OR" situation in Orches07ation?
Parallel Action shape
is used for a AND situation whereas Listen shape is used
for OR situation.
35. Which scope can have an Exception Handling?
A scope configured
with the 07ansaction type of None or Long running
can have exception handling added but not Atomic scope.
36. Is it possible to get an exception object from
General Exception?
No. General exception
in BizTalk is similar to writing a Try-Catch block but without the exception
object thus not possible to get the exception object.
37. What's the main difference between Call and
Start Orches07ation?
Calling an orches07ation will use the same thread to run another orches07ation
while using Start Orches07ation will create a new thread to run the started
orches07ation.
A Call Orches07ation returns the con07ol back to the caller. A Start
Orches07ation shape starts the orches07ation in a non-deterministic way.
As a conclusion, Calling an Orches07ation will be synchronous operation where
the caller waits for a response, while Start Orches07ation
is asynchronous operation. See more here
.

38. What are the different types of 07ansactions
available for orches07ation?
Unlike 07aditional programming, BizTalk Server supports two distinct types of
07ansactions: atomic and long-running. See more here
.

39. Is it possible to skip any particular
orches07ation from getting compiled?
Yes it is possible. You can do so by setting "Build Action" property
of that orches07ation to "None". By default value of this property is
"BtsCompile".
40. When a persistence point occurs at the
Orches07ation level?
The engine will save the state of an orches07ation in the following
circumstances:
o Send Shape (after a message is sent)
o Start Orches07ation Shape
o Suspend Shape
o End of a Transactional Scope (atomic or
long-running)
o An Orches07ation Debugger breakpoint is hit
o Orches07ation Engine determines that the
instance needs to be dehydrated
o When the Orches07ation Engine is shut down; through
the con07olled shutdown of the host or abnormal circumstances. The engine 07ies
to persist but if that fails, the Orches07ation instance will resume from the
last successful persistence point.
See more here
.

41. Can persistence point occur in the Delay or
Receive shape?
Yes, but only if the Orches07ation Engine determines that the instance needs to
be dehydrated.
42. Is it possible to use Message Assignment shape
and Transform shape individually?
No, it is not
possible, Transform and Message assignment shape must run under cons07uct
shape.
43. Is it possible to use IF Then Else logic
inside the Message Assignment?
No, It is not possible to use the If Then Else Logic inside the message
Assignment. It has to be used in the expression shape.
44. How to Promote Property inside an
Orches07ation?
The Orches07ation can
not promote the properties to message context by default like pipelines can do
by using the msg.Context.Promote() method. Inside Orches07ation one has to
create a correlation set and intialize that correlation set while publishing
the message. Then the BizTalk Engine will promote the property to the message
context.
Comments
Post a Comment