<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Keith Lim's Biztalk BAM Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/keithlim/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/keithlim/feed.xml</link>
    <description>BizTalk BAM 
TPE 
EventStream
MessagingEventStream
DirectEventStream
BufferedEventStream 
OrchestrationEventStream</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:23:07 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>BAM continuation between WF/WCF application and BizTalk application</title>
      <link>https://docs.microsoft.com/archive/blogs/keithlim/bam-continuation-between-wfwcf-application-and-biztalk-application</link>
      <pubDate>Thu, 05 Jul 2007 15:36:00 GMT</pubDate>
      <dc:creator><![CDATA[keithlim]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/keithlim/2007/07/05/bam-continuation-between-wfwcf-application-and-biztalk-application/</guid>
      <description><![CDATA[Awhile back a user asked me this question on BAM continuation from a WF/WCF application to a BizTalk...]]></description>
      <content:encoded><![CDATA[<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>Awhile back a user asked me this question on BAM continuation from a WF/WCF application to a BizTalk application: </FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><FONT face="Times New Roman" size=3><STRONG>I have a process which starts a workflow and then an orchestration. I want to create an activity cross the workflow and the orchestration. So I create a ContinuationToken in the WF IC and create a ContinuationID in the Orchestration TPE. However, it does not seem work. The data from WF and the data from Orch are written into two records in the Completed table.</STRONG></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><o:p><FONT face="Times New Roman" size=3><STRONG>&nbsp;</STRONG></FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><FONT face="Times New Roman" size=3><STRONG>My questions are:</STRONG></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><FONT face="Times New Roman" size=3><STRONG>Is it possible for continuation to happen between WF/WCF and Orchestration? What specific steps I should be aware in order for that to happen? Any sample?</STRONG></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>Here is my answer: <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>if you have a WCF data that is also available (flowed to) Biztalk Orchestration, you can use it to form a continuation token. &nbsp;&nbsp;The important piece of information here is that <B>you must prefix it with a constant and the constant must be the same name as the ContinuationID folder</B>. </FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>Here is a snippet of IC for a WCF application, in this continuation token node. Here the TokenID will be something like WCF2Orch1PO123 if POID contains PO123. </FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ic:ContinuationToken&gt;</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ic:Expression&gt;</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ic:Operation Name="Constant"&gt;</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ic:Argument&gt;<SPAN style="BACKGROUND: yellow">WCF2Orch1</SPAN>&lt;/ic:Argument&gt;</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/ic:Operation&gt;</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;wcf:Operation Name="XPath"&gt;</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;wcf:Argument&gt;//s:Body//po:POID&lt;/wcf:Argument&gt;</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/wcf:Operation&gt;</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ic:Operation Name="Concatenate" /&gt;</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/ic:Expression&gt;</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/ic:ContinuationToken&gt;</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>In the TPE, you would then need to create a <B>ContinuationID folder and rename it to “WCF2Orch1”</B> and map the value under it to a piece of data that contains the flowed value of PO123.</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN style="mso-ansi-language: EN"><FONT size=3><FONT face="Times New Roman">*&nbsp; When you deploy the tracking profile, you will get a warning that the tracking profile is missing the Continuation folder, but since we know what we are doing :), just ignore and proceed.<o:p></o:p></FONT></FONT></SPAN></P>]]></content:encoded>
    </item>
    <item>
      <title>Steps to facilitate the creation of WCF Interceptor Configuration file.</title>
      <link>https://docs.microsoft.com/archive/blogs/keithlim/steps-to-facilitate-the-creation-of-wcf-interceptor-configuration-file</link>
      <pubDate>Thu, 28 Jun 2007 21:56:00 GMT</pubDate>
      <dc:creator><![CDATA[keithlim]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/keithlim/2007/06/28/steps-to-facilitate-the-creation-of-wcf-interceptor-configuration-file/</guid>
      <description><![CDATA[The BAM Interceptor for WCF does not come with a UI tool to create the Interceptor Configuration...]]></description>
      <content:encoded><![CDATA[<P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Calibri>The BAM Interceptor for WCF does not come with a UI tool to create the Interceptor Configuration file, and from the Beta II customer feedback thus far, this is the main pain point as well.<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>I will try to provide some steps and guidelines to help ease this concern.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN></FONT></FONT></P>
<P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p><FONT face=Calibri size=3>&nbsp;</FONT></o:p></P>
<P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"><FONT face=Calibri size=3>A common scenario is when the WCF application configuration file is updated and the IC is created and deployed, there is not data intercepted and persisted into the BAM PITDB (Primary Import Tables Database).<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>When the event log is checked out without error and that the bm.exe deploy-interceptor is successful, most likely the culprit is in the IC – somewhere in the IC, the XPath is incorrectly set. </FONT></P>
<P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Calibri size=3>&nbsp;</FONT></o:p></P>
<P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"><B style="mso-bidi-font-weight: normal"><U><FONT size=3><FONT face=Calibri>Here is what I would do:<o:p></o:p></FONT></FONT></U></B></P>
<P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Calibri size=3>&nbsp;</FONT></o:p></P>
<P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"><FONT face=Calibri size=3>Enable WCF logging/tracing to produce the wcf log.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>In the config file of the “interceptee” application (either or both client and service), splice the following highlighted code. </FONT></P>
<P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Calibri size=3>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="COLOR: #1f497d"><FONT face=Calibri size=3>&lt;configuration&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp; &lt;system.serviceModel&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face=Calibri size=3></FONT>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="COLOR: #1f497d"><FONT size=3><FONT face=Calibri>&nbsp;&nbsp;&nbsp; <SPAN style="BACKGROUND: yellow">&lt;diagnostics&gt;</SPAN></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;messageLogging maxMessagesToLog="30000" </FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logEntireMessage="true" </FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logMessagesAtServiceLevel="true" </FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logMalformedMessages="true" </FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logMessagesAtTransportLevel="true"&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;/messageLogging&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp; &lt;/diagnostics&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face=Calibri size=3></FONT>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp; &lt;/system.serviceModel&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face=Calibri size=3></FONT>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="COLOR: #1f497d"><FONT size=3><FONT face=Calibri>&nbsp; <SPAN style="BACKGROUND: yellow">&lt;system.diagnostics&gt;</SPAN></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face=Calibri size=3></FONT>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp; &lt;sources&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;source name="System.ServiceModel" switchValue="Verbose, ActivityTracing" &gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;listeners&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;add name="xml" /&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/listeners&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/source&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;source name="System.ServiceModel.MessageLogging" switchValue="Verbose"&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;listeners&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;add name="xml" /&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/listeners&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/source&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;source name="Microsoft BizTalk Bam Interceptors" switchValue="All" &gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;listeners&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;add name="xml"/&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;add name="myListener" type="System.Diagnostics.TextWriterTraceListener" </FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; initializeData="TextWriterOutput.log" /&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/listeners&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face=Calibri size=3></FONT>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/source&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face=Calibri size=3></FONT>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp; &lt;/sources&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face=Calibri size=3></FONT>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp; &lt;sharedListeners&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;add name="xml"</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type="System.Diagnostics.XmlWriterTraceListener"</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; initializeData="Traces.e2e" /&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp; &lt;/sharedListeners&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp;&nbsp;&nbsp; &lt;trace autoflush="true" /&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="BACKGROUND: yellow; COLOR: #1f497d"><FONT face=Calibri size=3>&nbsp; &lt;/system.diagnostics&gt;</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="COLOR: #1f497d"><FONT face=Calibri size=3>&lt;/configuration&gt;</FONT></SPAN></P>
<P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Calibri size=3>&nbsp;</FONT></o:p></P>
<P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Calibri size=3>&nbsp;</FONT></o:p></P>
<P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"><FONT face=Calibri size=3>Rerun the application.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>This should generate a WCF trace file: *.e2e. </FONT></P>
<P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Calibri>Use the SvcTraceViewer.exe tool (comes with WCF SDK installation) to view the wcf log and copy out the message into a .xml file. <SPAN style="mso-spacerun: yes">&nbsp;</SPAN></FONT></FONT></P>
<P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Calibri size=3>&nbsp;</FONT></o:p></P>
<P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"><o:p><IMG src="https://blogs.msdn.com/keithlim/attachment/3595759.ashx" mce_src="https://blogs.msdn.com/keithlim/attachment/3595759.ashx">&nbsp;</o:p></P>
<P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></P>
<P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></P>
<P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p><FONT face=Calibri size=3>Here in this snapshot of the tool, you should copy out the s:envelop node.&nbsp;</FONT></P>
<P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Calibri size=3>&nbsp;</FONT></o:p></P>
<P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"><FONT face=Calibri size=3>Use and xpath tool (such as VisualXPath) to drill down to the specific area of the message to produce a valid XPath.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Copy and past this into the interceptor configuration file. </FONT></P>
<P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Calibri size=3>&nbsp;</FONT></o:p></P>
<P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"><FONT face=Calibri size=3>Redeploy the IC and rerun the application. </FONT></P>
<P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Calibri size=3>&nbsp;</FONT></o:p></P>
<P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"><FONT face=Calibri size=3>Hopefully the above steps would help surface the problematic XPaths in the IC and speed up your work. </FONT></P>
<P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Calibri size=3>&nbsp;</FONT></o:p></P>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/03/59/57/59/SvcTraceViewer1.JPG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-03-59-57-59/SvcTraceViewer1.JPG">SvcTraceViewer1.JPG</a></p>]]></content:encoded>
    </item>
    <item>
      <title>BAM Interceptor for WCF</title>
      <link>https://docs.microsoft.com/archive/blogs/keithlim/bam-interceptor-for-wcf</link>
      <pubDate>Thu, 28 Jun 2007 19:01:00 GMT</pubDate>
      <dc:creator><![CDATA[keithlim]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/keithlim/2007/06/28/bam-interceptor-for-wcf/</guid>
      <description><![CDATA[Many of you guys are eagerly anticipating the release of the Microsoft BizTalk Server 2006 R2… and...]]></description>
      <content:encoded><![CDATA[<P class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">Many of you guys are eagerly anticipating the release of the Microsoft BizTalk Server 2006 R2… and the only definite answer to that is it will be available in Q3 of 2007. <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>In the meantime, the Beta 2 release of it can be downloaded from this link: </SPAN><A href="https://connect.microsoft.com/"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">https://connect.microsoft.com/</SPAN></A><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">In this series of blogs I will again as usual, delve on the BAM side of BizTalk offering and answer any questions from you.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>In R2, there are two new interceptors added, namely the BAM Interceptor for WCF (Windows Communication Foundation) and the BAM Interceptor for WF (Windows Workflow Foundation).<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>Of the two new interceptors, I will, for the time being, concentrate on the WCF Interceptor.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>To find out more on WF Interceptor, please checkout my colleague, Andy Shen’s blog site: </SPAN><A href="https://blogs.msdn.com/andyshen/"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">https://blogs.msdn.com/andyshen/</SPAN></A><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">Before I get into the BAM Interceptor for WCF, here is a summary of some howto’s from my past entries to those who are new to Biztalk BAM:<o:p></o:p></SPAN></P>
<UL type=disc>
<LI class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo1; tab-stops: list .5in"><A href="https://blogs.msdn.com/keithlim/archive/2005/10/25/484421.aspx"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">Introduction and means to BAM-enabled a business process</SPAN></A><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">.<o:p></o:p></SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo1; tab-stops: list .5in"><A href="https://blogs.msdn.com/keithlim/archive/2006/01/30/519617.aspx"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">Writing BAM events that are transactionally consistent with BizTalk pipelines using MessagingEventStream</SPAN></A><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">.<o:p></o:p></SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo1; tab-stops: list .5in"><A href="https://blogs.msdn.com/keithlim/archive/2006/02/08/528023.aspx"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">Writing BAM events that are transactionally consistent with BizTalk orchestration using OrchestrationEventStream</SPAN></A><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">.<o:p></o:p></SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo1; tab-stops: list .5in"><A href="https://blogs.msdn.com/keithlim/archive/2006/02/08/527227.aspx"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">Continuation scenarios with mix of TPE-enabled and BAM &nbsp;EventStream API tracking</SPAN></A><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">.<o:p></o:p></SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo1; tab-stops: list .5in"><A href="https://blogs.msdn.com/keithlim/archive/2006/03/08/545851.aspx"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">Programmatically retrieving data from BAMPrimaryImport database using supportable API</SPAN></A><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">.<o:p></o:p></SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo1; tab-stops: list .5in"><A href="https://blogs.msdn.com/keithlim/archive/2006/02/08/528006.aspx"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">Programmatically retrieving server and database info of Biztalk MessageBox and BAM PrimaryImport database</SPAN></A><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">.<o:p></o:p></SPAN></LI></UL>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">So what is this BAM Interceptor for WCF?</SPAN></B><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>In a nutshell, it extends the capability of BAM interception to any WCF application of it message without having to recompile the WCF application.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>(This is analogous to using BAM Tracking Profile Editor to map and enable interception on BizTalk application without having to recompile the BizTalk application.) <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">The integration of WCF application and BAM interception is achieved through WCF configuration file by adding a custom behavior to the WCF application endpoint node. <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>A separate file called IC (Interceptor Configuration) is required to filter and map WCF data of interest to corresponding BAM activity.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">Where in WCF application are the data intercepted?</SPAN></B><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>It supports the following interception points for WCF client, service and callback applications:<o:p></o:p></SPAN></P>
<P class=MsoListParagraphCxSpFirst style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-add-space: auto; mso-list: l1 level1 lfo3"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><SPAN style="mso-list: Ignore">·<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">Before the method call (Request)<o:p></o:p></SPAN></P>
<P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-add-space: auto; mso-list: l1 level1 lfo3"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><SPAN style="mso-list: Ignore">·<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">After the method call (Reply)<o:p></o:p></SPAN></P>
<P class=MsoListParagraphCxSpLast style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-add-space: auto; mso-list: l1 level1 lfo3"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><SPAN style="mso-list: Ignore">·<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">When the fault occurs in method call (Fault) <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">What can be intercepted?</SPAN></B><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Basically, anything you can see in the soap envelope can be tracked, but more often than not, you are interested in the data in the soap body where information of the method parameters is located. <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><U><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">Here are the basic steps to enable BAM interception for a WCF application:<o:p></o:p></SPAN></U></P>
<P class=MsoListParagraphCxSpFirst style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-add-space: auto; mso-list: l2 level1 lfo2"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore">1.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">Create BAM activity and deploy. <o:p></o:p></SPAN></P>
<P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-add-space: auto; mso-list: l2 level1 lfo2"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore">2.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">On a WCF application, update its config file.<o:p></o:p></SPAN></B></P>
<P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-add-space: auto; mso-list: l2 level1 lfo2"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore">3.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">Create a corresponding IC file and deploy.<o:p></o:p></SPAN></B></P>
<P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-add-space: auto; mso-list: l2 level1 lfo2"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore">4.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">Execute the application. <o:p></o:p></SPAN></P>
<P class=MsoListParagraphCxSpLast style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-add-space: auto; mso-list: l2 level1 lfo2"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore">5.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">View data in Portal. <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">Only step 2 are 3 are new to this release and you can see details information on this in the BizTalk Server Documentation under the heading (I will update this to online link when it is available): <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">Business Process Management | Using Business Activity Monitoring | Implementing BAM Solutions | Using the BAM WCF and WF Interceptors<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><U><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">Additional resource:<o:p></o:p></SPAN></U></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">MSDN forum specific for Microsoft BAM: </SPAN><A href="https://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=1473&amp;SiteID=1"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">https://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=1473&amp;SiteID=1</SPAN></A><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">To be continued…<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'"><o:p>&nbsp;</o:p></SPAN></P>
<P><A href="https://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=1473&amp;SiteID=1"></A>&nbsp;</P>]]></content:encoded>
    </item>
    <item>
      <title>How to programatically retrieve data from BAMPrimaryImport using supportable API</title>
      <link>https://docs.microsoft.com/archive/blogs/keithlim/how-to-programatically-retrieve-data-from-bamprimaryimport-using-supportable-api</link>
      <pubDate>Tue, 07 Mar 2006 20:53:00 GMT</pubDate>
      <dc:creator><![CDATA[keithlim]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/keithlim/2006/03/07/how-to-programatically-retrieve-data-from-bamprimaryimport-using-supportable-api/</guid>
      <description><![CDATA[Eventhough there are Portal UI and Excel that would allow you to query and access BAM activity data,...]]></description>
      <content:encoded><![CDATA[<P>Eventhough there are Portal UI and Excel that would allow you to query and access BAM activity data, it seems that there are some of you who would like to programmatically access/query this data from a custom application. </P>
<P>In&nbsp;BizTalk Server Documentation, currently in its&nbsp;2006 pre-released version, you will find&nbsp;information on the&nbsp;BAMManagementService API.&nbsp;&nbsp;(Under Technical Reference | Developers Reference | BizTalk Server 2006 .Net Class Reference | Microsoft.BizTalk.Bam.Webservices.Management&nbsp;).&nbsp;</P>
<P>The&nbsp;BamManagementService class is what we are interested. This is a webservice API and you can also see its methods by pointing to the box where Biztalk is installed.&nbsp;(replace localhost with the machine name in the link below).&nbsp;</P>
<P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'MS Sans Serif'"><A href="https://localhost/BAM/BamManagementService/BamManagementService.asmx">https://localhost/BAM/BamManagementService/BamManagementService.asmx</A></SPAN></P>
<UL>
<LI><A href="https://localhost/BAM/BamManagementService/BamManagementService.asmx?op=AddSubscription"><FONT color=#336699>AddSubscription</FONT></A> 
<LI><A href="https://localhost/BAM/BamManagementService/BamManagementService.asmx?op=CreateAlert"><FONT color=#336699>CreateAlert</FONT></A> 
<LI><A href="https://localhost/BAM/BamManagementService/BamManagementService.asmx?op=DeleteAlert"><FONT color=#336699>DeleteAlert</FONT></A> 
<LI><A href="https://localhost/BAM/BamManagementService/BamManagementService.asmx?op=GenerateEventForArtifact"><FONT color=#336699>GenerateEventForArtifact</FONT></A> 
<LI><A href="https://localhost/BAM/BamManagementService/BamManagementService.asmx?op=GetAlert"><FONT color=#336699>GetAlert</FONT></A> 
<LI><A href="https://localhost/BAM/BamManagementService/BamManagementService.asmx?op=GetAlertsSummary"><FONT color=#336699>GetAlertsSummary</FONT></A> 
<LI><A href="https://localhost/BAM/BamManagementService/BamManagementService.asmx?op=GetCapabilities"><FONT color=#336699>GetCapabilities</FONT></A> 
<LI><A href="https://localhost/BAM/BamManagementService/BamManagementService.asmx?op=GetPivotViewXml"><FONT color=#336699>GetPivotViewXml</FONT></A> 
<LI><A href="https://localhost/BAM/BamManagementService/BamManagementService.asmx?op=GetReferences"><FONT color=#336699>GetReferences</FONT></A> 
<LI><A href="https://localhost/BAM/BamManagementService/BamManagementService.asmx?op=GetRelatedActivityInstances"><FONT color=#336699>GetRelatedActivityInstances</FONT></A> 
<LI><A href="https://localhost/BAM/BamManagementService/BamManagementService.asmx?op=GetViewDetailsAsXml"><FONT color=#336699>GetViewDetailsAsXml</FONT></A> 
<LI><A href="https://localhost/BAM/BamManagementService/BamManagementService.asmx?op=GetViewSummaryForCurrentUser"><FONT color=#336699>GetViewSummaryForCurrentUser</FONT></A> 
<LI><A href="https://localhost/BAM/BamManagementService/BamManagementService.asmx?op=RemoveSubscription"><FONT color=#336699>RemoveSubscription</FONT></A> 
<LI><A href="https://localhost/BAM/BamManagementService/BamManagementService.asmx?op=UpdateAlert"><FONT color=#336699>UpdateAlert</FONT></A> 
<LI><A href="https://localhost/BAM/BamManagementService/BamManagementService.asmx?op=UpdateSubscription"><FONT color=#336699>UpdateSubscription</FONT></A> </LI></UL>
<P>For example, the above GetViewSummaryForCurrentUser would allow you to retrieve all views that the user has access.&nbsp; And it would allow you to retrieve the activity names from there.&nbsp; See code example in help doc for this. </P>
<P>Once you have retrieve the activity name, you can then connect to the database and call the views that below to the specific activity.&nbsp; </P>
<P>Sample code from help doc (some of these are still been updated):</P>
<P>using WS = BamManagementService;</P>
<P>class Program<BR>{<BR>&nbsp;&nbsp;&nbsp; static void Main(string[] args)<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GetViewSummary();</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine("Hit Enter when ready.");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.ReadLine();<BR>&nbsp;&nbsp;&nbsp; }</P>
<P>&nbsp;&nbsp;&nbsp; static void GetViewSummary()<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Create a web service proxy object.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using (WS.BamManagementService managementService = new WS.BamManagementService())<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // BAM Management Web Service requires client to be authenticated.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // The client must be a member of the BAM Portal Users group.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; managementService.Credentials = System.Net.CredentialCache.DefaultCredentials;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Get the list of all BAM views available to the current user.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WS.ViewSummaryList viewSummaryList = managementService.GetViewSummaryForCurrentUser();</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Print the info for all views on the screen.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (WS.ViewSummary viewSummary in viewSummaryList.View)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine("View: {0}", viewSummary.Name);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Each view is defined on one or more BAM activities.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (WS.ActivitySummary activitySummary in viewSummary.Activity)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // The activity data can be on a different server/database if distributed<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // BAM infrastructure is deployed.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine("&nbsp;&nbsp;&nbsp; Activity: {0} {1}",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; activitySummary.Name,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; activitySummary.IsRemote ? "[ Remote ]" : "");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Server: {0}", activitySummary.Server);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Database: {0}", activitySummary.Database);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BAM Portal URL: {0}", activitySummary.PortalUrl);</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // OLAP and Real-time aggregations aggregations can be defined.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (activitySummary.Aggregation != null)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Aggregations:");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (WS.Aggregation aggregation in activitySummary.Aggregation)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Name: {0} *** Type: {1} *** Cube Name: {2}",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; aggregation.Name,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; aggregation.Type,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; aggregation.CubeName);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (aggregation.PivotView != null)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (WS.PivotView pivotView in aggregation.PivotView)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PivotView: {0}", pivotView.Name);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (viewSummaryList.PartialResults)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Distributed BAM infrastructure is deployed and one of the referenced databases <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // is not accesible.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine("One or more of the referenced databases are not available. " +<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "The given list of views may not be complete.");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; }<BR>}&nbsp;</P>
<P>Sample Output:</P><PRE>View: SalesManagerView
    Activity: PurchaseOrder 
        Server: purchasesrv
        Database: BAMPrimaryImport
        BAM Portal URL: https://purchasesrv/BAM
        Aggregations:
            Name: POCube *** Type: OLAP *** Cube Name: POCube
            Name: POByLocation *** Type: RTA *** Cube Name: POCube
    Activity: Shipment [ Remote ]
        Server: shipsrv
        Database: BAMPrimaryImport
        BAM Portal URL: https://shipsrv/BAM
        Aggregations:
            Name: SHCube *** Type: OLAP *** Cube Name: SHCube
            Name: SHByLocation *** Type: RTA *** Cube Name: SHCube

View: SupplyManagerView
    Activity: SupplyOrder 
        Server: purchasesrv
        Database: BAMPrimaryImport
        BAM Portal URL: https://purchasesrv/BAM
        Aggregations:
            Name: SupplyCube *** Type: OLAP *** Cube Name: SupplyCube
                PivotView: SupplyCost
            Name: SupplyTimes *** Type: RTA *** Cube Name: SupplyCube
                PivotView: SupplyTimes

Hit Enter when ready.</PRE>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;</P>]]></content:encoded>
    </item>
    <item>
      <title>Soliciting Biztalk BAM scenarios and issues</title>
      <link>https://docs.microsoft.com/archive/blogs/keithlim/soliciting-biztalk-bam-scenarios-and-issues</link>
      <pubDate>Thu, 09 Feb 2006 19:32:00 GMT</pubDate>
      <dc:creator><![CDATA[keithlim]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/keithlim/2006/02/09/soliciting-biztalk-bam-scenarios-and-issues/</guid>
      <description><![CDATA[How great it would be if every features we put in to the software is what customers...]]></description>
      <content:encoded><![CDATA[<P>How great it would be if every features we put in to the software is what customers need/want.&nbsp;&nbsp; Anyway, I am creating this entry to solicit your input on how you use or plan to use&nbsp;BizTalk BAM.&nbsp;&nbsp; Please&nbsp;response as a comment with your scnenario.</P>
<P>Do also tell us what feature you like and dislike. </P>
<P>Thanks,<BR>Keith</P>
<P>&nbsp;</P>]]></content:encoded>
    </item>
    <item>
      <title>BAM API: Using OrchestrationEventStream</title>
      <link>https://docs.microsoft.com/archive/blogs/keithlim/bam-api-using-orchestrationeventstream</link>
      <pubDate>Wed, 08 Feb 2006 18:32:00 GMT</pubDate>
      <dc:creator><![CDATA[keithlim]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/keithlim/2006/02/08/bam-api-using-orchestrationeventstream/</guid>
      <description><![CDATA[Since there is not&nbsp;much&nbsp;documentation* on this yet on how to use OrchestrationEventStream...]]></description>
      <content:encoded><![CDATA[<p>Since there is not&nbsp;much&nbsp;documentation* on this yet on how to use OrchestrationEventStream (an EventStream that is in synch with Orchestration), here is a quick&nbsp;info&nbsp;on the howto:</p>
<p>This new feature is found in <strong>Microsoft.BizTalk.Bam.XLANGs</strong>&nbsp;assembly.&nbsp;&nbsp;From you BizTalk project, you can write the following in your orchestration, e.g. Expression Editor (click on the appropriate shape in orchestration to launch this): <br /><br />// Sample code for using OrchestrationEventStream from an orchestration, no need to new it: <br />Microsoft.BizTalk.Bam.EventObservation.OrchestrationEventStream.BeginActivity( "PurchaseOrder", "PO123"); <br /><br />Note: this only applies to Biztalk 2006.</p>
<p>*&nbsp;To use this in&nbsp;Biztalk 2004 SP1, you will need a hot fix, its kb article can be found here:&nbsp;<a href="https://www.kbalertz.com/Feedback_900083.aspx">https://www.kbalertz.com/Feedback_900083.aspx</a>, </p>
<p><br />&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Sample code to retrieve server and database info of Biztalk MessageBox and PIT</title>
      <link>https://docs.microsoft.com/archive/blogs/keithlim/sample-code-to-retrieve-server-and-database-info-of-biztalk-messagebox-and-pit</link>
      <pubDate>Wed, 08 Feb 2006 18:08:00 GMT</pubDate>
      <dc:creator><![CDATA[keithlim]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/keithlim/2006/02/08/sample-code-to-retrieve-server-and-database-info-of-biztalk-messagebox-and-pit/</guid>
      <description><![CDATA[Since there is a request for this, here is an example to retrieve server name and database for...]]></description>
      <content:encoded><![CDATA[<p>Since there is a request for this, here is an example to retrieve server name and database for Biztalk MessageBox and BAM Primary Import database.&nbsp; Since this is accessing internal implementation, this code is not supportable (use at your own risk) and users&nbsp;will be required to maintain this code on their own when doing upgrade. </p>
<p><strong><u>Here are the steps:</u></strong> </p>
<p>Create a console appplication project in Visual Studio, </p>
<p>Cut and paste the code below and run </p>
<p><strong><u>Sample output:</u></strong> </p>
<blockquote dir=ltr style="MARGIN-RIGHT: 0px">
<p>InfoFound Management Server KW0081 Database BizTalkMgmtDb<br />InfoFound MsgBox Server KW0081 Database BizTalkMsgBoxDb<br />InfoFound PIT Server KW0081 Database BAMPrimaryImport<br />InfoFound DTA Server KW0081 Database BizTalkDTADb<br /></p></blockquote>
<p>&nbsp;</p>
<p><strong><u>Sample Code:</u></strong></p><font color=#0000ff size=2>
<p>using</p></font><font size=2> System;</font><font color=#0000ff size=2>
<p>using</p></font><font size=2> System.Data.SqlClient;</font><font color=#0000ff size=2>
<p>using</p></font><font size=2> System.Globalization;</font><font color=#0000ff size=2>
<p>using</p></font><font size=2> Microsoft.Win32;
<p></p></font><font color=#0000ff size=2>namespace</font><font size=2> KeithLimBizTalkBAMUtility
<p>{</p>
<blockquote dir=ltr style="MARGIN-RIGHT: 0px">
<p></p></blockquote></font><font color=#0000ff size=2>class</font><font size=2> InfrastructureInfo
<p>{</p>
<blockquote dir=ltr style="MARGIN-RIGHT: 0px">
<p>[STAThread]</p>
<p></p></blockquote></font><font color=#0000ff size=2>static</font><font size=2> </font><font color=#0000ff size=2>void</font><font size=2> Main(</font><font color=#0000ff size=2>string</font><font size=2>[] args)
<p>{</p>
<blockquote dir=ltr style="MARGIN-RIGHT: 0px">
<p>InfrastructureInfo ii = </p></blockquote></font><font color=#0000ff size=2>new</font><font size=2> InfrastructureInfo();
<p>ii.GetInfo();</p>
<p>}</p>
<p></p></font><font color=#0000ff size=2>internal</font><font size=2> </font><font color=#0000ff size=2>const</font><font size=2> </font><font color=#0000ff size=2>string</font><font size=2> BtsAdminRegistryKey = @"Software\\Microsoft\\BizTalk Server\\3.0\\Administration";
<p></p></font><font color=#0000ff size=2>internal</font><font size=2> </font><font color=#0000ff size=2>const</font><font size=2> </font><font color=#0000ff size=2>string</font><font size=2> BtsServerRegistryKey = @"MgmtDBServer";
<p></p></font><font color=#0000ff size=2>internal</font><font size=2> </font><font color=#0000ff size=2>const</font><font size=2> </font><font color=#0000ff size=2>string</font><font size=2> BtsNameRegistryValue = @"MgmtDBName";
<p></p></font><font color=#0000ff size=2>internal</font><font size=2> </font><font color=#0000ff size=2>const</font><font size=2> </font><font color=#0000ff size=2>string</font><font size=2> BtsMgmtSprocRetrieveMsgBoxPITandDTA = @"SELECT SubscriptionDBServerName, SubscriptionDBName, BamDBServerName, BamDBName, TrackingDBServerName, TrackingDBName FROM adm_Group";
<p></p></font><font color=#0000ff size=2>internal</font><font size=2> </font><font color=#0000ff size=2>const</font><font size=2> </font><font color=#0000ff size=2>string</font><font size=2> BtsMigrateError = @"Error";
<p></p></font><font color=#0000ff size=2>internal</font><font size=2> </font><font color=#0000ff size=2>const</font><font size=2> </font><font color=#0000ff size=2>string</font><font size=2> BtsMigrateInfo = @"Info";
<p></p></font><font color=#0000ff size=2>internal</font><font size=2> </font><font color=#0000ff size=2>const</font><font size=2> </font><font color=#0000ff size=2>string</font><font size=2> BtsMigrateWarning = @"Warning";
<p></p></font><font color=#0000ff size=2>private</font><font size=2> </font><font color=#0000ff size=2>string</font><font size=2> managementServer;
<p></p></font><font color=#0000ff size=2>private</font><font size=2> </font><font color=#0000ff size=2>string</font><font size=2> managementDatabase;
<p></p></font><font color=#0000ff size=2>private</font><font size=2> </font><font color=#0000ff size=2>string</font><font size=2> dtaServer;
<p></p></font><font color=#0000ff size=2>private</font><font size=2> </font><font color=#0000ff size=2>string</font><font size=2> dtaDatabase;
<p></p></font><font color=#0000ff size=2>private</font><font size=2> </font><font color=#0000ff size=2>string</font><font size=2> pitServer;
<p></p></font><font color=#0000ff size=2>private</font><font size=2> </font><font color=#0000ff size=2>string</font><font size=2> pitDatabase;
<p></p></font><font color=#0000ff size=2>private</font><font size=2> </font><font color=#0000ff size=2>string</font><font size=2> msgBoxServer;
<p></p></font><font color=#0000ff size=2>private</font><font size=2> </font><font color=#0000ff size=2>string</font><font size=2> msgBoxDatabase;
<p></p></font><font color=#0000ff size=2>internal</font><font size=2> </font><font color=#0000ff size=2>static</font><font size=2> </font><font color=#0000ff size=2>string</font><font size=2> BuildConnectionString(</font><font color=#0000ff size=2>string</font><font size=2> server, </font><font color=#0000ff size=2>string</font><font size=2> database)
<p>{</p>
<blockquote dir=ltr style="MARGIN-RIGHT: 0px">
<p></p></blockquote></font><font color=#0000ff size=2>const</font><font size=2> </font><font color=#0000ff size=2>string</font><font size=2> SqlConnectionString = @"Data Source=""{0}"";Initial Catalog=""{1}"";Integrated Security=SSPI;Application Name=""BamManager"";Connect Timeout=60";
<p></p></font><font color=#0000ff size=2>return</font><font size=2> String.Format(CultureInfo.InvariantCulture,
<p>SqlConnectionString, server, database);</p>
<p>}</p>
<p></p></font><font color=#0000ff size=2>private</font><font size=2> </font><font color=#0000ff size=2>void</font><font size=2> GetInfo()
<p>{</p>
<blockquote dir=ltr style="MARGIN-RIGHT: 0px">
<p>RegistryKey key = Registry.LocalMachine.OpenSubKey(BtsAdminRegistryKey, </p></blockquote></font><font color=#0000ff size=2>false</font><font size=2>);
<p>SqlDataReader reader = </p></font><font color=#0000ff size=2>null</font><font size=2>;
<p>SqlConnection btmConnection = </p></font><font color=#0000ff size=2>null</font><font size=2>;
<p></p></font><font color=#0000ff size=2>if</font><font size=2> (key != </font><font color=#0000ff size=2>null</font><font size=2>)
<p>{</p>
<blockquote dir=ltr style="MARGIN-RIGHT: 0px">
<p></p></blockquote></font><font color=#0000ff size=2>this</font><font size=2>.managementServer = (</font><font color=#0000ff size=2>string</font><font size=2>)key.GetValue(BtsServerRegistryKey);
<p></p></font><font color=#0000ff size=2>this</font><font size=2>.managementDatabase = (</font><font color=#0000ff size=2>string</font><font size=2>)key.GetValue(BtsNameRegistryValue);
<p>}</p>
<p></p></font><font color=#0000ff size=2>else</font><font size=2>
<p>{</p>
<blockquote dir=ltr style="MARGIN-RIGHT: 0px">
<p>Console.WriteLine(BtsMigrateError + "Failed to retrieve Management database connection string from " + BtsAdminRegistryKey);</p>
<p></p></blockquote></font><font color=#0000ff size=2>return</font><font size=2>;
<p dir=ltr>}</p>
<p>Console.WriteLine(BtsMigrateInfo + </p>
<p>String.Format("Found Management Server {0} Database {1}", </p></font><font color=#0000ff size=2>this</font><font size=2>.managementServer, </font><font color=#0000ff size=2>this</font><font size=2>.managementDatabase));
<p></p></font><font color=#0000ff size=2>try</font><font size=2>
<p>{</p>
<blockquote dir=ltr style="MARGIN-RIGHT: 0px">
<p></p></blockquote></font><font color=#008000 size=2>// Open up the Management Database</font><font size=2>
<p></p></font><font color=#0000ff size=2>string</font><font size=2> btmConnectionString = BuildConnectionString(</font><font color=#0000ff size=2>this</font><font size=2>.managementServer, </font><font color=#0000ff size=2>this</font><font size=2>.managementDatabase);
<p>btmConnection = </p></font><font color=#0000ff size=2>new</font><font size=2> SqlConnection(btmConnectionString);
<p>btmConnection.Open();</p>
<p></p></font><font color=#008000 size=2>// Query the Primary Import Database</font><font size=2>
<p>SqlCommand cmd = </p></font><font color=#0000ff size=2>new</font><font size=2> SqlCommand(BtsMgmtSprocRetrieveMsgBoxPITandDTA, btmConnection);
<p>reader = cmd.ExecuteReader();</p>
<p></p></font><font color=#0000ff size=2>if</font><font size=2> (!reader.Read())
<p>{</p>
<blockquote dir=ltr style="MARGIN-RIGHT: 0px">
<p>Console.WriteLine(BtsMigrateError + "Failed to retrieve PIT and DTA databases from management DB (is group deployed?)");</p></blockquote>
<p>}</p>
<p></p></font><font color=#0000ff size=2>this</font><font size=2>.msgBoxServer = reader.GetString(0);
<p></p></font><font color=#0000ff size=2>this</font><font size=2>.msgBoxDatabase = reader.GetString(1);
<p></p></font><font color=#0000ff size=2>this</font><font size=2>.pitServer = reader.GetString(2);
<p></p></font><font color=#0000ff size=2>this</font><font size=2>.pitDatabase = reader.GetString(3);
<p></p></font><font color=#0000ff size=2>this</font><font size=2>.dtaServer = reader.GetString(4);
<p></p></font><font color=#0000ff size=2>this</font><font size=2>.dtaDatabase = reader.GetString(5);
<p>Console.WriteLine(BtsMigrateInfo + </p>
<p>String.Format("Found MsgBox Server {0} Database {1}",</p></font><font color=#0000ff size=2>this</font><font size=2>.msgBoxServer, </font><font color=#0000ff size=2>this</font><font size=2>.msgBoxDatabase));
<p>Console.WriteLine(BtsMigrateInfo + </p>
<p>String.Format("Found PIT Server {0} Database {1}",</p></font><font color=#0000ff size=2>this</font><font size=2>.pitServer, </font><font color=#0000ff size=2>this</font><font size=2>.pitDatabase));
<p>Console.WriteLine(BtsMigrateInfo +</p>
<p>String.Format("Found DTA Server {0} Database {1}", </p></font><font color=#0000ff size=2>this</font><font size=2>.dtaServer, </font><font color=#0000ff size=2>this</font><font size=2>.dtaDatabase));
<p>}</p>
<p></p></font><font color=#0000ff size=2>finally</font><font size=2>
<p>{</p>
<blockquote dir=ltr style="MARGIN-RIGHT: 0px">
<p></p></blockquote></font><font color=#0000ff size=2>if</font><font size=2> (reader != </font><font color=#0000ff size=2>null</font><font size=2>)
<p>{</p>
<blockquote dir=ltr style="MARGIN-RIGHT: 0px">
<p>reader.Close();</p></blockquote>
<p>}</p>
<p>btmConnection.Close();</p>
<p>}</p>
<p dir=ltr>}</p>
<p dir=ltr>}</p>
<p>}</p></font>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Continuation scenarios with mixed of TPE-enabled and non-TPE-Enabled tracking:</title>
      <link>https://docs.microsoft.com/archive/blogs/keithlim/continuation-scenarios-with-mixed-of-tpe-enabled-and-non-tpe-enabled-tracking</link>
      <pubDate>Tue, 07 Feb 2006 21:43:00 GMT</pubDate>
      <dc:creator><![CDATA[keithlim]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/keithlim/2006/02/07/continuation-scenarios-with-mixed-of-tpe-enabled-and-non-tpe-enabled-tracking/</guid>
      <description><![CDATA[It has been a while since I last blogged on this.&nbsp; Let's continue from where I left off.&nbsp;...]]></description>
      <content:encoded><![CDATA[<p class=MsoNormal style="MARGIN: 0in 0in 0pt">It has been a while since I last blogged on this.<span style="mso-spacerun: yes">&nbsp; </span>Let's continue from where I left off.<span style="mso-spacerun: yes">&nbsp; </span><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">Let's pick two continuation scenarios: the first, a TPE segment continues to a non-TPE segment, and the reverse being the second. <o:p></o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .25in"><strong><font color=#000000><font style="BACKGROUND-COLOR: #ffffff"><span style="mso-fareast-font-family: 'Times New Roman'"><span style="mso-list: Ignore">1.<span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span dir=ltr><u>TPE-enabled segment continues to a non-TPE-enabled segment.<o:p></o:p></u></span></font></font></strong></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p><font style="BACKGROUND-COLOR: #ffffff" color=#000000>&nbsp;</font></o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">In this scenario, you would need <span style="COLOR: blue">only a Continuation folder</span>. The naming of this folder is important since the concatenation of the folder name and its mapped value will form the continuation TokenID used in non-TPE-enabled segment.<span style="mso-spacerun: yes">&nbsp; </span>For example, if the Continuation folder name is <font color=#0000ff>"TPE2OES</font>" and the mapped value has <font color=#0000ff>"PO123"</font> for instance, the continuation <font color=#0000ff>TokenID would be "TPE2OESPO123".</font><span style="mso-spacerun: yes">&nbsp; </span>Once you have mapped other data items and milestones, you will deploy* this. <o:p></o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">In the related orchestration, in the process somewhere downstream, you will need to insert the following: <o:p></o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">// Continuation segment using OrchestrationEventstream**<o:p></o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">// Where ContinuationTokenID based on this instance contains the value ""TPE2OESPO123".***<o:p></o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">Microsoft.BizTalk.Bam.EventObservation.OrchestrationEventStream.UpdateActivity("PurchaseOrder",<span style="mso-spacerun: yes">&nbsp; </span>ContinuationTokenID, <o:p></o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>"Column1", Value1,<o:p></o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>"Column2", Value2);<o:p></o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">Microsoft.BizTalk.Bam.EventObservation.OrchestrationEventStream.EndActivity("PurchaseOrder",<span style="mso-spacerun: yes">&nbsp; </span>ContinuationTokenID);<o:p></o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .25in"><strong><span style="mso-fareast-font-family: 'Times New Roman'"><span style="mso-list: Ignore">2.<span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span dir=ltr><u>Non-TPE-enabled segment continues to a TPE-enabled segment.<o:p></o:p></u></span></strong></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><u><o:p><span style="TEXT-DECORATION: none">&nbsp;</span></o:p></u></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">In the reverse scenario where an activity begins from an non-TPE segment,<span style="mso-spacerun: yes">&nbsp; </span>the following code would be required:<o:p></o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">// Sample main segment of continuation using OrchestrationEventStream.***</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">// Activity in this instance contains: "PO124" <o:p></o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">Microsoft.BizTalk.Bam.EventObservation.OrchestrationEventStream.BeginActivity("PurchaseOrder",<span style="mso-spacerun: yes">&nbsp; </span>ActivityID);<o:p></o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">Microsoft.BizTalk.Bam.EventObservation.OrchestrationEventStream.UpdateActivity("PurchaseOrder",<span style="mso-spacerun: yes">&nbsp; </span>ActivityID, <o:p></o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>"Column1", Value1,<o:p></o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>"Column2", Value2);<o:p></o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">// CONTINUATION LINE HERE: <o:p></o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">Microsoft.BizTalk.Bam.EventObservation.OrchestrationEventStream.EnableContinuation("PurchaseOrder",<span style="mso-spacerun: yes">&nbsp; </span>ActivityID, <span style="COLOR: blue">"OES2TPE" + ActivityID</span>);<o:p></o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">Microsoft.BizTalk.Bam.EventObservation.OrchestrationEventStream.EndActivity("PurchaseOrder",<span style="mso-spacerun: yes">&nbsp; </span>ActivityID);<o:p></o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">To create the continue-to segment, in your tracking profile, you would need to <span style="COLOR: blue">add a ContinuationID folder</span>, name this folder as <span style="COLOR: blue">"OES2TPE"</span> and map the relevant item (one that will give you the above <font color=#0000ff>"PO124"</font> for this particular instance of message.<span style="mso-spacerun: yes">&nbsp; </span>Deploy* this and drop a message and see the beauty flows :)<o:p></o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">*<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>You will get a warning that the tracking profile is missing the ContinuationID or Continuation folder, but since we know what we are doing :), just ignore and proceed. </p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p></o:p>&nbsp;</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">** Note: there is no BeginActivity call since this is a continued-to segment.<span style="mso-spacerun: yes">&nbsp; </span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="mso-spacerun: yes"></span>&nbsp;</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="mso-spacerun: yes">***</span>The above can easilly be changed to used DirectEventStream or BufferedEventStream. If you do so, make sure you call the Flush method explicity or set the flush threshold to 1 or greater in the constructor.</p>]]></content:encoded>
    </item>
    <item>
      <title>DirectEventStream vs BufferedEventStream</title>
      <link>https://docs.microsoft.com/archive/blogs/keithlim/directeventstream-vs-bufferedeventstream</link>
      <pubDate>Wed, 01 Feb 2006 19:35:00 GMT</pubDate>
      <dc:creator><![CDATA[keithlim]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/keithlim/2006/02/01/directeventstream-vs-bufferedeventstream/</guid>
      <description><![CDATA[Which EventStream to use:
DirectEventStream (DES) vs BufferedEventStream (BES)
Use DES when you...]]></description>
      <content:encoded><![CDATA[<p>Which EventStream to use:</p>
<p>DirectEventStream (DES) vs BufferedEventStream (BES)</p>
<p>Use DES when you don't want any latency of data appearing in BAMPrimaryImport database.&nbsp;&nbsp; Since this is synchronous call, any error will be thrown back to the calling application. </p>
<p>Use BES if your concern is throughput.&nbsp; This is particularly suited for scenarios with spurts of large chuck of events.&nbsp; A small penalty for using this is that there will be small latency between when the event is sent and the event appearing in BAMPrimaryImport database. </p>
<p>For more info on EventStream: <a href="https://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdk/htm/frlrfmicrosoftbiztalkbameventobservationeventstreamclasstopic.asp">https://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdk/htm/frlrfmicrosoftbiztalkbameventobservationeventstreamclasstopic.asp</a></p>]]></content:encoded>
    </item>
    <item>
      <title>How to write BAM Events from pipeline components.</title>
      <link>https://docs.microsoft.com/archive/blogs/keithlim/how-to-write-bam-events-from-pipeline-components</link>
      <pubDate>Mon, 30 Jan 2006 14:44:00 GMT</pubDate>
      <dc:creator><![CDATA[keithlim]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/keithlim/2006/01/30/how-to-write-bam-events-from-pipeline-components/</guid>
      <description><![CDATA[In BizTalk 2004,&nbsp;to write any BAM event from the BizTalk pipeline, you will need to write some...]]></description>
      <content:encoded><![CDATA[<P>In BizTalk 2004,&nbsp;to write any BAM event from the BizTalk pipeline, you will need to write some code :)&nbsp; To simplify the learning, I will illustrate by adapting an SDK sample.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></P>
<P>Adapt the SDK CustomComponent (found in .../SDK/Samples/Pipelines/CustomComponent) sample, you will find two directories: <o:p></o:p></P>
<UL type=disc>
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo1; tab-stops: list .5in">FixMsg - the custom pipeline component (you will need to splice BAM code here)&nbsp; <o:p></o:p>
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo1; tab-stops: list .5in">PipelineComponentSample - custom pipeline and will use the above custom pipeline component. <o:p></o:p></LI></UL>
<P>Modify the FixMsg to include the below sample (Search for Execute method): </P>
<P style="MARGIN-LEFT: 0.5in">public IBaseMessage <B><SPAN style="COLOR: teal">Execute</SPAN></B>(IPipelineContext pc, IBaseMessage inmsg) <BR>{ </P>
<P style="MARGIN-LEFT: 1in">IBaseMessagePart bodyPart = inmsg.BodyPart; <BR>if (bodyPart!=null) <BR>{ <BR style="mso-special-character: line-break"></P>
<P style="MARGIN-LEFT: 1.5in">... <BR>... <BR><B><SPAN style="COLOR: teal">//Splice BAM Code here: <BR>WriteBAMEvent(pc, "Execute", inmsg);</SPAN></B> <BR style="mso-special-character: line-break"><BR style="mso-special-character: line-break"></P>
<P style="MARGIN-LEFT: 1in">} <BR>return inmsg; </P>
<P style="TEXT-INDENT: 0.5in">} <BR style="mso-special-character: line-break"><BR style="mso-special-character: line-break"></P>
<P><SPAN style="COLOR: teal"><BR>// Add a new method to write to BAM <o:p></o:p></SPAN></P>
<P>private void WriteBAMEvent(IPipelineContext context, string StageDescription, IBaseMessage inmsg) <BR>{ </P>
<P style="MARGIN-LEFT: 0.5in">EventStream _BAMEventStr = null; <BR>// Create an EventStream instance <BR>try <BR>{ <o:p></o:p></P>
<P style="MARGIN-LEFT: 1in">// Use can use BES/DES or MES <BR>// DES - DirectEventStream - writes direct to BAMPrimaryImport (Synchronous call, no latency) <BR>//_BAMEventStr = new DirectEventStream("Integrated Security=SSPI;Data Source=.;Initial Catalog=BAMPrimaryImport",1); <BR><BR>// BES - BufferedEventStream - writes to MessageBox (Asynchronous call, no wait in call) <BR>// _BAMEventStr = new BufferedEventStream("Integrated Security=SSPI;Data Source=.;Initial Catalog=BizTalkMsgBoxDb",1); <BR><BR><B><SPAN style="COLOR: teal">// MES - MessagingEventStream - Async and participates in Pipeline transaction context). <BR>// - Note: Available in BizTalk 2004 with SP1 patch and Biztalk 2006<BR>_BAMEventStr = context.GetEventStream();</SPAN></B> </P>
<P style="MARGIN-LEFT: 0.5in">} </P>
<P style="MARGIN-LEFT: 0.5in">catch(Exception e) <BR>{</P>
<P style="MARGIN-LEFT: 1in">throw (e);</P>
<P style="MARGIN-LEFT: 0.5in">} <BR><BR>// Sample BAM Event Code here: <BR>string ActivityID; <BR>//Create a new, unique activity identifier to use as the ActivityID in BAM <BR>ActivityID="BAM_" + Guid.NewGuid().ToString() + "_" + DateTime.Now + "_" + StageDescription; <BR><BR>//Start the activity record identified by ActivityID <BR>_BAMEventStr.BeginActivity("PurchaseOrder",ActivityID); <BR><BR>_BAMEventStr.UpdateActivity("PurchaseOrder",ActivityID, "ProductName","QFE1117"); <BR><BR>_BAMEventStr.EndActivity("PurchaseOrder",ActivityID); <BR><BR>// Optional Flush <BR>//_BAMEventStr.Flush(); </P>
<P>} <o:p></o:p></P>
<P>Reference on MessagingEventStream:</P>
<P><A href="https://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdkmref[bts06]/html/M_Microsoft_BizTalk_Component_Interop_IPipelineContext_GetEventStream.asp">https://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdkmref[bts06]/html/M_Microsoft_BizTalk_Component_Interop_IPipelineContext_GetEventStream.asp</A></P>
<P>Reference on EventStream: </P>
<P><A href="https://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdkmref[bts06]/html/T_Microsoft_BizTalk_Bam_EventObservation_EventStream.asp">https://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdkmref[bts06]/html/T_Microsoft_BizTalk_Bam_EventObservation_EventStream.asp</A></P>
<P>To understand the above and details on how to fetch message specific data, please refer to sectio on Developing Pipeline Components in the help or use this link: <BR><A href="https://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdk/htm/ebiz_prog_pipe_qdri.asp" target=_new>https://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdk/htm/ebiz_prog_pipe_qdri.asp</A> <BR>You would at least need to implement these interfaces. <BR>IBaseComponent, IComponent, IComponentUI. <BR><BR>The above is tedious and is the only means for writing to BAM in Biztalk 2004. In Biztalk 2006, you can do some of this easily via TPE drag and drop. <o:p></o:p></P>
<P>&nbsp;</P>]]></content:encoded>
    </item>
  </channel>
</rss>