从工作流发布组件后,我正在尝试完成活动。
发布完成,设置完成活动消息后出现错误(“对象实例未设置为实例对象”)。
ActivityFinishData activityfinish = new ActivityFinishData();
activityfinish.Message = "Published to WIP Publication Target";
logdetails("Finish Message able to Set using Code,the below is the finish message");
logdetails(activityfinish.Message);
ProcessInstanceData processInstance = new ProcessInstanceData();
ActivityInstanceData activityInstance = (ActivityInstanceData)processInstance.Activities[0];
logdetails(activityInstance.Title.ToString());
logdetails(activityInstance.Id.ToString());
csClient.FinishActivity(activityInstance.Id, activityfinish, readoption);
logdetails("Workflow Finished");