locked
Windows Workflow 1.0 : Access WorkflowName / WorkflowInstanceName in Custom CodeActivity RRS feed

  • Question

  • I am using Windows workflowManager 1.0 to publish and execute workflows. I have custom activity where I need the name of the workflow.

    I can use any of the following approaches but nothing seems to work:

    1. Get WorkflowExtension from within code activity code to access workflowInstanceInfo,  but when executing from using workflowmanager this object is returned as null

    2. Pass external/ config values while publishing the workflow. However they are not accessible inside code and I couldn't find sample for same.

    3. Pass config values while execution as WorkflowStartParameter, again this is expected to be set to "InArgument" of workflow.

    How can I get a string inside custom code activity?

    Sunday, January 12, 2014 4:49 PM

Answers

  • Hi TS_Prasanna

    > I need the name of the workflow.

    Workflows don't really have a name.  They may come from a file that has a name or a nameless stream.

    If you want to get the type/name of the current workflow from within an activity, please follow the discussion in the link.

    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 TS_Prasanna Wednesday, January 15, 2014 10:23 AM
    Wednesday, January 15, 2014 1:19 AM

All replies

  • Hi TS_Prasanna

    > I need the name of the workflow.

    Workflows don't really have a name.  They may come from a file that has a name or a nameless stream.

    If you want to get the type/name of the current workflow from within an activity, please follow the discussion in the link.

    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 TS_Prasanna Wednesday, January 15, 2014 10:23 AM
    Wednesday, January 15, 2014 1:19 AM
  • Thanks Angie.

    Actually what I was looking for was a way to pass "ExternalVariable" or "ConfigValue" (use dusing publish or execution) to a custom CodeActivity class.

    But I guess there is no way to do that, unless designer uses a GetConfigValue or GetExternalValue activity on the designer and pass value to the next custom activity.

    Wednesday, January 15, 2014 10:25 AM