现在阅读
Simple BizTalk Project without Orchestration
0

Simple BizTalk Project without Orchestration

由 ultracpy2018年1月26日

Introduction

Most Techies have a perspective of
BizTalk as an Orchestration based solution. But designing the solution with
orchestration makes a round trip to Message box.

Whenever complex business logic
needs to be designed, the Orchestration is the best approach to follow.

But, if you need to implement
simple transformations with no business logics, The Best approach would be the
Message-only Solution, which avoids the round trip to Message box and increases
the through-put of the solution.

Let us quickly create a message
only solution without orchestration J

Steps

  • Creating
    a BizTalk Input & Output Schema

  • Creating
    a Map

  • Creating
    the instance of the Input message

  • Deploy
    the Solution

    • Pre Deployment
      Steps

    • Deployment

  • Configuring
    Application

    • Post Deployment
      Checks

    • Configuring Receive
      Port/Location

    • Configuring Send
      Port

    • Configure map in
      send port

    • Configuring Filters
      in send Port

    • Post-Configuration
      Tasks

  • Testing
    the Solution

  • Trouble shoot on
    Failures

Creating a BizTalk Input &
Output Schema

  1. Start>>Visual
    Studio 2010 >> BizTalk >> Empty BizTalk Server Project

Rename
the Name and Solution Name as MessageOnlySln

  1. In
    Solution Explorer, Right Click the project and Add>>New Item

  2. Select
    the schema from the Items and Rename the schema as ReceiveSchema.xsd

  3. A
    new schema will be formed with the root element as ‘root’, just rename the root
    as ‘Input’

BizTalk
Identifies the Messages through the Message
Type
. Message type is an integral part of ‘NameSpace#Root’

  1. Now
    create two child field elements as FirstName and LastName as string(default)
    datatype

At last the ReceiveSchema should
be like this

  1. Follow
    the above steps 2,3,4,5 and create a SendSchema.xsd with one child field
    element as ‘FullName’

Creating a Map

Map is a Message Transformational
object in BizTalk. The Conversion of schema ReceiveSchema and SendSchema
will be carried here. Maps are internally a XSLT Transformation.

Let us create a simple map

  1. Create a new map and name it as ConcatenateMap.btm

  1. Map
    will be created with links as Open
    Source Schema
    and Open Destination
    Schema

  1. Click
    on those links and Select the Source(ReceiveSchema.xsd) and Destination Schema(SendSchema.xsd)

  1. After
    selecting the schemas, expand the root node to have a visibility of underlying
    elements

  1. Let
    us do a simple concatenation of FirstName and LastName (Source Schema) to FullName(Destination
    Schema)

  2. Drag
    and drop the String concatenate functoid

Functoids are ready-made
logical functions which is available for transforming the data in map

You can see the
warning shown in the functoid, because of no input/output is provided

For all the Functoids,
there will be an description, which you can find once you double click the same

  1. Now
    drag the Link from the FirstName and LastName elements from Source schema to
    the left side of Concatenate functoid and link the result(right side)to the FullName
    element of Output schema

  2. Note
    that functoid warning symbol has been disappeared

    As said earlier
    Map is internally an XSLT… Let’s see how the xslt is formed for this map.

    Right click the
    ConcatenateMap.btm and click validate map

    If you click on the
    output link of XSLT

    You can see the
    xslt as below:

    With this we have
    created the functionality. But we should do unit test before deploying, for now I am skipping that part J

Creating the instance of the
Input message

  1. To create an instance, Right click the ReceiveSchema.xsd
    and Generate instance

    The schema’s
    instance will be generated in the location. The Output window will show the
    location as:

C:\Users\<PC-Name>\AppData\Local\Temp\_SchemaData\ReceiveSchema_output.xml

  1. Open
    the instance file

  1. As
    the Generate instance will be default field name will values, change it as
    desired

  2. Keep
    this file ready before testing.

Deploy the Solution

We are done Lets Deploy the
SolutionJ

Pre Deployment Steps

  1. All
    the BizTalk Artifacts (Schemas,Maps,orchestration) or full projects has to be made the strongly
    named before deploying

  2. Goto
    MessageOnlySln project in solution explorer and right click and click on
    properties

    And Navigate to
    signing Tab in the left pane

  3. Click on sign the assembly and choose a strong name key file as ‘new’

  4. Give
    the filename as ‘MessageOnlySlnKey’ and uncheck the ‘Protect my key file
    with a password’

  5. A
    new Key will be created in the solution explorer as below

  6. Now
    go to the Deployment tab

  7. Now
    Create the application name as ‘MessageOnlyAppln’, this name will be used for
    creating application in BizTalk Admin Console.If this is not specified this
    solution will be deployed in the default application(BizTalk Application 1)

    Save all the
    unsaved artifacts…!

    Deployment

  8. Now
    Right click on the Project in solution explorer and click on deploy

  9. The
    deploy started text will be displayed on Visual studio left bottom

  10. Deploy
    Succeeded after some time

  11. New
    Application called MessageOnlyAppln is formed in BizTalk Admin console

    Note: In case of errors,

    1. Please ensure that Biztalk necessary services
      are up and running

    2. In case of Access Denied errors, Restart visual
      studio as administrator

    3. Also make sure you have not missed out any steps
      mentioned above

Configuring Application

Post Deployment Checks

  1. Make
    sure the schema and maps are available in the respective areas in the console

Configuring Receive Port/Location

Ports are the sources of Publish
subscribe model in BizTalk. All the Messages are published/Subscribed by the
ports in BizTalk

Configuring Receive Port/Location

  1. Create
    a new Receive port

  2. In
    General tab Rename the port as InboundRcvPort

  3. Create
    Receive Location

    Click on the Receive
    locations in the same window and click on new as shown below

  4. Configure
    Receive Location as below

  5. Click
    on Configure button and provide the location of Inbound folder

  6. Click
    ok on all the underlying windows

  7. Make
    sure Receive location is available as below

Configuring Send Port

The Message will be picked up by
the File based Receive Adapter>> It will be transmitted to Receive port
and Delivered to message box

Now we need to subscribe to this
delivered message through any of the Context properties(BTS.ReceivedFileName)
to apply the Outbound map. Here the map will be applied in the send port.

  1. Create
    a Send port as below

  2. Click
    on Static One-way send port and rename as ‘OutboundSendPort’ and make all configurations
    as below

  3. Click
    on the Configure button and provide the Outbound folder location

Configure map in send port

  1. Click
    on the outbound maps in the same window on the left pane

  2. Select
    the map as shown below

  3. Click
    on apply

Configuring Filters in send Port

Filters are the
ones which subscribes to the messages from Message-Box

  1. Go to filters tab on left pane in same window
    and select the context property

    ‘BTS.ReceivedPortName’ from drop down

  2. Provide the value to the property as ‘InboundRcvPort

  3. We can select any context properties(like
    BTS.MessageType) based on your requirement

  4. Apply all the settings and click on ok on all
    windows

Post-Configuration Tasks

The Receive Location and Send port
will be in disabled state, Right click and enable the same

2. Make sure the host instance BizTalkServerApplication
is up and running

Testing the Solution

As we are done with all
configuration part, now it’s time to test the entire solution.

  1. Copy
    the instance file which you have generated in the previous task

  2. Place
    the file in the Inbound folder configured in receive location

  1. The
    file will be immediately picked up and output will be transformed and placed in
    the output folder with unique MessageID as name

  2. Output
    file will be formed as

    Ha!!! , We have
    done this JSolution
    is working as expected.

Trouble shoot on Failures

  1. If
    the file has not been formed in the send folder,

    1. Double check the filter property and Value
      configured

    2. Make sure the Send Location is configured is
      valid

  2. For
    more assistance check the Suspended Service instances to get the exact problem

With this we have learnt how to
make a simple Message only solution in BizTalk.

Hope this helps…!

出处:https://www.codeproject.com/Articles/737226/Simple-BizTalk-Project-without-Orchestration

关于作者
ultracpy
评论

你必须 登录 提交评论