locked
Can bookmarks be used in dynamic workflows. RRS feed

  • Question

  • Hi,

    I created a native activity to read input from console and it uses bookmark. Then I created a workflow in XAML and added the native activity to the workflow.

    I do not want to complie this workflow so that later on if i want to change it dynamically i can change it without recompiling the application.

    Is this possible using WF.

    Thanks

    Neha

    Saturday, January 8, 2011 6:36 AM

Answers

All replies

  • May be this solution will hlpful?

    XmlReader xmlREader = XmlReader.Create(name);
                
    XamlSchemaContext context = new XamlSchemaContext();
                
                
    XamlReader reader = new XamlXmlReader(xmlREader, context);
                
    WorkflowElement workflow = XamlServices.Load(name) as WorkflowElement;
                
    wd.Load(workflow);

     

    You can load xaml WF dynamicly

    Sunday, January 9, 2011 10:25 PM
  • Hi, Neha

    ->"I do not want to complie this workflow so that later on if i want to change it dynamically i can change it without recompiling the application."
    You can load up a XAML file workflow and run it directly by just one line code:
    Activity workflowImplementation =
                    ActivityXamlServices.Load(@"file path\Workflow1.xaml");

    Please also note that you cannot change a WF4 workflow definition when it is in running. because WF4 persistence store won't store any definition info to make sure workflow runs fast. WF3 persistence store will store both running state and workflow definition.

    Hope this helps
    Regards

    MSDN Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    This posting is provided "AS IS" with no warranties, and confers no rights. My Blog: http://xhinker.com
    Microsoft Windows Workflow Foundation 4.0 Cookbook
    Tuesday, January 11, 2011 8:10 AM
  • Hi Andrew,

    If its not possible to change the workflow definition, as the already persisted instances may fail because of this change, then what purpose Dynamic activity solves.

    Also, is there any other way, by which I can change the workflow definition without compilation.

    Business rules are destined to change with time. How will they be handled so that no compilation is required.

    Thanks

    Neha

    Tuesday, January 11, 2011 8:17 AM
  • Hi, Neha

    It is called versioning. Please also see this thread:
    http://social.msdn.microsoft.com/Forums/en-US/wfprerelease/thread/09aee61a-c9a1-4dec-ac0a-889a5e38bc41/

    Here is the video link:
    http://player.microsoftpdc.com/Session/3b87c17b-a218-40d3-984f-78a012331dee/12.29

    Regards
    MSDN Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    This posting is provided "AS IS" with no warranties, and confers no rights. My Blog: http://xhinker.com
    Microsoft Windows Workflow Foundation 4.0 Cookbook
    • Marked as answer by Andrew_Zhu Friday, January 14, 2011 8:52 AM
    Tuesday, January 11, 2011 8:41 AM