chakravarthy_b

Hi,

Is there any tool available for converting a workflow type to XAML format

Regards,

Chakri.



Re: Windows Workflow Foundation Automatic conversion of workflow type to XAML

chakravarthy_b

I saw a method named Serialize in WorkflowMarkupSerializer class with the following description.

"Serializes an Object into extensible Application Markup Language (XAML) format."

Can this method convert a workflow type to XAML format If yes, please provide me examples.

Thanks & Regards,

Chakri.





Re: Windows Workflow Foundation Automatic conversion of workflow type to XAML

Vignesh Kannappan - MSFT

Hi -

I think this ought to get you started on workflow markup serialization.

http://msdn2.microsoft.com/en-us/library/ms735702.aspx

Crux: You cannot convert a workflow type to a XAML, but you can create an instance of the workflow type and be able to serialize if to XAML.

Let us know if you need any more info/help.

Vignesh






Re: Windows Workflow Foundation Automatic conversion of workflow type to XAML

chakravarthy_b

Does anybody have any idea about this one



Re: Windows Workflow Foundation Automatic conversion of workflow type to XAML

dfoliveira

Hi,

To serialize a workflow you just need this code:

using System.Workflow.ComponentModel.Serialization;
using System.Xml;

using (XmlWriter writer = new XmlTextWriter("C:\\Workflow.xoml", System.Text.Encoding.Default))
{
WorkflowMarkupSerializer serializer =
new WorkflowMarkupSerializer();
serializer.Serialize(writer, workflowInstance);
}

But in this way you need a workflow instance instead a workflow type.

Hope it's useful.

Daniel Oliveira






Re: Windows Workflow Foundation Automatic conversion of workflow type to XAML

NMF

Daniel,
I think this is not what the initial poster is asking, this is serializing a workflow instance, not the workflow definition.
I posted a similar question a while back and got no answer. The problem I have is that we started developing a code based workflow and would now like to convert it to XAML with code behind but apparently we're stuck with our initial choice and it's now too much work manually convert the workflow to XAML.

--
Nuno




Re: Windows Workflow Foundation Automatic conversion of workflow type to XAML

dfoliveira

Hi Nuno,

If is just this case maybe you can create a workflow instance, serialize to a XOML file and then create a new workflow and copy the content serialized, can you
I'll try find for other solution using just workflow type. If I find something I'll post.


Good luck.