I’m programatically creating a subsite based on a list item. I need to access the SPWorkflowActivationProperties object in order to get the Site, Web and Item fields.
So I’ve created my workflow and created a class and now I need to access the properties, but I am unsure how. Is there an easy way to access the workflow object that I have overlooked? Or am I supposed to create my methods within in the workflow class? Trying to learn this the proper way.
Thanks
You can access them via a dependency property declared in your custom activity. The web, list, list item information is accessible either via the
__ActivationProperties(of typeSPWorkflowActivationProperties) or via the__Context(of typeWorkflowContext) property.You can find a tutorial how to declare and use them here.