/**
* 判断单据是否在工作流中
* @param ctx
* @param billId
* @return
* @throws BOSException
*/
public static boolean isInWf(Context ctx, String billId) throws BOSException {
boolean isInWf = false;
IEnactmentService service = null;
if(ctx == null) {
service = EnactmentServiceFactory.createRemoteEnactService();
} else {
service = EnactmentServiceFactory.createEnactService(ctx);
}
ProcessInstInfo processInstInfo = null;
ProcessInstInfo procInsts[] = service.getProcessInstanceByHoldedObjectId(billId);
int i = 0;
for(int n = procInsts.length; i < n; i++)
if(procInsts[i].getState().startsWith("open.running"))
processInstInfo = procInsts[i];
if(processInstInfo != null) {
isInWf = true;
}
return isInWf;
}
判断单据是否在工作流中运行
最新推荐文章于 2021-09-15 10:22:01 发布
本文介绍了一种方法,用于判断特定单据是否正处于工作流处理中。通过使用EnactmentServiceFactory创建的服务实例,获取单据的工作流实例信息,并检查其状态来实现这一目的。

1304

被折叠的 条评论
为什么被折叠?



