半盏清茶

导航

eas 判断单据是否在流程中

public boolean checkInWorkflow(String id){
  invoiceItems = this.editData.getInvoiceEntries();

  txtTotalAmount.setEnabled(false);
  ProcessInstInfo instInfo = null;
  ProcessInstInfo[] procInsts = null;
  try{
    IEnactmentService service2 = EnactmentServiceFactory.createRemoteEnactService();
    procInsts = service2.getProcessInstanceByHoldedObjectId(id);
  }
  catch (BOSException e){
    handUIException(e);
  }
  int i = 0;
  for (int n = procInsts.length; i < n; ++i) {
  if (("open.running".equals(procInsts[i].getState())) || ("open.not_running.suspended".equals(procInsts[i].getState())))
    instInfo = procInsts[i];
  }
  if (instInfo == null){
    return false;
  }else{
    return true;
  }
}

posted on 2020-10-21 15:15  半盏清茶  阅读(216)  评论(0编辑  收藏  举报