我正在尝试使用 coresrvice 将项目发送回工作流中的 auther,以下是我的代码,在将 usrdata 转换为 linktotrusteedata 时出现编译错误。
WorkItemData workitem = (WorkItemData)csClient.Read(workitemid, readoption);
ProcessInstanceData processInstance = (ProcessInstanceData)csClient.Read(workitem.Process.IdRef, readoption);
IEnumerable<ActivityData> ieActivities = processInstance.Activities;
if (ieActivities != null)
{
ActivityInstanceData targetactivity = (ActivityInstanceData)csClient.Read(processInstance.Activities[0].Id, readoption);
UserData lastperformer = (UserData)csClient.Read(processInstance.Activities[0].Owner.IdRef, readoption);
ActivityFinishData finishData = new ActivityFinishData();
finishData.Message = "Finished automatically";
finishData.NextAssignee = lastperformer;
csClient.FinishActivity(targetactivity.Id, finishData, readoption);
csClient.Close();
}