BizTalk the Practical Course Code

Embed Size (px)

Citation preview

  • 8/21/2019 BizTalk the Practical Course Code

    1/21

    BizTalk The Practical Course Code

    1 BizTalk Overview

    BizTalk is a Business Process Management; Service Oriented Architecture (SOA), oran Enterrise Services Bus (ESB) lat!orm" #ou can think o! BizTalk as a grou o! toolsand alication services that !acilitate the raid creation o! integration solutions"Most enterrises are looking !or BizTalk to ena$le unrelated and disconnecteds%stems to e&change data in a standard, consistent, and relia$le 'a%" The tools thatBizTalk rovides allo' %ou to design relia$le and ro$ust solutions !aster than is o!ten

    achieva$le $% custom coding a solution !rom scratch using standard develomentlanguages and tools" ith this in mind, it is imortant to understand 'hat BizTalkachieves 'ell and 'hat is does not in order to !ull% realize an% ecienc% 'hat aBizTalk solution can $ring"

    *! %ou 'ere to look at t'o BizTalk ro+ects that address identical ro$lems, designed$% t'o dierent grous, %ou 'ould see t'o comletel% dierent solutions" Bothsolutions 'ould solve the ro$lem the% 'ere designed to address; ho'ever, %ou 'ill-nd that one solution utilizes more BizTalk tools" This solution is the $etter one$ecause it 'ill $e more ro$ust and easier to maintain" Think o! BizTalk as a toolkit,and 'ithin this toolkit, %ou -nd tools to hel %ou $uild %our alication"

    1.1 Why BizTalk?

    .or those o! %ou 'ho are comletel% ne' to Enterrise Alication *ntegration (EA*)and Business Process Management (BPM), erhas some conte&t can clari!% theideas $ehind messaging and orchestration" *n addition, this section 'ill attemt toclari!% the concet o! /messaging0" *! %ou1re !amiliar 'ith some $asic EA* rincileslike loose couling, u$lish 2su$scri$e and orchestrations, %ou ma% sa!el% ski to the!ollo'ing section"

    *! t'o alications need to esta$lish some !orm o! communication $et'een them,this can $e done in man% 'a%s" .or e&amle, alication /A0 needs in!ormation !rom

    alication /B0, 'hich 'as develoed rior to /A0" This means /B0 isn1t even a'are o! /A01s e&istence" 3uckil%, the develoers o! /B0 have e&osed an AP* to integrate 'ith"Alication /A0 could thus call /B01s AP* to gather the in!ormation it needs" 4oro$lem, 'orks -ne, li!e1s eas% isn1t it5 4ot reall%, integrating alications is usuall%a$out making assumtions" And in the case o! our e&amle6 'e1ve made man%assumtions, such as6

    • /B0 is running 'hile /A0 makes the call"

    • 7ommunication links $et'een /B0 $o& and /A0 $o& are sta$le, secure, 'ellesta$lished, etc"

    • /B0 runs on a similar lat!orm as /A0 does, i"e" same data reresentation"

  • 8/21/2019 BizTalk the Practical Course Code

    2/21

    • /A0 is rogrammed in a language that can consume /B01s AP*"

    • /A0 'ill never need another alication to rovide the in!ormation"

    4o', imagine that %ou have !our or si& alications that %ou need to integrate" Even

    i! %ou onl% have t'o alications as a$ove imagine !ollo'ing scenarios !or amoment6

    • hat i! 'e 'anted to relace /B0 $% another, $etter alication5

    • hat i! 'e 'anted to hase8out /B0 and move it to another $o& or cluster it5

    • hat i! alication /B0 is do'n 'hile /A0 needs it5

    Because /A0 makes a !e' assumtions a$out /B0, %our integration solution might runinto serious trou$le" 3oose couling o! alications is e&actl% a$out reventing these

    kinds o! ro$lems" The !e'er assumtions an alication makes 'hen integrating'ith another alication, the more loosel% couled the% are"

    Messaging is a ver% oular 'a% to reduce couling $et'een alications" Messagingrelies on middle8'are to transmit chunks o! data (/messages0) !rom one alicationto another" 9suall% this is done using a kind o! /channel0 called /message :ueues0" The nice thing a$out :ueuing is that it 'orks as%nchronousl%" This means that thesending alication can ut messages in the :ueue 'hile the receiving alicationcan ull the messages out o! the :ueue as soon as it has time !or it" .or e&amle,'hen it has $een do'n and $rought u again" O$viousl%, not all alications kno'ho' to integrate 'ith :ueues" *n most scenarios there 'ill $e some /adater0converting the alication1s outut or inut, to or !rom messages" Messaging

    reduces couling and makes solutions more scala$le" Because o! the :ueue acts as aload $uer, each alication can 'ork at its o'n seed" hen %ou integratealication /A0 'ith Alication /B0 directl% (even through :ueues) this is re!erred toPoint to Point integration" 4o' i! %ou have or < alications that %ou need tointegrate" Point to oint 'ould lead to man% comlications and intert'ining $et'eenho' the alications communicate (or cooerate together) and leads to a case o!saghetti, sho'n in -gure ="=" *n real li!e, most organizations rel% on man% so!t'arealications and the% need to integrate them together" This /saghetti0 kind o!integration is likel% to $ecome unmanagea$le" >aving a lot o! oint to ointconnections acting searatel% !rom each other is not onl% unmanagea$le; it alsomakes /$usiness overvie's0 imossi$le" hat do * mean 'ith /$usiness overvie's0is, i! %ou succeeded in connecting each and ever% s%stem in an insuranceorganization claim rocessing s%stems, %ou1d e&ect to $e a$le to make :ueries like6/>o' man% claims 'ere aroved toda%50"

  • 8/21/2019 BizTalk the Practical Course Code

    3/21

    Figure 1.1: Spaghetti Application Integration.

     This re:uires some /$usiness overvie'0, e&ceeding oint to oint communications" To overcome the ro$lems related to having oint to oint connections, >u$ andSoke *ntegration services 'as invented, sho'n in -gure ="?"

    Architecturall%, a >u$ and Soke *ntegration services are centralized rocessingmachiner% /the hu$0, that accet messages !rom multile alications, the Sokes"Alications interact 'ith the hu$ through adaters delo%ed on the hu$, so thesokes (alications) do not re:uire an% modi-cations" The hu$ manages routing,

    maing and tracking messages $et'een alications" The hu$ and soke moderovide strong total cost o! o'nershi $% reducing the cost to add and removeconnections and through centralized management"

    Figure 1.2: Hub and Spoke.

  • 8/21/2019 BizTalk the Practical Course Code

    4/21

     The hu$ and soke integration services lead to the /u$lish2su$scri$e0 attern" *nthe u$lish2su$scri$e attern, t'o arties communicate 'ithout an% sharedkno'ledge other than the agreement on the message !ormat" These t'o arties areo!ten re!erred to as the roducer and the consumer or @ more aroriatel% in theconte&t o! u$lish su$scri$e @ the /u$lisher0 and the /su$scri$er0" The u$lisheru$lishes its outut using messaging to the u$2su$ engine 'hile the su$scri$er

    su$scri$es itsel! 'ith the engine using a -lter" The -lter, $ased uon messagecontent criteria, seci-es 'hich messages are o! interest to the su$scri$er"

    BizTalk is Microso!t imlementation o! the >u$ and Soke architecture" BizTalk is the>u$ that receives messages !rom the sokes and routes these messages to theirdestinations"

    1.2 How BizTalk Works?

    BizTalk is designed to receive in$ound messages, ass them through some !orm o!logical rocessing, and then deliver the result o! that rocessing to an out$ound

    location or su$s%stem" BizTalk vie's all data and events as /Messages0" A message is a -nite entit% 'ithin the BizTalk MessageBo&" Messages are immuta$le once the%are u$lished to the MessageBo&" Messages have conte&t roerties and zero8to8man% message arts" BizTalk e&tends the idea o! T7P2*P Port to include otherrotocols such as -le, S3 , etc" A Port is either a /receive location0 (i"e" BizTalk'ould listen on this ort !or incoming messages) or a send ort that BizTalk 'ill sendthrough messages" BizTalk grous receive locations into 'hat it calls a /receive ort0and grous send orts into send ort grou (* kno' the naming is a little $itcon!using)" A receive location receives messages using a comonent called /BizTalkAdater0" A BizTalk Adater is a comonent that understands the Transort Protocollike >TTP, .TP etc" The received message is rocessed $% a ieline associated 'iththe receive location" A ieline is a comonent that er!orms trans!ormations on

    messages to reare them to enter or leave BizTalk Server MessageBo& data$ase" *nthe receive locations, the main task o! a receive ieline is to convert inut data intoroer M3" 3ike'ise, in send orts, the main task o! a send ieline is to convertinut data into the roer data !ormat !or the transort rotocol (Adater)"

    Figure 1.3: BizTalk Functional vie.

  • 8/21/2019 BizTalk the Practical Course Code

    5/21

    A receive or send ort can have one or more mas associated 'ith it" A Ma is acomonent that trans!orms a message !rom one M3 schema to another M3Schema" The resulting message is then u$lished to the MessageBo& data$ase" TheMessageBo& evaluates active su$scritions and routes the message to thoseorchestrations, and send orts 'ith matching su$scritions" A su$scrition is acollection o! comarison statements, kno'n as redicates, involving message

    /conte&t0 roerties and the values seci-c to the su$scrition" Su$scritions matcharticular conte&t roerties !or a message and determine endoints (orchestrations,or Send Ports), 'hich are interested in rocessing it" Orchestrations ma% rocess themessage and u$lish messages through the MessageBo& to a send ort 'here it isushed out to its -nal destination" An Orchestration is an e&ecuta$le $usinessrocess ('orkCo') that can su$scri$e to (receive) and u$lish (send) messagesthrough the MessageBo& data$ase"

     The design o! a BizTalk solution $egins 'ith selecting 'hich o! the BizTalk tools to use!or each o! these three simle %et all8imortant tasks (receive, rocess, and send amessage)" *Dll introduce these tools in this chater and continue to e&lore them!urther throughout the rest o! the $ook" .irst, let1s start 'ith a simler overvie'6

      Messaging is a comonent that rovides the a$ilit% to communicate 'ith a rangeo! other so!t'are" BizTalk introduces the concet o! Ports and adaters" Ports andadaters rovide the logical a$straction !or sending and receiving messages to and!rom BizTalk" The% allo' %ou to code %our alication in a generic !ashion and not'orr% a$out the imlementation details o! ho' these messages 'ill $e consumedand delivered" A ort is a logical construct that can receive and send messagesto2!rom the BizTalk MessageBo&" A receive ort must $e associated 'ith a seci-creceive location to accet the message" The receive location is tied to a seci-cadater, 'hich rovides the imlementations o! the Transort rotocol, and aieline" A Pieline rovides a 'a% to e&amine, veri!%, and otentiall% modi!%messages as the% are received and sent out !rom BizTalk" * 'ill discuss Messaging inmore details in chaters ?, , and F"

    • Orchestration engine suorts the creation and running o! grahicall%8de-nedrocesses" Orchestration is the most o'er!ul tool 'ithin the BizTalk Server tool$o&" Think o! orchestrations as a secial !orm o! 'orkCo's similar to the indo'sorkCo's .oundations" Orchestrations are used to grahicall% model rocess'orkCo' and rovide the rimar% mechanism to imlement $usiness rocessautomation 'ithin BizTalk $ased ro+ect" Orchestrations are created 'ithin GisualStudio and comiled into "4ET assem$lies that are registered in the BizTalkManagement Hata$ase" Assem$lies delo%ed to this data$ase must also $e installedinto the Ilo$al Assem$l% 7ache (IA7)" * 'ill discuss Orchestrations in more detail in7hater

  • 8/21/2019 BizTalk the Practical Course Code

    6/21

    • Enterrise Single Sign8On (SSO) !acilit% 'hich rovides the a$ilit% to maauthentication in!ormation $et'een indo's and non8indo's s%stems"

    • Business Activit% Monitoring (BAM) !rame'ork %ou use to $uild tracking andmonitoring into %ou BizTalk $ased solutions" *n!ormation 'orkers 'ill use it to

    monitor the state o! the running $usiness rocesses" Business Activit% Monitoring(BAM) and Business Activit% Services (BAS) rovide the in!rastructure to er!ormalication instrumentation and metric reorting" BAM rovides the a$ilit% toinstrument %our alication to rovide $usiness8level data that is much morerelevant than the de!ault s%stem8level in!ormation 'hich is availa$le in the $aseroduct" * 'ill discuss BAM in chater L"

    • Business Activit% Services (BAS), 'hich is used $% in!ormation 'orkers to setu and manage interactions 'ith transacting artners" BAS rovides a simle %eto'er!ul 'a% to disla% metric data !rom BAM and other s%stem8level su$servicesusing Microso!t SharePoint Portal Services" Most organizations 'ill integrate the BASortal into an e&isting SharePoint in!rastructure rather than $uild an entire

    SharePoint site around BAS itsel!"

    ="?"= >o' the Pu$lish2Su$scri$e mechanism orks5

    9nderstanding the Pu$lish2Su$scri$e mechanism is central to understanding BizTalk" The idea o! su$scrition can $e6

    =" Messages are received (via receive handlers or !rom orchestration Send orts)and handed to the BizTalk engine"

    ?" The engine stores data a$out the message called conte&tual roerties"

    " The engine :ueries a rule store to determine a set o! matching su$scritions"

    F" .or each matched su$scrition, a record is entered into an alication8seci-c:ueue, and is associated 'ith a seci-c instance o! a service"

    " ueued messages are then de8:ueued using a num$er o! searate 'orkerthreads, and routed to the designated instances o! services"

  • 8/21/2019 BizTalk the Practical Course Code

    7/21

    • E&ists

    • IreaterThanOrE:uals"

    • IreaterThan"

    • 3essThanOrE:uals"

    • 3essThan"

    • 4otE:ual"

    Predicates are collected into NAnd1 and NOr1 grous" BizTalk does not allo' thesegrous to $e nested, and there!ore is some'hat constrained in terms o! thesu$scrition rules 'hich otentiall% could $e created" Su$scritions are created $%services, and results in messages $eing routed to orchestrations or send orts"

    ="?"? BizTalk Hata$ases

    hen %ou install and con-gure BizTalk it creates several data$ases in the assignedS3 Server" #ou do not need to have all these data$ases it deends on the !eaturesthat %ou con-gure through the BizTalk 7on-guration that * 'ill discuss in section" The!ollo'ing are mandator% BizTalk data$ases6

    • BizTalk Management data$ase6 This data$ase is the central meta8in!ormationstore !or all instances o! BizTalk Server"

    BizTalk MessageBo& data$ase6 This data$ase is used $% the BizTalk Serverengine !or routing, :ueuing, instance management, and a variet% o! other tasks"

    • BizTalk Tracking data$ase6 This data$ase stores health monitoring datatracked $% the BizTalk Server tracking engine"

    • Jule Engine data$ase6 This data$ase is a reositor% !or6

    o Policies, 'hich are sets o! related rules"

    o Goca$ularies, 'hich are collections o! user8!riendl%, domain8seci-c names !or data re!erences in rules"

    • SSO data$ase6 The Enterrise Single Sign8On data$ase securel% stores thecon-guration in!ormation !or receive locations"

     The !ollo'ing are otional data$ases that $ased on %our con-guration BizTalk 'ouldcreate6

    • BAM Anal%sis6 This data$ase contains Business Activit% Monitoring (BAM)O3AP cu$es !or $oth online and oine anal%sis"

    • BAM Archive6 This data$ase archives old $usiness activit% data" 7reate a BAM

    Archive data$ase to minimize the accumulation o! $usiness activit% data in the BAMPrimar% *mort data$ase"

  • 8/21/2019 BizTalk the Practical Course Code

    8/21

    • BAM 4oti-cation Services Alication data$ase6 This data$ase contains alertin!ormation !or BAM noti-cations" .or e&amle, 'hen %ou create an alert using theBAM ortal, entries are inserted in the data$ase seci!%ing the conditions and eventsto 'hich the alert ertains, as 'ell as other suorting data items !or the alert"

    BAM 4oti-cation Services *nstance data$ase6 This data$ase contains instancein!ormation seci!%ing ho' the noti-cation services connect to the s%stem that BAMis monitoring

    • BAM Primar% *mort data$ase6 This is the data$ase 'here BAM collects ra'tracking data"

    • BAM Star Schema6 This data$ase contains the staging ta$le, and the measureand dimension ta$les"

    •  Tracking Anal%sis Server6 This data$ase stores health monitoring onlineanal%tical rocessing (O3AP) cu$es"

    • indo's SharePoint Services con-guration data$ase6 This data$ase containsall o! the glo$al settings !or the server"

    • indo's SharePoint Services content data$ase6 This data$ase contains all o!the site content, such as list items and documents"

    BizTalk Server runtime oerations t%icall% use BizTalk Server Managementdata$ase, MessageBo& data$ases, tracking data$ase, and SSO data$ase" Heendingon the BizTalk Server !unctionalit% that %ou use, %ou ma% have some or all o! theother data$ases in the ta$le"

    ="?" BizTalk S3 o$s

    BizTalk uses the !ollo'ing S3 o$s and %ou should schedule them to run on the S3server in order to clean the BizTalk MessageBo&Q=R data$ase6

    • Backu BizTalk Server (BizTalkMgmtH$)6 This +o$ er!orms !ull data$ase andlog $ackus o! the BizTalk Server data$ases"

    • 7leanuBT.E&iredEntrieso$BizTalkMgmtH$6 This +o$ cleans u e&iredBizTalk .rame'ork (BT.) entries in the BizTalk Management (BizTalkMgmtH$)

    data$ase"

    • MessageBo&HeadProcesses7leanuBizTalkMsgBo&H$6 This +o$ detects'hen a BizTalk Server host instance (4T service) has stoed and releases all 'orkthat 'as $eing done $% that host instance so that it can $e 'orked on $% anotherhost instance"

    • MessageBo&Message7leanuBizTalkMsgBo&H$6 This +o$ removes allmessages that are no longer $eing re!erenced $% an% su$scri$ers in the BizTalkMessageBo& (BizTalkMsgBo&H$) data$ase ta$les"

    • MessageBo&MessageManageJe!7ount3ogBizTalkMsgBo&H$6 This +o$manages the re!erence count logs !or messages and determines 'hen a message isno longer re!erenced $% an% su$scri$er"

  • 8/21/2019 BizTalk the Practical Course Code

    9/21

    • MessageBo&Parts7leanuBizTalkMsgBo&H$6 This +o$ removes all messagearts that are no longer $eing re!erenced $% an% messages in the BizTalkMessageBo& (BizTalkMsgBo&H$) data$ase ta$les" All messages are made u o! oneor more message arts, 'hich contain the actual message data"

    MessageBo&9dateStatsBizTalkMsgBo&H$6 This +o$ manuall% udates thestatistics !or the BizTalk MessageBo& (BizTalkMsgBo&H$) data$ase"

    • PurgeSu$scritionso$BizTalkMsgBo&H$6 This +o$ urges unused su$scritionredicates !rom the BizTalk Server MessageBo& (BizTalkMsgBo&H$) data$ase"

    1.2.3.1 How to activate and schedule these o!s?

    B% de!ault these o$s are ena$led and scheduled to run at Midnight" #ou might 'antto change these schedules deending on the schedules %ou setu !or the dataconversion rocessing discussed earlier"

    Figure 1.!: S"# $anage%ent Studio

    Start Microso!t S3 Management Studio select S3 Server Agent and e&and o$s assho'n in -gure ="F" #ou 'ill -nd the +o$s de-ned there" To change a +o$ scheduleright click on the +o$ and select roerties, sho'n in -gure ="" Select schedules andthe select edit to edit the schedule"

    1.3 "!out BizTalk 2##$

     The ne' BizTalk ?L have man% imrovements over the BizTalk ?< J?, most

    imortantl% is the !ull suort !or indo's ?, Gisual Studio ? and >%er8Gtechnologies" 9dated 'ith "4et " !rame'ork SP= and imroved .ailover 7lusteringthat can $e delo%ed in multi8site cluster scenarios, 'here cluster nodes could resideon searate *P su$nets and avoid comlicated G3A4s" Business Activit% Monitoringhas $een enhanced to suort scala$le real8time aggregations" EH* and AS?Protocols no' suort multile message attachments, con-gura$le auto messageresend, end8to8end -lename reservation, imroved reorting to address ne'!eatures, and Hrummond re8certi-cation !or AS?" 7omlete suort !or Alication3i!ec%cle Management (A3M) 'ith Microso!t Team .oundation Server (T.S)"

  • 8/21/2019 BizTalk the Practical Course Code

    10/21

    Figure 1.&: S"# 'ob (ropertie).

    Most imortantl% !or develoers is the enhanced de$ugging suort !or arti!actssuch as BizTalk Mas (S3T), ieline comonents and 3A4I Orchestrations, andena$les suort !or unit testing via Gisual Studio Test" And the imroved recovera$leinterchange rocessing o! validation !ailures $% roviding suort !or recovera$leinterchange rocessing !or disassem$l% (HASM) and a validation stage 'ithin theieline" .inall%, the 7. Adater is enhanced to rovide suort !or con-gura$letransactions and the a$ilit% to choose the transaction isolation level in the 7.87ustom Send Adater"

    1.% Buildin& the 'evelo()ent environ)ent

    ="F"= BizTalk ?< J? Heveloment Environment

     The develoment environment that * am using !or the samles accoman%ing this$ook !or the BizTalk ?< J? is $ased on a virtual machine" #ou 'ill need to $uild asimilar environment in order !or %ou to !ollo' 'ith the e&amles and 'alkthroughs inthe $ook" #ou 'ill need to install the !ollo'ing $e!ore install BizTalk ?< J?"

    • indo's ? Server"

    • indo's Share Point services,

    • MS E&cel,

  • 8/21/2019 BizTalk the Practical Course Code

    11/21

    • MS S3 Server ?, and

    • Gisual Studio ?"

    A!ter running the installation o! BizTalk ?< J?, the installation ackage 'ill start

    the BizTalk 7on-guration alication" #ou need to con-gure the BizTalk ?< J?server 'ith the S3 server %ou are using and the users and user grous $e!ore %oucan use it" *n 7hater L, * 'ill discuss the details o! the in!rastructure !or a BizTalk?< J? environment" >o'ever !or running the samles %ou can use the /de!aultcon-guration0 otion in the BizTalk 7on-guration tool" This otion assumes that %ouare using a local S3 Server" #ou can -nd more in!ormation a$out ho' to install andcon-gure BizTalk on MSH4"

    A!ter %ou have installed and con-gure BizTalk ?< J?, %ou 'ill $e a$le to see theBizTalk Administration Tool, >ealth and Activit% Tracking Tool, and Business Jules7omoser on the ProgramsUMicroso!t BizTalk ?< Server Start menu" #ou 'ill alsonotice that BizTalk Pro+ect aear in Gisual Studio as an otion !or creating ne'

    ro+ects" Section =" introduces %ou to the 9* tools and comonents that come 'ithBizTalk Server"

    ="F"? BizTalk ?L Heveloment Environment

     The develoment environment that * am using in this $ook !or the BizTalk ?LSamles is $ased on a h%sical 'indo's ? environment; ho'ever %ou can use avirtual machine" #ou 'ill need to $uild a similar environment in order !or %ou to!ollo' 'ith the e&amles in the $ook" #ou 'ill need to install the !ollo'ing $e!ore %ouinstall BizTalk ?L6

    • indo's Share Point services " 'ith service ack =,

    • MS E&cel,

    • MS S3 Server ?, and

    • Gisual Studio ?"

    Be!ore *nstalling BizTalk ?L Beta %ou should -rst read the Microso!t document/*nstalling and 7on-guring BizTalk Server ?L (Beta)0" A!ter running the installationo! BizTalk, the installation ackage 'ill start the BizTalk 7on-guration alication" #ouneed to con-gure the BizTalk server 'ith the S3 server %ou are using and the usersand user grous $e!ore %ou can use it" .igure ="< sho's the con-guration userinter!ace !or BizTalk ?L"

  • 8/21/2019 BizTalk the Practical Course Code

    12/21

    Figure 1.*: BizTalk 2++, -onguration.

    A!ter %ou have installed and con-gured BizTalk, %ou 'ill $e a$le to see the BizTalk

    Administration Tool, >ealth and Activit% Tracking Tool, Business Jules 7omoser onthe ProgramsUMicroso!t BizTalk Server ?L Start menu" #ou 'ill also notice thatBizTalk Pro+ect aears in Gisual Studio as an otion !or creating ne' ro+ects"Section ="< introduces %ou to the 9* tools and comonents that come 'ith BizTalkServer"

    1.* 'evelo(in& BizTalk Proects Basics

    hen %ou install BizTalk on %our develoment environment BizTalk 'ill add severalcomonents to Gisual Studio" The -rst thing %ou should notice is the ne' BizTalkPro+ects temlates in the 4e' Pro+ect dialog, sho'n in -gure ="K"

  • 8/21/2019 BizTalk the Practical Course Code

    13/21

    Figure 1./: BizTalk (ro0ect) in i)ual Studio.

     These temlates allo' %ou to :uickl% create BizTalk ro+ects" The Emt% BizTalkServer Pro+ect temlate is the one that %ou 'ill use the most" .igure ="< sho's %ou'hat the created ro+ect 'ould look like" *t is a regular "4et class li$rar% 'ithre!erence to a !e' BizTalk assem$les that ena$les the integration 'ith BizTalk"

    Figure 1.: %pt4 BizTalk (ro0ect.

    *n Gisual Studio ? 'ith BizTalk ?L the roerties are disla%ed as sho'n in-gure ="L" These are the same as 'ith Gisual Studio ? and BizTalk ?< sho'n in.igure ="=, the onl% dierence is in the 9* look and !eel"

  • 8/21/2019 BizTalk the Practical Course Code

    14/21

    Figure 1.,: BizTalk (ro0ect (ropertie) in i)ual Studio 2++.

    A !e' details %ou should $e concerned 'ith6

    =" Signing the Assem$l%6 %ou should al'a%s make sure that an% BizTalk ro+ectassem$lies are signed and an% assem$lies the% re!erence are signed and delo%edto Ilo$al Assem$l% 7ache (GAC)"

    ?" The BizTalk Irou settings in Gisual Studio ? or delo%ment in GisualStudio ? are set to %our BizTalk develoment environment" *t is a good ractice toget into the ha$it o! setting an alication name !or the ro+ect that %ou develo andnot delo% to the de!ault /BizTalk Alication =0"

    Figure 1.1+: BizTalk (ro0ect (ropertie) in i)ual Studio 2++&.

  • 8/21/2019 BizTalk the Practical Course Code

    15/21

    4o' %ou are read% to add arti!acts to %our BizTalk Pro+ect" The arti!acts can $eSchema, Pieline, Ma, or Orchestration" #ou +ust right click on the ro+ect and selectadd ne' item and select one o! the items in the dialog as sho'n in -gure ="=="

    A!ter %ou are -nished adding the arti!acts %ou can $uild or delo% the ro+ect 'ith asingle click" *! %ou right clicked on the ro+ect and selected /Helo%0, Gisual Studio'ill check the $uild status o! the ro+ect and i! the ro+ect is not $uilt it 'ill tr% to$uild it" *! the ro+ect is success!ull% $uilt Gisual Studio 'ill /Helo%0 it to the BizTalkIrou %ou set in -gure ="K and ="" Helo% means that visual studio 'ould IA7 theassem$l% to the local comuter IA7 and add an entr% into the BizTalk IrouManagement data$ase"

    Figure 1.11: Add 5e Ite% 6or BizTalk (ro0ect in i)ual Studio 2++.

    *! the $uild and delo% goes -ne %ou 'ill see in the outut something similar to3isting ="=" 4ote that * have edited the listing to kee it short"

    +istin& 1.1

    7ollase V Copy Code

    88888

    Build started6 Pro+ect6BTSPrac7ourse"Schemas"Samle, 7on-guration6 He$ug An% 7P9 888888

    BTSPrac7ourse"Schemas"Samle8W 76XHevelomentXBTSPrac7ourseXPracBTS?LXBTSPrac7ourse"Schemas"SamleX$inXHe$ugX

    888888Helo% started6 Pro+ect6BTSPrac7ourse"Schemas"Samle, 7on-guration6 He$ug An% 7P9 888888

    """

    6 Helo% oeration succeeded"

    6 Helo%ed the !ollo'ing = BizTalk assem$lies6

    http://www.codeproject.com/Articles/35877/BizTalk-The-Practical-Course-Codehttp://www.codeproject.com/Articles/35877/BizTalk-The-Practical-Course-Codehttp://www.codeproject.com/Articles/35877/BizTalk-The-Practical-Course-Code

  • 8/21/2019 BizTalk the Practical Course Code

    16/21

    BTSPrac7ourse"Schemas"Samle"dllYYYYYYYYYYBuild6 = succeeded or u8to8date, !ailed, skied YYYYYYYYYYYYYYYYYYYYHelo%6 = succeeded, !ailed, skied YYYYYYYYYY

    ,1.- BizTalk / Tools

    BizTalk comes 'ith several user inter!ace tools to !acilitate the administration,con-guration, delo%ment and develoment o! BizTalk Based Solutions" The 9* Toolsare6

    • BizTalk Administration 7onsole is used to manage BizTalk alications,lat!orm settings, arti!acts and other BizTalk comonents" * 'ill discuss it in more inthe section ?"F"="

    >ealth and Activit% Monitor used to monitor the health o! %our BizTalk Serverdata" * 'ill discuss >AT in more detail in section ?"F"?"

    • BizTalk E&lorer 'hich is a Gisual Studio add8in tool 'indo' that is similar tothe !amiliar Server E&lorer tool 'indo' in Gisual Studio" *t disla%s the contents o! aBizTalk Management data$ase" #ou use it to administer BizTalk !rom Gisual Studio? 'ithout having to go to the BizTalk Administration 7onsole" The BizTalk E&loreris still availa$le 'ith ?L ho'ever it is dereciated and its use is not encouraged"

    • Business Jules 7omoser used to create and modi!% olicies andvoca$ularies" * 'ill discuss the Business Jules 7omoser 'hen 'e e&lore the rulesengine in chater K"

    • Business Jules Helo%ment izard used to delo% the olicies andvoca$ularies to a BizTalk server" * 'ill discuss the Business Jules Helo%ment izard'hen 'e discuss the rules engine in chater K"

    • e$ Services Pu$lishing izard used to create and modi!% BizTalk e$service"

    • 7. Services Pu$lishing izard used to create and modi!% BizTalk 7.service"

    •  #ou use the Tracking Pro-le Editor to e&tract the data the $usiness anal%stre:uires and to er!orm the maing $et'een the seci-c $usiness event data andthe actual orchestration" * 'ill discuss the Tracking Pro-le Editor in 7hater "

     Throughout the $ook 'hen * am discussing BizTalk !eatures that al% to $oth ?<J? and ?L * 'ill re!er to it as BizTalk onl%, and * 'ill e&licitl% mention the version'hen discussing seci-cs that al% to one version onl%"

    ="

  • 8/21/2019 BizTalk the Practical Course Code

    17/21

    .igure ="=? sho's the Administration 7onsole grouing logical items (called arti!actsused in a BizTalk Server $usiness solution) in 'hat is called a BizTalk alication"Arti!acts are6

    • BizTalk assem$lies and the BizTalk8seci-c resources containing6

    orchestrations, ielines, schemas, and mas"

    • "4et assem$lies that do not contain BizTalk8seci-c resources"

    • Policies"

    • Send orts, send ort grous, receive locations, and receive orts"

    • Other items that are used $% the solution, such as certi-cates, 7OMcomonents, and scrits"

    Figure 1.12: BizTalk Ad%ini)tration -on)ole.

    *! %ou e&anded the Plat!orm Settings node in the Administration console, as sho'n

    in -gure ="=, %ou 'ill see t'o imortant items6 />osts and >ost *nstances0 A BizTalkhost is nothing more than a logical container"

  • 8/21/2019 BizTalk the Practical Course Code

    18/21

    Figure 1.13: (lat6or% )etting).

    A host de-nes 'hich adaters, orchestrations, and orts are going to run in itsconte&t and under its securit% conte&t" A host instance is +ust that, an instance o! thehost" The instance is actuall% +ust a service that runs on the machine calledBTS4TSvc"e&e" This rocess rovides the BizTalk engine a lace to e&ecute, andallo's !or instances o! dierent hosts to $e running on one machine at a given time"Each host 'ill end u $eing a searate instance o! the BTS4TSvc"e&e service !rom

    'ithin the indo's Task Manager"

    ="

  • 8/21/2019 BizTalk the Practical Course Code

    19/21

    Figure 1.1!: Health and Activit4 Tracking 7HAT8.

     #ou use >AT to de$ug orchestration $% running an instance o! an orchestration thenright click on it and select orchestration de$ugger sho'n in -gure ="=" #ou can alsouse >AT to see the message Co' o! a message $% right clicking on the message andselecting message Co' sho'n in -gure ="=o' 'ould %ou organize a BizTalk Based solution5 *n general, %ou should al'a%sstrive to design the BizTalk solution to $e la%ered as .igure ="=K sho's, designing thesolution in a la%ered manner simli-es the ro+ect and makes it easier to maintain"

    Figure 1.1&: 9rche)tration ebugger.

  • 8/21/2019 BizTalk the Practical Course Code

    20/21

    Figure 1.1*: $e))age Flo.

     #ou can design the solution to consist o! at least the !ollo'ing three la%ers6

    =" E&ternal *nter!ace 3a%er6 this la%er contains all dierent mas, ielines,

    schemas that 'ould consume e&ternal data !eeds and convert them to a uni-edinternal schema that is internal to %our enterrise" This can $e imlemented in a H33or several H33S, one H33 er !eed, or several H33s er !eed" *t deends on %oursolution, !uture changes (ne' third arties, e&ternal s%stems etc)"

    ?" The Business 3ogic 3a%er6 this is 'here all the $usiness logic getsimlemented in orchestrations, mas, $usiness rule olices, etc"

    " Enterrise S%stem *nter!ace6 This la%er is similar to the E&ternal *nter!acela%er e&cet it is !or internal s%stems in the enterrise"

     #ou should note that 'e are al'a%s changing to a uni-ed or a simle schema internalto the s%stem" * have seen man% BizTalk solutions 'here the% had so man%orchestrations or mas er!orming the same logic onl% $ecause the third art%sulied dierent schemas" On an% BizTalk solution %ou should strive to6

    =" Ma&imize the use o! the BizTalk out8o!8$o& !eatures, and utilities,

    ?" Minimize the amount o! code (this includes, custom ieline comonents,custom adaters, custom li$raries, etc), and

    " Pre!er to $u% comonents that are not out o! the $o& !rom BizTalk thandeveloing them"

  • 8/21/2019 BizTalk the Practical Course Code

    21/21

    As !or structuring the code, there is no single ans'er to -t ever% solution" There is atendenc% $% man% BizTalk develoers to ut the schemas, mas, orchestrations, andielines in searate ro+ects" This is not suita$le !or large, medium and sometimesnot even !or small solutions" hen %ou are structuring the solution code, %ou shouldconsider delo%ment o! the H33s and other arti!acts, as 'ell as the modularit% o! thesolution"

    Figure 1.1/: ;eneral BizTalk Ba)ed Solution.

    .or e&amle, adding ne' artners and additional !unctionalit% should $e made eas%" #ou should also consider minimizing the deendenc% $et'een develoers" .ore&amle, 'hen all the% develoers 'orking on the same ro+ect, the% ma% hindereach other1s rogress" Also i! one develoer is secialized in schemas, then otherdeveloers $ecome deendent on her and 'aiting !or her to -nish the schemas so

    that the% could start"

    4ote6 The names o! the +o$s change deending on the data$ase names given duringcon-guration" *! %ou have delo%ed multile MessageBo& data$ases in %ourenvironment, there 'ill $e several +o$s !or each MessageBo&"