I want to replicate the scenario workflow scenario programatically. I have simple workflow with 2 state Draft and Published (or Approved). User with right permission can edit, save and even submit the changes Or other user can review and submit from their workbox. This works fine when user edit the changes in content editor.
But I have a code to update some of the items programatically and I am using switch user to run that piece of code under some specific user context. Now the problem is, those updates are not going through workflows. I am able to update the workflow details (workflow id, state id) to the item's corresponding field ("__Workflow", "__Workflow state") but the problem is those items doesn't appear in Workbox. The goal is to update the items programatically (including create new version), but someone has to review and submit to get the updated items published.
Please let me know if anyone got inputs.
Thanks, Sharath