locked
Is it possible to execute a uncompiled XAML. RRS feed

  • Question

  • Hello Guys,

    I am trying to find a solution for my requirement. I have a applicaiton using that user can create a workflow (XAML) now he should be able to execute that workflow anytime in future. So currently I have a template and use that template to create a workflow solution, I compile that and keep binaries somewhere on physical drive. Now when request is made for executing this I load the binary and call Invoke on that and return result back.

    Something like this

     Type MyLoadClass = workflowAssembly.GetType(workflowName);
                object workflowClass = Activator.CreateInstance(MyLoadClass);
    
                return WorkflowInvoker.Invoke(workflowClass as Activity, inputParameters);
    

    It worked fine for sometime but with increasing demand for editing the apllicaiton things are becoming more complex. As I have compiled binaries (I even keep Xaml file) these are making applicaitons more complex.

    So is it possible to keep XAML in database pull that out while I like to run that. If possible then editing will become much easy and more manageable.

    There is one more thing to be noted that created XAML referes some external assemblies which is in the reference of my templete solution approach.

    Any kind of advice or help is appreciated.

    regards, 


    Software Engineer
    Tuesday, January 3, 2012 11:03 AM

Answers

  • Hi,

    ->So is it possible to keep XAML in database pull that out while I like to run that. If possible then editing will become much easy and more manageable.

    You need to manually save XAML into database and pull it out while you want to run it.

    ->There is one more thing to be noted that created XAML referes some external assemblies which is in the reference of my templete solution approach.

    You can add the references in your application, then XAML will be able to loaded.

    Below is a thread of this topic related, hope helps:

    http://social.msdn.microsoft.com/Forums/en-US/wfprerelease/thread/c341e41c-3505-45cb-aad1-c8d3666db5e1

    Thanks.

     


    Leo Tang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Thursday, January 5, 2012 8:09 AM

All replies

  • Hi,

    ->So is it possible to keep XAML in database pull that out while I like to run that. If possible then editing will become much easy and more manageable.

    You need to manually save XAML into database and pull it out while you want to run it.

    ->There is one more thing to be noted that created XAML referes some external assemblies which is in the reference of my templete solution approach.

    You can add the references in your application, then XAML will be able to loaded.

    Below is a thread of this topic related, hope helps:

    http://social.msdn.microsoft.com/Forums/en-US/wfprerelease/thread/c341e41c-3505-45cb-aad1-c8d3666db5e1

    Thanks.

     


    Leo Tang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Thursday, January 5, 2012 8:09 AM
  • Thanks Leo Tang,

    Yeah, This relaly helped.

     

    regards,


    Software Engineer
    Thursday, January 5, 2012 9:55 AM