签入、签出项目 对于使用 PSI 的特定用户?

发布于 2024-12-04 06:11:42 字数 110 浏览 1 评论 0原文

我有一个业务案例,我必须在工作流程中通过 PSI 签入、签出该项目,但是当我 签出该项目,我无法继续工作流程阶段,PWA 写道,我正在另一个会话中签出该项目,我需要从 PWA 继续工作流程吗?任何帮助或建议

i had a business case that i had to checkin,checkout the project by PSI in the work flow but when i
check out the project i cant continue the work flow stages the PWA writes that iam check out the project in another session and i need to continue the work flow from the PWA? any help or suggestion

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

木森分化 2024-12-11 06:11:42

你重置你的sessionId吗?在整个过程中你必须保存它。
这是一个简短的示例:

//set guids for session and job
Guid sessionId = Guid.NewGuid();
Guid jobId = Guid.NewGuid();

//checkout in the current session
projectSvc.CheckOutProject(ProjectId, sessionId, "custom field update checkout");

//do something (for example, update a project) with the same sessionId!
bool validateOnly = false;
projectSvc.QueueUpdateProject(jobId, sessionId, project, validateOnly);

//simply wait, if you don't use queuing services
System.Threading.Thread.Sleep(4000);

//create a new job ID for the checkin, sessionId stays the same as before!
jobId = Guid.NewGuid();

//checkin the project
bool force = false;
string sessionDescription = "updated custom fields";
projectSvc.QueueCheckInProject(jobId, ProjectId, force, sessionId, sessionDescription);

//wait again (very ugly)
System.Threading.Thread.Sleep(4000);

在这里检查我的答案:使用 PSI - Microsoft Project Server 设置自定义字段

Do you reset your sessionId? You have to store it during the whole process.
Here is a short example:

//set guids for session and job
Guid sessionId = Guid.NewGuid();
Guid jobId = Guid.NewGuid();

//checkout in the current session
projectSvc.CheckOutProject(ProjectId, sessionId, "custom field update checkout");

//do something (for example, update a project) with the same sessionId!
bool validateOnly = false;
projectSvc.QueueUpdateProject(jobId, sessionId, project, validateOnly);

//simply wait, if you don't use queuing services
System.Threading.Thread.Sleep(4000);

//create a new job ID for the checkin, sessionId stays the same as before!
jobId = Guid.NewGuid();

//checkin the project
bool force = false;
string sessionDescription = "updated custom fields";
projectSvc.QueueCheckInProject(jobId, ProjectId, force, sessionId, sessionDescription);

//wait again (very ugly)
System.Threading.Thread.Sleep(4000);

Check my answer here: Setting custom fields using the PSI - Microsoft Project Server

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文