예제 #1
0
 public void init() {
   List<ProcessInstanceBOInfo> infoes =
       processInstanceBOService.getAllNormalProcessInstanceBOInfo();
   if (infoes != null && infoes.size() > 0) {
     for (ProcessInstanceBOInfo info : infoes) {
       put(info.getProcessId(), info.getBusinessId(), info.getProcessInstanceId());
     }
   }
 }
예제 #2
0
 public String getBusinessId(Long processInstanceId) {
   String businessId = businessIdCache.get(processInstanceId);
   if (businessId == null) {
     synchronized (ProcessInstanceBOCache.class) {
       if (businessId == null) {
         logger.info("fetch from database");
         ProcessInstanceBOInfo info =
             processInstanceBOService.getProcessInstanceBOInfo(processInstanceId);
         businessId = info != null ? info.getBusinessId() : null;
         if (businessId != null) {
           put(info.getProcessId(), businessId, processInstanceId);
         }
       }
     }
   }
   return businessId;
 }