Get the Instance ID of the current Orchestration
Using the following in an Expression shape will return the Instance Id of the Activating Orchestration instance.
instanceId = Microsoft.XLANGs.Core.Service.RootService.InstanceId;
Where instanceId is of type System.Guid.
Note, this will give you the Instance Id of the Activating Orchestration, not neccessarily the currently executing Orchestration. This distinction is important in the event of the currently executing Orchestration being called as a sub-orchestration via a Call Orchestration, or Start Orchestration shape.
Xslt snippet – Left pad a string
A quick xslt template to left pad a value:
<xsl:template name="prepend-pad">
<!-- recursive template to right justify and prepend the value with whatever padChar is passed in -->
<xsl:param name="padChar"> </xsl:param>
<xsl:param name="padVar"/>
<xsl:param name="length"/>
<xsl:choose>
<xsl:when test="string-length($padVar) < $length">
<xsl:call-template name="prepend-pad">
<xsl:with-param name="padChar" select="$padChar"/>
<xsl:with-param name="padVar" select="concat($padChar,$padVar)"/>
<xsl:with-param name="length" select="$length"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring($padVar,string-length($padVar) - $length + 1)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
-
Archives
- November 2009 (1)
- September 2009 (1)
- August 2009 (2)
- July 2009 (2)
- June 2009 (1)
- April 2009 (2)
- March 2009 (2)
- February 2009 (1)
- January 2009 (1)
- September 2008 (3)
- August 2008 (4)
-
Categories
-
RSS
Entries RSS
Comments RSS


