Search code examples
workflow-foundationworkflow-foundation-4

Get the type/name of the current workflow from within an activity


I'm new to WF but i've created a custom activity and i'd like to get the name / type of the current workflow. I've used context.WorkflowInstanceId to get the guid of the current work flow but i'd like to know the name as well i.e. "Workflow1".


Solution

  • Workflows don't really have a name. They may come from a file that has a name or a nameless stream. You may want to establish your own "name" for the workflow perhaps by passing an argument etc.