by community-syndication | Jul 29, 2010 | BizTalk Community Blogs via Syndication
One thing I have not tackled until today was how to test a Workflow Service in a .xamlx file. When I started out this morning working on it I realized that there isn’t a great deal of information about how to do this available anywhere.
Update 7/30/2010 – Download the WF4 Workflow Test Helper library for sample code
Here is what I came up with. Look at this test and tell me what you think.
using System.Activities;
using System.Activities.Tracking;
using System.ServiceModel;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using WorkflowTestHelper.Tracking;
namespace WorkflowTestHelper.Tests
{
/// <summary>
/// This test demonstrates the WorkflowServiceTestHost class
/// </summary>
[TestClass]
public class WorkflowServiceTestHostTest
{
/// <summary>
/// The endpoint address to be used by the test host
/// </summary>
private readonly EndpointAddress _serviceAddress = new EndpointAddress("net.pipe://localhost/TestService");
/// <summary>
/// Verifies that the WorkflowServiceTestHost hosts a service and that the service receives and sends a reply
/// </summary>
/// <remarks>
/// Be sure to enable deployment - the xamlx file must be deployed
/// </remarks>
[TestMethod]
[DeploymentItem(@"WorkflowTestHelper.Tests.Activities\TestService.xamlx")]
public void ShouldHostService()
{
var trackingProfile =
new TrackingProfile
{
Queries =
{
new ActivityStateQuery
{
ActivityName = "ReceiveRequest",
States = {"Executing"},
},
new ActivityStateQuery
{
ActivityName = "SendResponse",
States = {"Executing"},
},
}
};
using (var host = WorkflowServiceTestHost.Open("TestService.xamlx", _serviceAddress.Uri, trackingProfile))
{
var client = new ServiceClient(new NetNamedPipeBinding(), _serviceAddress);
var response = client.GetData(1);
Assert.AreEqual("1", response);
host.Tracking.Trace();
// Find the tracking records for the ReceiveRequest and SendResponse
// Activity <ReceiveRequest> state is Executing
AssertTracking.ExistsAt(host.Tracking.Records, 0, "ReceiveRequest", ActivityInstanceState.Executing);
// Activity <SendResponse> state is Executing
AssertTracking.ExistsAt(host.Tracking.Records, 1, "SendResponse", ActivityInstanceState.Executing);
}
}
}
}
by community-syndication | Jul 29, 2010 | BizTalk Community Blogs via Syndication
The Windows Azure AppFabric LABS August release is scheduled for August 5, 2010 (Thursday). Users will have NO access to the AppFabric LABS portal and services during the scheduled maintenance down time.
When:
START: August 5, 2010, 10am PST
END: August 5, 2010, 6pm PST
Impact Alert:
LABS AppFabric Service Bus, Access Control and portal will be unavailable during this period. Additional impacts are described below.
Action Required:
Existing accounts and Service Namespaces will be available after the services are deployed.
However, ACS Rules, Issuers, Scopes, and Token Policies will NOT be persisted and restored after the maintenance. Users will need to back up their data if they wish to restore them after the Windows Azure AppFabric LABS August Release.
Also note that the Service Bus Multicast with Message Buffers features, which have been available in LABS since March 2010, will be temporarily removed from the LABS environment. The team is working on an alternative approaches to these features.
Thanks for working in LABS and giving us valuable feedback. Once the update becomes available, we’ll post the details via this blog.
Stay tuned for the upcoming LABS release!
The Windows Azure AppFabric Team
by community-syndication | Jul 29, 2010 | BizTalk Community Blogs via Syndication
Sharepoint is pretty interesting to use on an enterprise level. More and more companies are adopting the Sharepoint way to share and collaborate documents and to do their Knowledge Management. If you are used to using Sharepoint, I am sure you have used it to upload your word document and share it across the team.
read more
by community-syndication | Jul 29, 2010 | BizTalk Community Blogs via Syndication
It’s not a secret that WCF configuration management is one of the biggest challenges that companies face when adopting WCF as part of their enterprise solutions. Whether the declarative capabilities of the WCF programming model enable a great level of…(read more)
by community-syndication | Jul 29, 2010 | BizTalk Community Blogs via Syndication
Earlier this week the Visual Studio team released updated VS 2010 Keyboard Shortcut Posters. These posters are print-ready documents (that now support standard paper sizes), and provide nice “cheat sheet” tables that can help you quickly lookup (and eventually memorize) common keystroke commands within Visual Studio.
This week’s updated posters incorporate a number of improvements:
- Letter-sized (8.5”x11”) print ready versions are now available
- A4-sized (210x297mm) print ready versions are now available
- The goofy people pictures on them are gone (thank goodness)
The posters are in PDF format – enabling you to easily download and print them using whichever paper size is in your printer.
Download the Posters
You can download the VS 2010 Keybinding posters in PDF format here.
Posters are available for each language. Simply look for the download that corresponds to your language preference (note: CSharp = C#, VB = VB, FSharp = F#, CPP = C++).
Hope this helps,
Scott
P.S. In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu
by community-syndication | Jul 29, 2010 | BizTalk Community Blogs via Syndication
Last week I stumbled upon the Tenth issue op BizTalk HotRod. I have looked into it a couple of times cause there are so much goodies in there. The items covered in this issue are: Creating Business Documents Automating deployments of BizTalk change requests…(read more)
by community-syndication | Jul 28, 2010 | BizTalk Community Blogs via Syndication
by community-syndication | Jul 28, 2010 | BizTalk Community Blogs via Syndication
I am sure you are excited about Windows Workflow foundation. Who is not? except those poor Java guys…
Here is a collection of Videos available on Windows Workflow Foundation 4. I hope you find it useful. The list will keep growing, so feel free to bookmark this page for later reference.
read more
by community-syndication | Jul 28, 2010 | BizTalk Community Blogs via Syndication
Today is a special day for us. After two years of steadily growing Tellago , we have decided to launch a new company to focus on building enterprise software. In principle the idea is very simple, we want to translate the lessons we have learned in our…(read more)
by community-syndication | Jul 28, 2010 | BizTalk Community Blogs via Syndication
Olaf and I were cracking away on some SharePoint 2010 work which we thought should
be simplepoint SPMetal to the site and start LINQ-ing to our hearts content..
with the one exception that we couldn’t select items from a list based on their Content
Type.
By default SPMetal.exe doesn’t include these ’system’ fields (apart
from ID + Title – go figure) and the secret is to use an Override file.
The good oil is:http://msdn.microsoft.com/en-us/library/ee535056.aspx
(Here’s a good article on how .NET Types are mapped to SharePoint – http://msdn.microsoft.com/en-us/library/ee536245.aspx)
The simple override/parameters file:
<Web AccessModifier="Internal" xmlns="http://schemas.microsoft.com/SharePoint/2009/spmetal">
<ContentType Name="Item" Class="Item">
<Column Name="ContentType" Member="ContentType" />
</ContentType>
</Web>
The SPMetal Command Line
The VS.NET Code
static void Main(string[]
args)
{
using (BreezeDataContext dc
= new BreezeDataContext("http://breezelocal"))
{
var myitems
= from i in dc.GetList<ContentListTraining>("My
Content List")
where i.ContentType
== "Training"
select i;
var courses
= myitems.ToList<ContentListTraining>();
Console.WriteLine("There
are {0} items",courses[0].Title);
}
Console.ReadLine();
}