none
Code of the shapes used in Orchestration

    Question

  • Hi All,

    Is there a way to see the code of the shapes  used in Orchestration?

    Example : Receive Shape, Send Shape etc? 

    Wednesday, December 04, 2013 2:04 PM

Answers

  • Here's the deal with this.

    Orchestration source code is called XLang/s.  At build time XLang/s is compiled to C#.  That C# is then compiled into the final project Assmebly.

    So, yes, you can see the code behind but you won't necessaryily see corresponding classes/objects.  No, there is no capability to modify the C# and any attmpt is absolutely non supported.  However, you can step through in the debugger.

    /obj/Debug/BizTalk/XLang/File0.cs is where you'll find the C# for all Orchestrations in the Project.

    The XLang/s Language: http://msdn.microsoft.com/en-us/library/aa577463.aspx

    • Edited by Johns-305 [boatseller] Wednesday, December 04, 2013 4:03 PM Addl reference
    • Proposed as answer by jsb85 Thursday, December 05, 2013 6:24 AM
    • Marked as answer by Attty Monday, December 09, 2013 9:10 AM
    Wednesday, December 04, 2013 2:48 PM
  • Hi Atul,

    The orchestration’s ODX file contains both XML and private BizTalk language called X#. Its not in C#, it may look like C# but it’s actually X#. XML and X# represent the orchestration and either can be generated from the other. Toolset in visual studio enables you to complied to .NET assembly using .NET reflect you can see the C# code of it.

    Opening the *.ODX file would enable you to see the XML and X# formation of the orchestration. (Right-click the orchestration file in visual studio, select “Open with” and choose and XML editor). In this file you will have not XML part and X# at the bottom of the file.

    You can play around BizTalk X# compiler, XSharpP.exe.

    Just using the X# part of the orchestration you can, in fact generate the XML for the ODX. Similarly, you can delete the X# code from the bottom on an ODX. The Orchestration Designer will generate the X# from the XML in the ODX when you save and compile the ODX.

    The BizTalk X# compiler, XSharpP.exe, translates the X# into C# code. This C# is then compiled down to MSIL using the .NET C# compiler, and it is this assembly that is executed at runtime.

    Reference: My favourite BizTalk book Professional BizTalk server 2006


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful.



    • Edited by M.R.AshwinPrabhuMVP Wednesday, December 04, 2013 3:36 PM
    • Proposed as answer by jsb85 Thursday, December 05, 2013 6:21 AM
    • Marked as answer by Attty Monday, December 09, 2013 9:11 AM
    Wednesday, December 04, 2013 3:30 PM
  • Hi Atul,

    Adding to above suggestions, have a look at following post: View Orchestration in C#


    Sunday, December 08, 2013 3:00 PM

All replies

  • Here's the deal with this.

    Orchestration source code is called XLang/s.  At build time XLang/s is compiled to C#.  That C# is then compiled into the final project Assmebly.

    So, yes, you can see the code behind but you won't necessaryily see corresponding classes/objects.  No, there is no capability to modify the C# and any attmpt is absolutely non supported.  However, you can step through in the debugger.

    /obj/Debug/BizTalk/XLang/File0.cs is where you'll find the C# for all Orchestrations in the Project.

    The XLang/s Language: http://msdn.microsoft.com/en-us/library/aa577463.aspx

    • Edited by Johns-305 [boatseller] Wednesday, December 04, 2013 4:03 PM Addl reference
    • Proposed as answer by jsb85 Thursday, December 05, 2013 6:24 AM
    • Marked as answer by Attty Monday, December 09, 2013 9:10 AM
    Wednesday, December 04, 2013 2:48 PM
  • Hi Atul,

    The orchestration’s ODX file contains both XML and private BizTalk language called X#. Its not in C#, it may look like C# but it’s actually X#. XML and X# represent the orchestration and either can be generated from the other. Toolset in visual studio enables you to complied to .NET assembly using .NET reflect you can see the C# code of it.

    Opening the *.ODX file would enable you to see the XML and X# formation of the orchestration. (Right-click the orchestration file in visual studio, select “Open with” and choose and XML editor). In this file you will have not XML part and X# at the bottom of the file.

    You can play around BizTalk X# compiler, XSharpP.exe.

    Just using the X# part of the orchestration you can, in fact generate the XML for the ODX. Similarly, you can delete the X# code from the bottom on an ODX. The Orchestration Designer will generate the X# from the XML in the ODX when you save and compile the ODX.

    The BizTalk X# compiler, XSharpP.exe, translates the X# into C# code. This C# is then compiled down to MSIL using the .NET C# compiler, and it is this assembly that is executed at runtime.

    Reference: My favourite BizTalk book Professional BizTalk server 2006


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful.



    • Edited by M.R.AshwinPrabhuMVP Wednesday, December 04, 2013 3:36 PM
    • Proposed as answer by jsb85 Thursday, December 05, 2013 6:21 AM
    • Marked as answer by Attty Monday, December 09, 2013 9:11 AM
    Wednesday, December 04, 2013 3:30 PM
  • You can also run IlSpy on any BizTalk artifact and most of the BizTalk dll's themselves to see what they're doing internally.  It's actually some pretty cool code.

    -Dan


    If this answers your question, please Mark as Answer

    Wednesday, December 04, 2013 9:14 PM
  • Hi Atul,

    Adding to above suggestions, have a look at following post: View Orchestration in C#


    Sunday, December 08, 2013 3:00 PM