locked
How to pass InOutArgument to dynamic activity and later read them RRS feed

  • Question

  • In my code in execute method of activity i am executing a dynamic loaded xaml and pass in arguments :

     

    Literal<long> InTransactionId = new Literal<long>();

    InTransactionId.GetType().GetProperty("Value").SetValue(InTransactionId, TransactionId.Get(context), null);

    (_activity.Properties["TransactionId"].Value as InArgument).Expression = InTransactionId as ActivityWithResult;

    and it is working fine.
    but how should i pass inoutargument so that my inoutargument will changed by dynamic xaml and these changes reflected to workflow also which is calling this dynamic loaded xaml workflow.

     

    Thursday, August 4, 2011 9:08 PM

Answers

  • Hi,

    You can try pass in an Object instead of long. since object is a reference type, value changed inside workflow can also be accessed in the workflow host, where workflow is created and executed.

    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
    • Marked as answer by Andrew_Zhu Thursday, August 11, 2011 8:28 AM
    Wednesday, August 10, 2011 2:48 AM