Click here to Skip to main content
14,576,736 members

Simple Biztalk Project

Rate this:
4.57 (14 votes)
Please Sign up or sign in to vote.
4.57 (14 votes)
28 Apr 2014CPOL
Creating a simple Biztalk Application using Maps and Orchestration

Introduction

This Article is designed for the BizTalk Beginners to start with the Simple application, which would give the outline experience in handling Messages in BizTalk.

In BizTalk, the flow of messages can be designed two different approaches.

  1. Message only Solution (Without Orchestration)
  2. Orchestration based solution

As I have covered the Message only solution on my other article, I am taking up the Orchestration based approach here. We should always keep in mind that,

In message only solution,

physical receive port is a publisher and physical send port is a subscriber.

In Orchestration based solution, the message makes a round trip to the orchestration

>Physical Receive port-Publisher

>Logical Receive port-Subscriber

>Logical Send Port-Publisher

>Physical Send Port-Subscriber

Lets design a simple solution to understand how orchestration based solution works...!

Scenario

To perform simple transformation using orchestration in BizTalk

Steps

  1. Creating a biztalk Input & Output Schema
  2. Creating a Map and testing the map
  3. Configuring Biztalk Orchestration
  4. Deploying BizTalk Application
  5. Testing the Application

Tutorial

Get Ready...

  1. Start>>Visual Studio 2010 >> Biztalk >> Biztalk Empty Project>> Name your Empty Project/Solution as SimpleBizTalkOrchestration

    Image 1

  2. Create a Receive Schema Goto Solution Explorer>>Add new item>>Schema>>schema1(name it as ReceiveSchema)

    Image 2

    Image 3

  3. ReceiveSchema>>In the Root RightClick(RC)>>Add New Child Element>>Name it as FirstName

  4. Repeat the above step to create another elements as LastName

    Image 4

    Image 5

  5. Repeat the steps 2 and 3 and create another schema (name it as SendSchema) and create an element as FullName

    Image 6

Creating a Map

  1. Solution Explorer>>Add new item >>Map (name it as MapTransform)

    Image 7

  2. You will find an interface with Source Schema and Destination Schema on Left and Right side of a Canvas

    Image 8

  3. Click on source schema>>Biztalk Type Picker window will open>>Expand the Tree Structure>>Expand the Schema>> Select the Receive Schema and SendSchema for the Source and Destination respectively

    Image 9

  4. Expand the root elements on Send and Receive schemas

    Image 10

  5. Now Goto Toolbox>>String Functoid>>String Concatenation functoid>>Drag and drop to the canvas

    Image 11

  6. From ReceiveSchema drag the connect the FirstName and LastName to the FullName

    Image 12

Test the Map

  1. Generate an instance of input schema, by right click and click on generate instance.

    Image 13

  2. Edit the file from its output location and Assign the generated xml’s full path to the input instance of map

    Image 14

  3. Test the map by clicking on Test map

    Image 15

Configuring Orchestration

Orchestration is a logical representation of a flow of message in BizTalk. Let design the flow for our application with the below steps

  1. Solution Explorer>>Add new item>>Orchestration (name it as SimpleOrch)

    Image 16

  2. All the schemas have to be linked to a message in an orchestration. So we need to Assign the Receiveschema and SendSchema as a message. Goto Orchestration pane and create a message as ReceiveMsg

    Image 17

  3. Assign the ReceiveSchema to the message type from the Schema tree selection

    Image 18

  4. Repeat steps 2 and 3 and assign SendMsg with SendSchema

    Image 19

  5. Now, Drag and drop Receive shape Transform shape and Send shape from toolbox as shown below

    Image 20

  6. Now we need to create Physical ports, Right click on the Port surface and click on New port.

    Image 21

    Double click on the new port and and go through the wizard,

    Image 22

    Image 23

    Configure the Port binding as shown below, you can also mention the Port binding as specify later

    Image 24

  7. Repeat the above steps for Send port also as shown below

    Image 25

  8. You can now see the physical ports being configured as below

    Image 26

  9. But if you notice, you can see error icons on top of each shape, because we didn’t configured it yet.Now we need to tell receive shape,
    1. what message it has to receive by assigning the RcvMsg to receive shape
      1. Right click the properties of receive shape and assign RecvMsg to the message
    2. To which physical port it has to be linked(Operation)
      1. Assign RcvPort.Operation_1.Request to the operation

3. Activate to true, which will trigger your orchestration

Image 27

  • Repeat the same for Send port with the configurations below

    Image 28

  • configure transform shape by double clicking the transform shape , in which we will assign the Maps for transformation as shown below

    Image 29

    If you notice now, all our error icon has gone, which means we have configured all shapes.

    Pre-Deployment Steps

    In order to deploy the application, follow the below steps

    1. All the BizTalk Application has to be signed before deploying. Got to project properties>>signing tab>>Create a new key and assign it
    2. In Deployment tab, Give the Application name as SimpleBizTalkOrch,Our application will be deployed in this name in BizTalk Administration console.

    Deploying the Application

    All set, we are ready to deploy now J

    Right click on the project , and click on deploy

    Image 30

    Deploy succeeded message will be displayed in the output window.

    Receive shape: It’s a logical receive port in orchestration which subscribes to the message

    Post-Deployment Steps

    1. Goto BizTalk Administration Console, check whether application is listed
    2. Check whether Receive location, send port and Orchestration are unenlisted/disabled state
    3. Goto Orchestration>>Right click on SimpleBizTalkOrchestration.SimpleOrch>>Properties>>Bindings tab>> assign the Host instance as BizTalkServerApplication

      Image 31

    4. Now create desired input and output folder before starting the application, because receive location will not get started, if the location is non-existing
    5. Now Right click on the application and start it
    6. Make sure, Orchestration, Send port and Receive location are in started state
    7. Restart the Host Instance
    8. Your Application is Ready to Test now

    Testing the Application

    1. Create an XML Document as per the ReceiveSchema or use the generated instance
    2. Make sure the XML file is prepared as ReceiveSchema Structure(FirstName and LastName as elements)

      Image 32

    3. Copy that XML file and Paste it in the Receive folder which you had created
    4. The Biztalk Application will pick up that XML file>. You can see the file will get disappeared with in a few seconds after you place that
    5. When you open the Send folder you would find a generated XML file with the filename as Output.xml with the element FullName(as per our SendSchema)

    Image 33

    Summary

    The Message from the File location is picked up by the Physical receive port and published to the message box database, this message will be subscribed by the Logical receive port in orchestration. This incoming incoming message is transformed to another format using a map and published into message box through logical send port and this message is subscribed by the physical send port and sent to the destination file folder.

    With this we have completed the simple BizTalk Orchestration Application, Have an Happy Start to the Biztalk J

  • License

    This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Share

    About the Author

    No Biography provided

    Comments and Discussions

     
    QuestionPort Type does not exist or is not valid. Pin
    Vamsi Rageer14-Feb-19 6:41
    professionalVamsi Rageer14-Feb-19 6:41 
    Questionmessages not getting processed Pin
    sai gopi dhoopam13-Apr-18 15:55
    Membersai gopi dhoopam13-Apr-18 15:55 
    QuestionPort Binding - Specify later Pin
    Member 134449824-Oct-17 7:07
    MemberMember 134449824-Oct-17 7:07 
    AnswerRe: Port Binding - Specify later Pin
    Member 134449824-Oct-17 18:30
    MemberMember 134449824-Oct-17 18:30 
    PraiseThank you! Pin
    Member 1280748827-Nov-16 10:05
    MemberMember 1280748827-Nov-16 10:05 
    GeneralVote of 4 Pin
    Member 958884626-Jul-15 21:01
    MemberMember 958884626-Jul-15 21:01 
    GeneralRe: Vote of 4 Pin
    VIGNESH SUKUMAR21-Aug-15 4:02
    MemberVIGNESH SUKUMAR21-Aug-15 4:02 
    GeneralUpdated the article Pin
    VIGNESH SUKUMAR16-May-14 5:12
    MemberVIGNESH SUKUMAR16-May-14 5:12 
    QuestionSimple Biztalk Project Pin
    Member 999496917-Apr-13 4:55
    MemberMember 999496917-Apr-13 4:55 
    GeneralMy vote of 3 Pin
    Kay Lerch18-Jan-13 15:57
    professionalKay Lerch18-Jan-13 15:57 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

    Tip/Trick
    Posted 19 Dec 2012

    Tagged as

    Stats

    81.4K views
    14 bookmarked