Pages

Friday, August 23, 2013

Interview questions on Orchestration

This post intends to cover the answers to orchestration related questions, which a BizTalk developer can face during an interview.

Questions and answers:

1.How are messages created in an orchestration?

You construct a message any time that you introduce a message into your
orchestration, either by receiving it or by assigning values to a message
variable (see MSDN Constructing
Messages ).
There are several ways to create a new instance of a message in an
orchestration, see Michael Stephenson blog post Message Construction in an Orchestration .

2.Where is information about promoted properties
stored?

The information about the promoted properties is extracted 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 Orchestration?

Yes

5.How does Orchestration
subscribes to messages?

In Orchestration, the first Receive shape is responsible for creating a
subscription. Following two properties are involved in it,

oMessage : This
tells what message this Orchestration is subscribing to

oActivate : This
tells to consume the message when found in a MessageBox

6.Design patterns in
Orchestration?

One of the best practices when implementing orchestrations is to use
orchestration 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 orchestration. This article will provide some useful
resource links to aid you in using patterns when implementing an orchestration.
See TechNet Wiki articles BizTalk Server 2010: Orchestration Patterns and BizTalk: Enterprise Integration Patterns.

7.Types of messages?

Two types of message

oTyped message : A message created in
Orchestration is bound to the schema

oUntyped 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.

The term binding refers to the configuration of orchestration ports in order to
control the creation of subscriptions and/or promoted properties. Binding is
used to control how messages will be routed to or from orchestration 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 orchestration 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 : Orchestration A calls another Orchestration 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 orchestrations. 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 Orchestration
from entering a suspended state?

Any exception which is not caught within the exception handlers of the
orchestration causes the orchestration instance to be moved to the Suspended state.
By applying the appropriate error handling in an orchestration it can be
prevented entering the Suspended state.

Correlation is the process of matching an incoming message with the appropriate
instance of an Orchestration.

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.

39.Is it possible to skip any particular
orchestration from getting compiled?

Yes it is possible. You can do so by setting "Build Action" property
of that orchestration to "None". By default value of this property is
"BtsCompile".

40.When a persistence point occurs at the
Orchestration level?

The engine will save the state of an orchestration in the following
circumstances:

oSend Shape (after a message is sent)

oStart Orchestration Shape

oSuspend Shape

oEnd of a Transactional Scope (atomic or
long-running)

oAn Orchestration Debugger breakpoint is hit

oOrchestration Engine determines that the
instance needs to be dehydrated

oWhen the Orchestration Engine is shut down; through
the controlled shutdown of the host or abnormal circumstances. The engine tries
to persist but if that fails, the Orchestration instance will resume from the
last successful persistence point.

Yes, but only if the Orchestration 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 construct
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
Orchestration?

The Orchestration can
not promote the properties to message context by default like pipelines can do
by using the msg.Context.Promote() method. Inside Orchestration 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.

Feedjit

Disclaimer

The contents of this blog are my personal views and they are no way related to my Employer/Company.The sole purpose of this Blog is to help others by posting about the common/uncommon scenarios faced while working.