locked
Access activity arguments within workflow by code assignment RRS feed

  • Question

  • Hi,

    I do have an activity with some InArguments. I may set these values by a designer and that works fine. But I have to set these values at runtime depending on some other things and with variable content. How may access an activity within the workflow and set some of these InArguments before its executed.

    Best regards,

    Torsten

    Tuesday, October 28, 2014 2:07 PM

Answers

  • Hi zimmy,

    If you have a custom activity, you can access the value of the Arguments configured on it via the execution context.

    Workflow execution properties provide a mechanism to add context specific properties to an activity’s environment. This allows an activity to declare which properties are in scope for its sub-tree and also provides hooks for setting up and tearing down TLS to properly interoperate with CLR objects. See: Workflow Execution Properties

    In addition, you can also refer to this discussion before, reference:  Access to arguments at execution in WF

    Please let me know if there is anything that I can do to help.

    Best regards,

    Angie


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Angie Xu Friday, November 7, 2014 3:00 AM
    Monday, November 3, 2014 2:46 AM

All replies

  • Sorry, are you trying to access InArguments before activity execution?
    Tuesday, October 28, 2014 2:34 PM
  • Yes, I want to set these InArguments before execution (by code assignment or so). I can't see any useful case to set it after execution. Or am I wrong?
    Tuesday, October 28, 2014 2:38 PM
  • Hi zimmy,

    If you have a custom activity, you can access the value of the Arguments configured on it via the execution context.

    Workflow execution properties provide a mechanism to add context specific properties to an activity’s environment. This allows an activity to declare which properties are in scope for its sub-tree and also provides hooks for setting up and tearing down TLS to properly interoperate with CLR objects. See: Workflow Execution Properties

    In addition, you can also refer to this discussion before, reference:  Access to arguments at execution in WF

    Please let me know if there is anything that I can do to help.

    Best regards,

    Angie


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Angie Xu Friday, November 7, 2014 3:00 AM
    Monday, November 3, 2014 2:46 AM