I have a SharePoint 2013 workflow that is started programmatically. I am trying to pass a custom value to the workflow. The code to start the workflow looks like this
var payload = new Dictionary<string, object>(); payload.Add("Test", "Hello World"); var workflowServiceManager = new WorkflowServicesManager(site.RootWeb); workflowServiceManager.GetWorkflowInstanceService().StartWorkflowOnListItem(workflow, itemId, payload);
How can I access the value in the payload parameter from within the workflow? I was so far unable to find any kind of documentation on how to do this. The value needs to be set dynamically at runtime, obviously "Hello World" is just a test value.