I'm adding documents to a records library by clicking 'Add new item', upload the document, set the metadata, then click OK. Up until now, I've been working with this workflow in my VM & local environment. While debugging, my break point in the onWorkflowActivated method would not get hit until I set the properties and click OK.
Now, I am deploying the solution into production, which is a completely different environment. I'm finding that the workflow is now starting when I initially upload the document, before setting any metadata. Because of this reason, no properties are being set in my workflow.
Two questions:
- Is this expected behavior? If so, why wasn't it occurring in my dev environment?
- How do I get around this? If I enter the
onWorkflowActivatedmethod before the properties are set, how do I stop and wait for the properties to exist, then re-instantiate myworkflowPropertiesobject?