I am trying to automate Workflow. Below code start the workflow and everything goes fine and I get current processinstanceid

 ProcessInstanceData pid =  _CoreServiceClient.StartWorkflow(publicationURI, instruction, _ReadOptions);

However the pid object is not found when the workflow completed and Read method gives exception

 IdentifiableObjectData processInstanceObj = _CoreServiceClient.Read(pid.Id, _ReadOptions);

Is there anyway to get processhistoryinstance id of the processinstancedata (without any hardcoding in code/config file)?

1 Answer 1


When a workflow finishes, the Process Instance is deleted and a Process History is created. The ProcessInstance.Finish method returns the ProcessHistory. You could pick up the Process History ID in a ProcessInstance Finish event handler.

  • ProcessInstanceData is not showing any Finish Property/method. Could you please elaborate the details bit more. Aug 7, 2015 at 17:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.