前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Flowportal.Net BPM升级小计2

Flowportal.Net BPM升级小计2

作者头像
崔文远TroyCui
发布2019-02-27 09:56:39
8670
发布2019-02-27 09:56:39
举报
文章被收录于专栏:远在上海

上次BPM升级后,经过几天的使用,只发现了一个升级造成的问题,是在一个新员工招聘入职流程里写了一个C#的步骤来触发其他流程,下图是出错信息:

经过和厂商确认,把原来的写法:“process.CreateTask(owner,datasetPost).Step.Approve();”改写成如下格式后问题解决:BPMTask task = process.CreateTask(owner, datasetPost); task.Step.Approve();

附上完整的触发流程的C#代码,供大家参考

代码语言:javascript
复制
//把当前的流程保存到数据库
Context.Current.Task.SaveToDB();
if ((String)Context.Current.FormDataSet["FormEmployeeOnBoard.NeedTelephone"]=="Yes")
{
String CurrentUser = (String)Context.Current.FormDataSet["FormEmployeeOnBoard.Requester"];
Member owner = Member.FromAccount(CurrentUser);
//Member owner = Member.FromAccount("troy.cui");
BPMProcess process = BPMProcess.GetProcess("座机电话申请 - Request for Telephone");
FlowDataSet datasetPost = DataSourceManager.LoadDataSetSchema(process.GlobalTableIdentitys);
FlowDataTable table = datasetPost.Tables["FormTelephone"];
FlowDataRow row = table.NewRow();
table.Rows.Add(row);
row["EmployeeID"] =(String)Context.Current.FormDataSet["FormEmployeeOnBoard.EmployeeID"];
row["DepartmentName"] =(String)Context.Current.FormDataSet["FormEmployeeOnBoard.DepartmentName"];
row["ChineseName"] =(String)Context.Current.FormDataSet["FormEmployeeOnBoard.ChineseName"];
row["EnglishName"] =(String)Context.Current.FormDataSet["FormEmployeeOnBoard.EnglishName"];
row["PositionName"] =(String)Context.Current.FormDataSet["FormEmployeeOnBoard.PositionName"];
row["Office"] =(String)Context.Current.FormDataSet["FormEmployeeOnBoard.Office"];
row["LineManager"] =(String)Context.Current.FormDataSet["FormEmployeeOnBoard.LineManager"];
row["OnBoardDate"] =Context.Current.FormDataSet["FormEmployeeOnBoard.OnBoardDate"];
row["Requester"] =(String)Context.Current.FormDataSet["FormEmployeeOnBoard.Requester"];
row["RequestDate"] =(DateTime)Context.Current.FormDataSet["FormEmployeeOnBoard.RequestDate"];
row["Remark"] =(String)Context.Current.FormDataSet["FormEmployeeOnBoard.Remark"];
row["Status"] =(String)Context.Current.FormDataSet["FormEmployeeOnBoard.Status"];
//使用数据库默认时间
//row["TransDate"] =(DateTime)Context.Current.FormDataSet["FormEmployeeOnBoard.TransDate"];
row["TransIP"] =(String)Context.Current.FormDataSet["FormEmployeeOnBoard.TransIP"];
row["CreationUser"] =(String)Context.Current.FormDataSet["FormEmployeeOnBoard.CreationUser"];
row["LastUpdateIP"] =(String)Context.Current.FormDataSet["FormEmployeeOnBoard.LastUpdateIP"];
//使用数据库默认时间
//row["LastUpdateDate"] =(DateTime)Context.Current.FormDataSet["FormEmployeeOnBoard.LastUpdateDate"];
row["LastUpdateUser"] =(String)Context.Current.FormDataSet["FormEmployeeOnBoard.LastUpdateUser"];
//process.CreateTask(owner,datasetPost);
//自动审批通过第一步 3.5n
//process.CreateTask(owner,datasetPost).Step.Approve();
//自动审批通过第一步 3.5t
BPMTask task = process.CreateTask(owner, datasetPost);
task.Step.Approve();
}
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2012年2月28日,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
数据库
云数据库为企业提供了完善的关系型数据库、非关系型数据库、分析型数据库和数据库生态工具。您可以通过产品选择和组合搭建,轻松实现高可靠、高可用性、高性能等数据库需求。云数据库服务也可大幅减少您的运维工作量,更专注于业务发展,让企业一站式享受数据上云及分布式架构的技术红利!
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档