I had a chance to sit down with Jeff
Brand while down in Omaha for my presentation
at the HDC. We recorded a podcast on all (most) things Scrum and TFS –
you can check it out here.
It was great fun – thanks Jeff!
I had a chance to sit down with Jeff
In my last post I wrote "Oslo" == Windows Registry++, to describe the simplicity of "Oslo". I also said "the simplicity of "Oslo" is what makes up its complexity".
SOA has different impact upon different roles within an organization. But if you would be a "Process Developer", you would have this "toolbox of services", which you could reuse when creating your processes. One could imagine such a tool being Visio, and where you'd find the publicly exposed service in some toolbox window, and you could drag these services to the process surface to compose the content of the process. So far these services has been more or less the endpoints of those services.
-Now, imagine the Repository of "Oslo" being the source of that toolbox window. -But hey, the repository stores much more then endpoints, right…It stores models of endpoints, services, workflow's or your custom processes etc. These could all be reused across your organization.
Does this mean Models == Service or perhaps SOA has grown to MO or MOA? And another thing that will blow your mind, put your Repository in Windows Azure, and share your models across organization boundaries …
BTW…The slogan for PDC 2008 was "Think WAY out side the box"
I’ll start by saying that I really (like in “really, really!“) like BizUnit! BizUnit in combination with MSBuild, NUnit and CruiseControl.NET has really changed the way work and how I feel about work in general and BizTalk development in particular.
If you haven’t started looking into what for example MSBuild can do you for you and your BizTalk build process you’re missing out on something great. The time spent on setting up a automatic build process is time well spent – take my word for it!
But build processes isn’t was this post is supposed to be about. This post is about one of the few limitations of BizUnit and the possibilities to work around one of those in particular.
BizUnit is a test framework that is intended to test Biztalk solutions. BizUnit was created by Kevin.B.Smith and can be found on [this CodePlex space](http://www.codeplex.com/bizunit) . BizUnit has quite a significant number of steps that have nothing to do with Biztalk per se and can be used for any integration project testing.
[![note](../assets/2008/10/windowslivewriterusingbizunitextensionstopokesomexml-d286note-thumb.gif)](../assets/2008/10/windowslivewriterusingbizunitextensionstopokesomexml-d286note-2.gif)If you have used BizUnit before and need an introduction before reading further, start [here](http://www.codeproject.com/KB/biztalk/BizUnit2006.aspx), [here](http://www.codeplex.com/bizunit) or [here](http://biztalkia.blogspot.com/2007/03/getting-started-with-nunit-and-bizunit.html) – they’re all excellent articles.
As stated BizTalk has quite a significant number of steps but to my knowledge it’s missing a step to change and update file from within the test script. This step and a couple of other are added in separate fork-project to BizUnit called BizUnitExtensions.
This project [_BizUnitExtension_] aims to provide some more test step libraries, tools and utilities to enhance the reach of BizUnit. Here you can find some enhancements/extensions to the steps in the base libraries , new steps, support applications, tutorials and other documentation to help you understand and use it….This project is currently owned and contributed to by Santosh Benjamin and Gar Mac Críostaand. Our colleagues have also contributed steps and suggestions. We welcome more participation and contributions.
Amongst other steps (some for Oracle DBs etc) BizUnitExtensions adds a XmlPokeStep!
**XmlPokeStep:** This step is modelled on the lines of the NAnt XmlPoke task The XmlPokeStep is used to update data in an XML file with values from the context This will enable the user to write tests which can use the output of one step to modify the input of another step.
A cool thing about BizUnitExtensions is that it really just extends BizUnit. You’ll continue to run on the BizUnit dll:s when you use steps form BizUnit and just use the BizUnitExtensions code when you actually use some of steps from that library.
The example below shows how we first use an ordinary BizUnit task to validate and read a value from a file. We then use BizUnitExtension to gain some new powers and update the file with that value we just read.
<!–Ordinary BizUnit step to validate a file –> <TestStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.FileValidateStep"> <Timeout>5000</Timeout> <Directory>....ReceiveRequest</Directory> <SearchPattern>*Request.xml</SearchPattern> <DeleteFile>false</DeleteFile> <ContextLoaderStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.XmlContextLoader"> <XPath contextKey="messageID">/*[local-name()=’SystemRequest’]/ID</XPath> </ContextLoaderStep> </TestStep> <!–Use BizUnitExtensions to poke the value and change it –> <TestStep assemblyPath="BizUnitExtensions.dll" typeName="BizUnit.Extensions.XmlPokeStep"> <InputFileName>....SystemResponse.xml</InputFileName> <XPathExpressions> <Expression> <XPath>/*[local-name()=’SystemResponse’]/ID</XPath> <NewValue takeFromCtx="messageID"></NewValue> </Expression> </XPathExpressions> </TestStep>
This of course means that all you need to extend you current test steps and gain some cool new abilities is to add another assembly to you test project
Using BizUnitExtensions in a “real” scenario
A message request is received via a web service.
The message is sent to a queue via an orchestration in BizTalk. To be able to correlate the response a message id is added to the message request sent to the back-end system.
A message response is sent from the back-end system using a second queue. The response message contains the same message id as the incoming request contained.
BizTalk correlates the message back to the web service using the message id.
So how can we now test this? The steps should be something like the below.
> [![note](../assets/2008/10/windowslivewriterusingbizunitextensionstopokesomexml-d286note-thumb-1.gif)](../assets/2008/10/windowslivewriterusingbizunitextensionstopokesomexml-d286note-4.gif) Notice that we read and write to the file system in the example. Once deployed to test these send ports and receive location will be reconfigured to use the queuing adapter. But for testing the scenario the file system works just fine a simplifies things IMHO.
- Send a request message using BizUnit and the HttpRequestResponseStep. Make sure it runs concurrently with the other steps and then wait for a response (using the runConcurrently-attribute on the step).
- Configure the send port so the orchestration that added the generated message id writes the message to a folder. Use the FileValidateStep and a nested XmlContextLoader to read the message from the folder and write the message id the context.
- Use the context and the XmlPokeStep from BizUnitExtensions to update a response message template with the message id from the request message (this is of course needed so we can correlate the response message back to the right orchestration).
Copy the update response message template using the FileCreateStep to the folder that is monitored by the the receive location used for reading responses.
<TestExecution> <!–Post a request message on the SOAP port. Run it Concurrently–> <TestStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.HttpRequestResponseStep" runConcurrently="true"> <SourcePath>....WebRequest.xml</SourcePath> <DestinationUrl>http://localhost:8090/BizTalkWebService/WebService1.asmx?op=WebMethod1</DestinationUrl> <RequestTimeout>15000</RequestTimeout> </TestStep> <!–Read the system request message and read the generaed id to the context–> <TestStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.FileValidateStep"> <Timeout>5000</Timeout> <Directory>....ReceiveRequest</Directory> <SearchPattern>*Request.xml</SearchPattern> <DeleteFile>false</DeleteFile> <ContextLoaderStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.XmlContextLoader"> <XPath contextKey="messageID">/*[local-name()=’SystemRequest’]/ID</XPath> </ContextLoaderStep> </TestStep> <!–If we have the file in source control it might be read-only -> remove that attribute–> <TestStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.ExecuteCommandStep"> <ProcessName>attrib</ProcessName> <ProcessParams>SystemResponse.xml -r</ProcessParams> <WorkingDirectory>....</WorkingDirectory> </TestStep> <!–Update our response template (using BizUnitExtensions) and add the message id that we read into the the context–> <TestStep assemblyPath="BizUnitExtensions.dll" typeName="BizUnit.Extensions.XmlPokeStep"> <InputFileName>....SystemResponse.xml</InputFileName> <XPathExpressions> <Expression> <XPath>/*[local-name()=’SystemResponse’]/ID</XPath> <NewValue takeFromCtx="messageID"></NewValue> </Expression> </XPathExpressions> </TestStep> <!–Wait a moment so we don’t copy the file until we’re done updating it–> <TestStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.DelayStep"> <Delay>1000</Delay> </TestStep> <!–Copy the file to the folder that monitored by the receive location for opicking up system responses–> <TestStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.FileCreateStep"> <SourcePath>....SystemResponse.xml</SourcePath> <CreationPath>....SendResponseSystemResponse.xml</CreationPath> </TestStep> </TestExecution>
This might look messy at first but I think it’s really cool I also think it worth thinking about on how you should run this at during development otherwise? You would then have to build some small stub to return a response message with the right id … I prefer this method!
Update: Gar’s blog can be found here.
I’ll start by saying that I really (like in "really, really!") like BizUnit! BizUnit in combination with MSBuild, NUnit and CruiseControl.NET has really changed the way work and how I feel about work in general and BizTalk development in particular.
If you haven’t started looking into what for example MSBuild can do you for you […]
Adapter Pack CTP 4 is here and we have added a lot more features based on some feedback we have been getting from various channels. So here is the list of major enhancements
- Support for “for xml” style procedures used commonly with v1 SQL adapter
Oracle EBS Adapter – support for
- Request Sets
- Selecting Application Context using BizTalk Message Context Properties
- Oracle EBS installations with Multi language systems
- Windows integrated authentication of the DB user
- Setting Print/Repeat/General options and submitting the request in a single operation for Request Sets and Concurrent Programs
As always, if you want to try this CTP you need to join the TAP(Technology Adoption Program). You can see the details for joining TAP here . Feedback is welcome and please write back to us on the forums or on the blogs to let us know what you think about the latest Adapter Pack releases.
To help get everyone up to speed on the new Microsoft Offerings, I’ve put together over an hour of first look videos to help show the new features and walk though the new UI’s.
The following videos are now live on BizTalkGurus.com:
First Look: M – Oslo’s Modeling Language – This video walks though creating a simple model using the new M Modeling Language and takes a look at a simple Domain Specific Language (DSL). How often do you get to see a new language? (Download WMV)
Consuming WCF Services in Workflow 4.0 – This video takes a look at the new designer experience for Workflow 4.0 inside Visual Studios 10 and shows how to consume a WCF Service inside Workflow 4.0. (Download WMV)
It is important to point out that these new and enhanced technologies are not going to replace BizTalk. The are intended to enhance the rest of the framework. BizTalk Server will still serve a mission critical need as Microsoft’s Integration Server.
Make sure you check out the video content on Workflow 4.0 available at BizTalkGurus.com:
Windows Workflow 4.0 is a major upgrade to the existing Microsoft workflow technology. As part of this upgrade, the designer has been enhanced to account for new features and increase the developer experience. Below is a screen shot of a basic sequential workflow.
A cool feature, that is not shown here, is the dynamically changing gray arrows. If a new shape is dragged over between the Persist and Delay shape above, the gray arrow would expand.
On the bottom left of the surface is the new Variables window. This somewhat resembles BizTalk’s variable experience inside the Orchestration.
The out-of-the-box Activities are a little different as well with some 4.0 additions. Keep in mind this is Beta code so more Activities could be added or removed at any time.
In the list above, you can see a new Flowchart activity. This represents the new flowchart workflow style. The Flow Decision and Flow Switch are part of this new style as well. Below is a completed flowchart workflow.
When working with flowcharts, you drop a Flow Switch (Yellow square with White X above) and draw lines from this shape to others following the path the logic should flow. The Flow Switch behaves similar to a CASE statement.
The above flowchart uses the Workflow 4.0 Rules. A sample rule is below.
Some new enhancements with the WCF and WF interactions now make communication easier. Below is the windows to configure inputs and outputs from a WCF message based Workflow.
One of the best features of Workflow 4.0 is the real-time validation on the variable fields. Inside an Assign shape for example, when you tab out of a cell that variable name is checked to ensure it exist. If not, you get a red X and a pop-up message. Due to my poor spelling, I am sure this will save me countless hours over the years.
Overall I found the new designer easy to use and it made sense to me – mostly due to the likeness to the Orchestration designer in BizTalk.
Hope this post gives you a quick first look at the new Workflow designer. Enjoy.
As and when we release newer hotfixes, I will edit this post.
Hotfix list for the Microsoft BizTalk Adapter Pack V1
|Hotfix/KB Number||Component Affected||Description|
|950101||OracleDB||An error occurs if you try executing a Stored Procedure inside a Package, which belongs to a schema other than the default schema for the user.|
|950854||SAP||SAP Receive Locations in BizTalk stop working if an exception occurs in the Pipeline.|
|954539||SAP||By default, the adapter treats special DATS and TIMS values (like 00000000, 99999999, etc) as an error. With this hotfix, a new set of settings are exposed to the user, to allow him/her to configure the behavior when various special values are encountered. There is a blog post here for Adapter Pack V2, but this hotfix (for the Adapter Pack V1) has something very similar.|
|954233||SAP ADO||A “Reader positioned at invalid row” error is thrown, if you attempt to call GetFieldType() on the SAPDataReader object, if the reader is positioned before the first row or after the last row.|
|SAP||The SAP adapter in the Adapter Pack V1 did not support “Table Types”. This hotfix adds support for it.|
|SAP ADO||The option “no_conversion” does not work for NUMC datatypes. Also, incorrect values may be returned for some numeric fields.|
|SAP||If an IDoc Segment has a special character in its name, the adapter throws an exception that the Segment information was not found in the metadata.|
Hotfix list for Microsoft BizTalk Server 2006 R2
|Hotfix/KB Number||Component Affected||Description|
|942612||WCF Adapter||If you use the Message Template feature in the WCF Adapter, the namespaces in the template are not passed to the Custom Binding (the adapters in the Adapter Pack will throw an error indicating that a node with a particular name and namespace was not expected).|
Hi guys – there’s a bunch of stuff going on right now at PDC 08 in LA.
(If you’re on a PDA/Mobile – grab a the PDC from here – http://www.microsoftpdc.com/mobile/)
- Here’s a select set of recorded sessions up on Channel 9– http://channel9.msdn.com/tags/PDC08/
Oslo” is the code name for our platform for model-driven applications. The goal of
“Oslo” is to provide a 10x productivity gain by making model-driven applications mainstream
with domain-specific models, languages and tools.
- Public Oslo(BizTalk vNext next) Site – http://msdn.microsoft.com/en-gb/oslo/default.aspx
Oslo Downloads here – http://code.msdn.microsoft.com/oslo
- WCF ‘REST’ Services
- MSDN WCF REST-ful Starter Site – http://msdn.microsoft.com/en-au/netframework/cc950529.aspx
I’ve got no idea what REST is –REST
great article outlining REST
- WCF REST Starter Kit(on CodePlex at the moment) – http://www.codeplex.com/aspnet/Wiki/View.aspx?title=WCF%20REST
So if you can’t sleep then there’s going to be some interesting reading coming up
for us all. 🙂