/**
* 判断单据是否在工作流中
* @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;
}
判断单据是否在工作流中运行
最新推荐文章于 2020-12-24 11:09:20 发布