Click below for Step by Step and Interview Q & A (dotnetinter) wrote,
Click below for Step by Step and Interview Q & A

WWF(Windows Workflow Foundation) interview questions: - What is the use of XOML files?

Windows Workflow Foundation gives developers a declarative way to create workflows by using XAML. See WPF chapter for more details about XAML. These markup files are Stored with XOML (Extensible Object Markup Language) extension. In the below snapshot you can see Workflow1.xoml file created by designer. Markup file can also have code behind. The whole concept of having code behind for XOML file is to separate the presentation from logic files.

In the below code snapshot we have made a simple XOML sample. Below is the explanation number wise:-

1 – In order to create a XOML file you need to add sequential workflow with separation. Which means that XOML file will be created with a behind code.

2 – Currently we have two activity code3 and code1.

Below is the XOML file contents: -

<?Mapping XmlNamespace="ComponentModel"
Assembly="System.Workflow.ComponentModel" ?>

<?Mapping XmlNamespace="Compiler"
Assembly="System.Workflow.ComponentModel" ?>

<?Mapping XmlNamespace="Activities" ClrNamespace="System.Workflow.Activities"
Assembly="System.Workflow.Activities" ?>

<?Mapping XmlNamespace="RuleConditions"
Assembly="System.Workflow.Activities" ?>

<SequentialWorkflow x:Class="WorkflowSeq.Workflow1"
x:CompileWith="Workflow1.xoml.cs" ID="Workflow1"
xmlns:x="Definition" xmlns="Activities">

<Code ExecuteCode="Mycode3" ID="code3" />
<Code ExecuteCode="Mycode1" ID="code1" />

See the above snippet of the XOML file. You can see how the behind code is linked using the Compile With attribute. Code forms the element of the Sequential Workflow tag. One of the best thing with Markup is we can change the sequence just by changing the XOML file we do not need to compile the whole application again.

In the above snapshot, one of the things to now is 3, 4, and 5 numbered sections. These sections are not linked with the sample. But just to make you aware you can create serialize any workflow and deserialize them again using the text writer object.

Also see following WWF(Windows Workflow Foundation) interview questions video on sample working of Windows Workflow Foundation(WWF): -

Tags: csharp interview questions, it interview questions with answers, programming interview questions, workflow, wwf(windows workflow foundation)

  • How to create an OLAP Cube?

    This article will have no theory rather than it will have only be demonstrating practical step by step in detail included to create SSAS OLAP Cube:…

  • Instrumentation is SSIS using Data Taps

    In this short article we will hover around some important questions related to Instrumentation done in SSIS using Data Taps. We will only discuss…

  • Create job using SQL Server Agent step by step.

    In MSBI while working on SSIS projects we have to run repetitive task which has to carried out daily like running package or to take weekly backup…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded