.NET Framework Developer Center > .NET Development Forums > Windows Workflow Foundation > Why can I create a WorkflowInstance from an SequenceActivity derivative?
Ask a questionAsk a question
 

AnswerWhy can I create a WorkflowInstance from an SequenceActivity derivative?

  • Friday, October 23, 2009 4:28 AMca7l0s Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello!

    I was wondering why I can do this:


    WorkflowInstance workflowInstance = workflowRuntime.CreateWorkflow(typeof(ValuationActivity));
    workflowInstance.Start();
    

    where ValuationActivity derives from SequenceActivity. I thought you can only instantiate subtypes of SequenceWorkflowActivity. Is there any performance concern when I run subtypes of SequenceActivity instead of SequenceWorkflowActivity?

    Thanks a lot,

    Carlos

Answers

  • Wednesday, October 28, 2009 5:24 AMAndrew_ZhuMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi,

    ->"I was wondering why I can do this: "
    It is because SequenceActivity is the base class of SequentialWorkflowActivity. in other words, SequentialWorkflowActivity is a class inherit from SequenceActivity.

    ->"Is there any performance concern when I run subtypes of SequenceActivity instead of SequenceWorkflowActivity "
    I don't think there will be performance impact. but there will be some function limitation if you use SequenceAcitivity instead of using SequentialWorkflowAcitvity.

    Regards
    Microsoft Online Community Support

All Replies

  • Wednesday, October 28, 2009 5:24 AMAndrew_ZhuMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi,

    ->"I was wondering why I can do this: "
    It is because SequenceActivity is the base class of SequentialWorkflowActivity. in other words, SequentialWorkflowActivity is a class inherit from SequenceActivity.

    ->"Is there any performance concern when I run subtypes of SequenceActivity instead of SequenceWorkflowActivity "
    I don't think there will be performance impact. but there will be some function limitation if you use SequenceAcitivity instead of using SequentialWorkflowAcitvity.

    Regards
    Microsoft Online Community Support