by community-syndication | Sep 10, 2010 | BizTalk Community Blogs via Syndication
This is just a short note before heading into the weekend, to announce availability of the AppFabric Architecture and Deployment Topologies guide.
In this guide we address common questions we have heard from customers during our CAT engagements related to designing an enterprise-level AppFabric environment for maximum scalability – it covers both the platform install & configuration topology, as well as the key service/application deployment considerations to take into account during planning and development.
The document is available via the Microsoft Download Center at the following URL:
http://download.microsoft.com/download/A/5/B/A5B0ED08-844F-4E37-9F0F-BEE9F3043907/AppFabricArchGuide.docx
Enjoy!
by community-syndication | Sep 10, 2010 | BizTalk Community Blogs via Syndication
I was building a test solution for my next blog post and I started to create a new workflow service in Visual Studio. But apparently the designer came up with an exception for me:
Workflow Designer encountered problems with your document
Please check the document for invalid content, namespaces, references or reference loops.
‘\’ is an unexpected token. The expected token is ‘;’. Line 3, position 99.
After opening the XAML view, I noticed the full path of the xamlx file was added to the xml in the sad:XamlDebuggerXmlReader.FileName attribute of the sequence (main element). And there it appeared that the fileName was not well-encoded, resulting in invalid XML, because of the usage of ‘&’ sign. (I added my blog tests in a folder with name R&D …)
The solution to this issue was to manually escape the R&D with R&D string.
Off course, one could argue why the ‘source code’ or ‘model’ of a Workflow service needs to maintain a reference to a physical file on a developers machine (in source safe, everyone on the same project can check out to different locations…)
Just wanted to share this one.
by community-syndication | Sep 10, 2010 | BizTalk Community Blogs via Syndication
If you are in Minneapolis on Thursday September 16th please join us for the Twin Cities Connected Systems User Group Meeting.
The meeting takes place at 6:00 p.m. at the Microsoft offices at 8300 Norman Center Drive, Bloomington, MN 55437.
Eric Kraus and I will be speaking on: Composite Applications: Connecting and Building Workflow Applications
Here is the write-up:
Come learn about Composite Applications and how you can build chunks of functionality in different loosely-coupled technologies that can be used to make up a larger collective solution. We will discuss how you can use SharePoint, BizTalk, Windows Server AppFabric, .NET and the LOB Adapters to build these chunks of functionality as well as the applications that consume them.
by community-syndication | Sep 10, 2010 | BizTalk Community Blogs via Syndication
I was helping advise another coworker on a project where we wanted to use a WCF Oracle receive location to pull data from a database. The poll query looked something like select * from tablename where flag = ‘R’ for update and the post-poll statement did something like update tablename set flag = ‘P’. In […]
by community-syndication | Sep 10, 2010 | BizTalk Community Blogs via Syndication
As part of a blog entry back in April I mentioned a problem some folks were having with RNIFSend pages. Here’s the blog link (check the bottom of the post).
http://blogs.msdn.com/b/biztalkcpr/archive/2009/09/04/troubleshooting-btarn-web-pages-and-more-on-btarn-x64.aspx
At the time I could not confirm the problem can happen with Windows 03 (x32 and x64). The issue has been confirmed with the latest service packs/security updates for Windows 03 SP2. The send page will attempt to use TLS first (not SSL 3.0). Also, immediately after the “Client Hello” in the network trace the conversation shows “Encrypted Alert” and the communication ends.
If web page tracing has been added it will show “Underlying connection was closed”. The fix is the same. Add a line of code to the RNIFSend page to force the use of SSL 3.0.
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3; (add this)
//rest of the code
HttpWebRequest outerRequest = null;
ErrorLevel level = ErrorLevel.ProxyToOuterFailure;
The location is not critical. Keeping it close to the other connection related code is a good idea. Copy the existing virtual folders as a backup. Deploy the new send page and test.
by community-syndication | Sep 10, 2010 | BizTalk Community Blogs via Syndication
Introduction Recently I was working on a technical question and proof of concept about being able to reuse the BizTalk mapping designerfunctionality. The goal was to be able to reuse the functionality within a business user application to enable an information worker to create a map. One of my personal goals was to try to […]
by community-syndication | Sep 9, 2010 | BizTalk Community Blogs via Syndication
In my previous post I showed you how to test simple activities using WorkflowInvoker. While this is a great way to test simple activities it does have limitations. The MSDN documentation states
WorkflowInvoker does not allow instance control such as persisting, unloading, or resuming bookmarks. If instance control is desired, use WorkflowApplication instead.
In this post I’ll show you how you can use WorkflowTestHelper to test an activity that uses Bookmarks.
Watch endpoint.tv – How To Unit Test Workflows
Download Workflow Test Helper (including this sample code) from MSDN Code Gallery
What is a Bookmark?
Suppose you have an activity that needs some data. Perhaps you want to ask the user for something or you need the host environment to do something that the activity itself cannot do. In this example I’m going to create a ReadLine activity. I could call Console.ReadLine from my activity but that is a bad practice because it blocks the Activity Scheduler thread. As an activity author you should never block the thread but instead should use bookmarks.
Here is my ReadLine Activity
public sealed class ReadLine : NativeActivity<string>
{
private BookmarkCallback _readCompleteCallback;
[RequiredArgument]
public InArgument<string> BookmarkName { get; set; }
protected override bool CanInduceIdle
{
get { return true; }
}
public BookmarkCallback ReadCompleteCallback
{
get { return _readCompleteCallback ?? (_readCompleteCallback = new BookmarkCallback(OnReadComplete)); }
}
protected override void Execute(NativeActivityContext context)
{
// Inform the host that this activity needs data and wait for the callback
context.CreateBookmark(BookmarkName.Get(context), ReadCompleteCallback);
}
private void OnReadComplete(NativeActivityContext context, Bookmark bookmark, object state)
{
// Store the value returned by the host
context.SetValue(Result, state as string);
}
}
Now I can use this activity in a workflow that requires input from the user
If you try to run this workflow with WorkflowInvoker your app will hang. Instead you have to use WorkflowApplication and deal with the bookmarks in the host application. I’ve included the host application with this post so you can see the necessary code.
How To Test This Workflow
Testing an activity like this can be tricky. In the WorkflowTestHelper library I’ve added a class that makes it much easier. The class is called WorkflowApplicationTest<T>. This class will create and manage the WorkflowApplication and handle all the events for you resulting in some very clean test code.
[TestMethod]
public void ShouldOutputGreeting()
{
// Arrange
const string expectedFirstName = "Test";
const string expectedLastName = "User";
var expectedGreeting = string.Format("Hello {0} {1}", expectedFirstName, expectedLastName);
var sut = WorkflowApplicationTest.Create(new TestReadLine());
// Act
// Run the workflow
sut.TestActivity();
// Wait for the first idle event - prompt for First Name
// will return false if the activity does not go idle within the
// timeout (default 1 sec)
Assert.IsTrue(sut.WaitForIdleEvent());
// Should have a bookmark named "FirstName"
Assert.IsTrue(sut.Bookmarks.Contains("FirstName"));
Assert.AreEqual(BookmarkResumptionResult.Success,
sut.TestWorkflowApplication.ResumeBookmark("FirstName", expectedFirstName));
// Wait for the second idle event - prompt for Last Name
Assert.IsTrue(sut.WaitForIdleEvent());
// Should have a bookmark named "LastName"
Assert.IsTrue(sut.Bookmarks.Contains("LastName"));
Assert.AreEqual(BookmarkResumptionResult.Success,
sut.TestWorkflowApplication.ResumeBookmark("LastName", expectedLastName));
// Wait for the workflow to complete
Assert.IsTrue(sut.WaitForCompletedEvent());
// Assert
// WorkflowApplicationTest.TextLines returns an array of strings
// that contains strings written by the WriteLine activity
Assert.AreEqual(4, sut.TextLines.Length);
Assert.AreEqual(expectedGreeting, sut.TextLines[2]);
}
Give It A Try
I’ve just posted WorkflowTestHelper v1.3 which now provides better support for testing with Bookmarks and capturing output of WriteLine activities. Give it a try and let me know what you think.
by stephen-w-thomas | Sep 9, 2010 | Stephen's BizTalk and Integration Blog
I am pleased to announce my book is now available for immediate delivery on Amazon.com!
The book is called “Applied Architecture Patterns on the Microsoft Platform” published by Packt Publishing.
This book is a detailed scenario-driven approach to architecting systems using Microsoft technologies covering BizTalk Server, .Net 4, AppFabric, Azure, SQL, and more. We dive into 13 real-life style scenarios and talk about various technology options available to solve the problem. One technology is selected for each scenario and a detailed walk-through it given.
The four other co-authors and I have been working on this book for nearly a year. We hope you enjoy it!
by community-syndication | Sep 8, 2010 | BizTalk Community Blogs via Syndication
Nearly 16 months after a book idea was born, the journey is now complete. Today, you can find our book, Applied Architecture Patterns on the Microsoft Platform, in stock at Amazon.com and for purchase and download at the Packt Publishing site. I am currently in Stockholm along with co-authors Stephen Thomas and Ewan Fairweather delivering […]
by community-syndication | Sep 8, 2010 | BizTalk Community Blogs via Syndication
In this episode, we discuss the FlowChart activity. Sure, it looks simple—and in fact it is. Watch as Leon Welicki explains how you can use the new WF4 Flowchart activity to build workflows.
The sample application shown is a part of the WF4 SDK Samples.
Ron Jacobs
blog http://blogs.msdn.com/rjacobs
twitter @ronljacobs
What do you want to see on endpoint.tv?