Australian Technical Workshops

Microsoft Technical Workshops, across Australia, empowers businesses of any size, IT Professionals and Developers, with the skills and knowledge needed to:

* Make the right technology decisions

* Deploy effectively

* enable customers to realise their full potential

ATTEND a Technical Workshop, to improve your business and increase you skills. For details on these Workshops, please click on the below URL:

Microsoft Technical Workshops

Teched EMEA 2008 Wrap-up

Teched EMEA 2008 Wrap-up

I had a great time at Teched EMEA last week in Barcelona. I gave several talks on emerging technologies in the Connected Systems space and had a great time interacting with everyone at the show. This is always one of my favorite conferences of the year.

If you're looking for my demos, you can download them here.

Also, if you weren't able to get a Pluralsight On-Demand invitation code from one of us during the show, contact me directly and let me know which session you attended and we'll get you one via email.

Also, they've announced the locations for next year's Teched events. Teched US will be held in Los Angeles, May 11-15, 2009. And Teched EMEA is moving to Berlin! (sometime in November 2009)

Back to Life, Back to Reality

Back to Life, Back to Reality

Back from PDC08, back from TechEd EMEA 2008, session done yesterday at the Architect Forum 2008. The trip to PDC08 was very interesting, on the same level as the 2005 edition, now focused – obviously – on cloud computing. TechEd was interesting for me especially because of the Architecture track, which was the best I’ve ever attended, but the best was being at the Ask The Experts BizTalk booth: we had several people going by with interesting questions and challenges, and I got to do several contacts. Yesterday in Lisbon I did the afternoon session at the Microsoft Architect Forum 2009, representing GASP and together with Jos%u00e9 Ant%u00f3nio Silva and Nuno Godinho as the developer. The topic, obviously, was around the cloud.

I have several posts to do, I’ll try to add them in the next few days.

Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!

Solving the "If-Then-Else" problem in a map – part II

Solving the "If-Then-Else" problem in a map – part II

Hi all

This is the second post in a series about solving the “If-Then-Else” problem in a
map. In my first
post
I discussed how to use BizTalks built-in functionality to solve the problem.
Neither of the three proposed solutions really seem nice to me, so I wondered how
difficult it might be to code a custom functoid that does the trick. It turned out
to be unexpectedly hard, and this post tries to clarify my findings and explain them.

So, to continue from my previous post, to me the best solution is to code your own
functoid, that mimics the value mapping functoid, but adds an “else” part. So basically
just a third parameter to the value  mapping functoid that is returned in case
the first parameter is false.

For information about how to program a custom functoid, please visit http://msdn.microsoft.com/en-us/library/aa560879.aspx
I wont go into details about that here. I will just comment on the issues I have had
with creating this particular functoid.

The final solution should give me the possibility to have a map like this one:

IfThenElseCustomFunctoid

YES, I know my icons are very bad… Anyway, three inputs: a boolean and two values.

So, getting to the code, my first try looked like this:

— BEGIN CODE
this.SetMinParams(3);
this.SetMaxParams(3);
this.Category = FunctoidCategory.ValueMapping;
this.OutputConnectionType = ConnectionType.AllExceptRecord;
AddInputConnectionType(ConnectionType.AllExceptRecord);
AddInputConnectionType(ConnectionType.AllExceptRecord);
AddInputConnectionType(ConnectionType.AllExceptRecord);
— END CODE

I have removed irrelevant lines, such as setting up the resources, setting the ID,
and so on.

First of all, in the code of a custom functoid, you need to specify which category
the functoid should belong to. The possibilities are listed at http://msdn.microsoft.com/en-us/library/microsoft.biztalk.basefunctoids.functoidcategory.aspx.
I hadn’t really looked at this list, since I thought that the intellisense in VS.NET
2005 was good enough. Since my functoid is an advanced value mapping functoid, I chose
he value mapping category. This turned out a but different than I thought. It turns
out, that the category you assign to a custom functoid not only determines where in
the toolbox it should be placed, but also sometimes some extra functionality is added
to the functoid. Given my map above, I had expected that the created XSLT would just
call my functoid with the three parameters and then my code would do the rest. But
the generated XSLT looks like this:

<?xml version=”1.0″ encoding=”UTF-16″?>
<xsl:stylesheet xmlns:xsl=”http://www.w3.org/1999/XSL/Transform” xmlns:msxsl=”urn:schemas-microsoft-com:xslt”
xmlns:var=”http://schemas.microsoft.com/BizTalk/2003/var” exclude-result-prefixes=”msxsl
var s0 userCSharp” version=”1.0″ xmlns:s0=”http://eliasen.eu.BizTalk.TestProject.InputSchema” xmlns:ns0=”http://eliasen.eu.BizTalk.TestProject.OutputSchema” xmlns:userCSharp=”http://schemas.microsoft.com/BizTalk/2003/userCSharp”>
  <xsl:output omit-xml-declaration=”yes” method=”xml” version=”1.0″ />
  <xsl:template match=”/”>
    <xsl:apply-templates select=”/s0:InputRoot” />
  </xsl:template>
  <xsl:template match=”/s0:InputRoot”>
    <xsl:variable name=”var:v1″ select=”userCSharp:LogicalEq(string(qualifier/text())
, &quot;Jan&quot;)” />
    <ns0:OutputRoot>
      <xsl:if test=”string($var:v1)=’true'”>
        <xsl:variable name=”var:v2″ select=”IfTrue/text()”
/>
        <OutputField>
          <xsl:value-of select=”$var:v2″
/>
        </OutputField>
      </xsl:if>
    </ns0:OutputRoot>
  </xsl:template>
</xsl:stylesheet>

I have removed all the lines associated with the equals-functoid as that included
three inline c# methods which are irrelevant. Anyway, as you can see, my functoid
is not being called at all. Because I chose the ValueMapping category, the generated
xslt assumes it is actually a built-in value mapping functoid and it totally overrules
the logic inside the functoid.

So, this really came as a surprise to me… but well…it makes sense when you think
about it, naturally. Some of the types of functoids just require logic that goes beyond
the code inside a functoid.

So, the ValueMapping category just didn’t work for me. Then I thought; “Oh, who cares?”?
I will just use the String category instead, because those certainly do not have weird
functionality around them… they get input and return a string as output, that is
it. And the functoid will just appear in the String group in the toolbox in VS.NET.

That gave me a new headache, that was another surprise; You cannot connect the output
of a logical functoid to the input of a string functoid. So… I was stuck.

One of my solutions would accept the output of a logical functoid as input, but my
functoid logic was overridden. The other simply wouldn’t accept the output of a logical
functoid as input.

I have tried the following FunctoidCategories:

Category Description
Assert Terminates when logical functoid returns true. Has the wrong value in output field
when logical functoid returns false.
Conversion Cannot connect output of logical functoid to input.
Count Cannot connect output of logical functoid to input.
Cumulative Cannot connect output of logical functoid to input.
DatabaseExtract Cannot connect output of logical functoid to input.
DatabaseLookup Cannot connect output of logical functoid to input.
DateTime Cannot connect output of logical functoid to input.
ExitenceLooping Cannot connect output of logical functoid to input.
Index Cannot connect output of logical functoid to input.
Iteration Cannot connect output of logical functoid to input.
Keymatch Cannot compile. You get an “Object not set to an instance of an object” exception.
Logical The output field isn’t created.
Looping Cannot connect output of logical functoid to input.
MassCopy Cannot connect output of logical functoid to input.
Math Cannot connect output of logical functoid to input.
NilValue Only creates output field if logical functoid returns true and then it adds the xsi:nil
attribute and no value in the output field.
Scientific Cannot connect output of logical functoid to input.
Scripter The scripting functoid has no script type set, either external or inline, so proper
code cannot be generated for it.
String Cannot connect output of logical functoid to input.
TableExtractor Cannot connect output of logical functoid to input.
TableLooping Needs the table grid configured and is therefore useless.
Unknown Cannot connect output of logical functoid to input.
ValueMapping Only creates the output field if the logical functoid returns true.
XPath Cannot connect output of logical functoid to input.

So, basically, I haven’t been able to do it… for now. Either I cannot connect a
logical functoid to my custom functoid, I get an error either at compile time or something
goes wrong semantically at runtime.

I haven’t given up 100% yet… but I must say, that the task has turned out to be
a whole lot more difficult than I thought it would be.

Look out for a part 3 in this series… if it comes, I will have solved this issue
🙂



eliasen

Update on Silverlight 2 – and a glimpse of Silverlight 3

Update on Silverlight 2 – and a glimpse of Silverlight 3

We shipped Silverlight 2 last month.  Over the last 4 weeks, the final release of Silverlight 2 has been downloaded and installed on more than 100 million consumer machines.  It has also recently been published to corporate administrators via the Microsoft SMS and Microsoft Update programs to enable them to automatically deploy across enterprises.  Over 1 in 4 computers on the Internet now have some version of Silverlight installed.

Silverlight 2 was a major release, and delivered an impressive set of cross-browser, cross-platform functionality for Media and Rich Internet Application experiences.  It has been great watching new sites launch using it.

Media Experiences

Silverlight 2 enables the highest quality video on the web, and delivers it with the lowest TCO of any media platform.

One of the capabilities built-into Silverlight 2 is its support for "adaptive streaming" – which enables video to be delivered at multiple bitrates (for example: 400Kbits, 800Kbits, 1.5Mbits, 2Mbits) with Silverlight dynamically choosing the optimal bitrate to use depending on the network bandwidth and CPU capability of the client (it can also automatically switch bitrates seamlessly if conditions change later). 

Silverlight’s adaptive streaming support is extensible.  Move Networks (who helped pioneer the concept of adaptive streaming) have already integrated their adaptive streaming solution with Silverlight.  Silverlight 2 and Move were used to stream the Democratic National Convention live on the web this summer. 

Last month we announced that Microsoft will be adding adaptive streaming support as a free feature of our IIS7 web-server.  IIS Smooth Streaming will provide an integrated way to deliver HD quality adaptive video over the web. Visit Akamai’s www.smoothhd.com site to see some awesome examples of Silverlight 2 and IIS Smooth Streaming in action (with adaptive streaming up to 2.5Mbits).

The NBC Olympics site used Silverlight 2 to serve more than 3,500 hours of live and on-demand Olympic coverage to over 60 million unique visitors this summer.  Visitors to the site watched an average of 27 minutes of video – which is stunningly high for online video.  The site used the new Silverlight adaptive streaming capability to support 1.5Mbit bitrates – which helped deliver an awesome video experience:

In addition to powering the Olympics experience in the US, Silverlight was also used in France (by FranceTV), the Netherlands (by NOS), Russia (by Sportbox.ru) and Italy (by RAI).  In addition to video quality, a big reason behind these broadcasters decision to use Silverlight was the TCO and streaming cost difference Silverlight provided.  In the August 2008 edition of Web Designer Magazine (a Dutch publication) a NOS representative reported that they were able to serve 100,000 concurrent users using Silverlight and 40 Windows Media Servers, whereas it would have required 270 servers if they had used Flash Media Servers.

Over the last month we’ve seen several major new deployments of Silverlight for media scenarios.  For example: CBS College Sports is now using Silverlight to stream NCAA events from its 170 partner colleges and university.  Blockbuster is replacing Flash with Silverlight for its MovieLink application. And Netflix two weeks ago rolled out its new Instant Watch service using Silverlight. 

Rich Internet Applications (RIA) Experiences

Silverlight 2 delivers a cross-browser, cross-platform subset of the .NET Framework, and enables developers to build Rich Internet Applications. 

Developers can use either VS 2008 or the free Visual Web Developer 2008 Express to open and edit Silverlight 2 projects, and get a powerful code-focused .NET development environment.  Designers can use Expression Blend 2 SP1 to open and edit the same projects and use a creative tool to sculpt and create rich user experiences.  I recently blogged about the nice developer/designer workflow this enables here.  Two weeks ago at the PDC we also shipped the first release of our Silverlight Toolkit – an open source project which adds additional runtime controls and components for Silverlight 2 development (including new charting controls). 

A number of customers have already launched Internet-facing Silverlight 2 RIA solutions (including Renault, Hard Rock and Toyota). For example, last month AOL launched their new AOL Mail RIA using Silverlight 2:

Silverlight 2 is also now being used in a variety of enterprise solutions.  For example, K2 recently launched their new Blackpoint workflow management solution for Microsoft SharePoint using Silverlight:

Microsoft is also deploying new Silverlight based RIA experiences.  The Windows Live Team’s new photo application (photos.live.com) and video communications application (videomessages.live.com) are both built with Silverlight 2, as is the new MSN Toolbar (it uses Silverlight to customize the browser frame).  Last month at the PDC we also gave a first sneak-peak demo of some of the new Office 14 Web Companion RIA applications which use Silverlight.

Silverlight 3

Next year we will ship our next major Silverlight release — Silverlight 3. 

Silverlight 3 will include major media enhancements (including H.264 video support), major graphics improvements (including 3D support and GPU hardware acceleration), as well as major application development improvements (including richer data-binding support and additional controls).  Note these are just a small sampling of the improvements – we have plenty of additional cool features we are going to keep up our sleeves a little longer. 😉

Next year Visual Studio and Visual Web Developer Express will also support a fully editable and interactive designer for Silverlight, and add tool support for data-binding:

We are pretty excited about where Silverlight is today, as well as the roadmap in place over the next year.  It has been really great to watch customers go live with cool solutions.  The next year is going to be a fun one as more and more sites launch with Silverlight 2, and as even bigger scenarios are enabled with Silverlight 3 and beyond. 🙂

Hope this helps,

Scott

FunctoidCategory of custom functoids – Part I

Hi all

I am doing a lot of functoid implementation these days, and therefore, I have for
instance decided to find out what these FunctoidCategories are and where in the toolbox
the different categories belong.

In the toolbox, we have the following groups of functoids:

  • String

  • Mathematical

  • Logical

  • Date/Time

  • Conversion

  • Scientific

  • Cumulative

  • Database

  • Advanced

I still remember my first custom functoid – I was really expecting that in my code
I could decide in which group my functoid should appear and maybe even create my own
group. But that isn’t the case. There are 24 different FunctoidCategories that I can
assign my functoid, and only the above 9 groups. You can read more about the different
functoid categories here.
Basically, I will just give a very short resum%u00e9 of this information and then I will
match each category to a group in the toolbox, so you have this information for future
reference.

So, this is what I know:

Category Toolbox group Description
Assert Advanced For internal use only.
Conversion Conversion Converts characters to and from their numeric representation, and to convert numbers
from one base to another.
Count Advanced For internal use only.
Cumulative Cumulative Performs various kinds of accumulation of the value of a field that occurs multiple
times in a source document and outputs a single output.
DatabaseExtract Database For internal use only.
DatabaseLookup Database For internal use only.
DateTime Date/Time Adds date, time, date and time, or add days to a specified date, in output data.
ExistenceLooping Advanced For internal use only.
Index Advanced For internal use only.
Iteration Advanced For internal use only.
Keymatch Advanced For internal use only.
Logical Logical Controls conditional behavior of other functoids to determine whether particular output
data is created.
Looping Advanced For internal use only.
MassCopy Advanced For internal use only.
Math Mathematical Performs specific numeric calculations such as addition, multiplication, and division.
NilValue Advanced For internal use only.
Scientific Scientific Performs specific scientific calculations such as logarithmic, exponential, and trigonometric
functions.
Scripter Advanced For internal use only.
String String Manipulates data strings by using well-known string functions such as concatenation,
length, find, and trim.
TableExtractor Advanced For internal use only.
TableLooping Advanced For internal use only.
Unknown Advanced For internal use only.
ValueMapping Advanced For internal use only.
XPath Advanced For internal use only.

To see this for your self, download

. Unzip the zip file, copy the dll to “%BTS%\Developer Tools\Mapper Extensions”, where
%BTS% is the installation folder of BizTalk. Then go to VS.NET 2005 and reload the
toolbox. If you want use one of the functoids, remember to also GAC the dll. All the
functoids have the exact same implementation, but they do not generate the same XSLT
by the mapper because of the chosen category. Perhaps a new blog post on that later
on…



eliasen

Controlling authentication with the WF 3.5 SendActivity

Controlling authentication with the WF 3.5 SendActivity

Someone emailed me a question about whether or not you can specify credentials when
using the OOB SendActivity in WF 3.5 because they heard that you had to write a custom
activity to accomplish this.  You do not have to write a custom activity. 
While it is true that the SendActivity links to a named endpoint, and if you use the
configuration file to configure your endpoint you can’t specify specific credentials
(a username and password for example),  WF 3.5 has a OOB WorkflowRuntime Service
named the ChannelManagerService.  The ChannelManagerService (which I described
in my article on MSDN – here http://msdn.microsoft.com/en-us/library/cc626077.aspx
allows you to pre-populate some or all of the endpoints you want the SendActivities
running inside of your WorkflowRuntime to use.  So you definitely can programmatically
configure an Endpoint that the SendActivity can use without having to write a custom
activity.



Check out my new book on REST.