code: private boolean isProcessInstanceResumable(ProcessInstance pInstance) {
  
          int statusCd = pInstance.getStatusCode().intValue();
          if (statusCd == WorkStatus.STATUS_COMPLETED.intValue()) {
              return false;
          } else if (statusCd == WorkStatus.STATUS_CANCELLED.intValue()) {
              return false;
          }
          return true;
      }
docs: Checks if the process inst is resumable
  
  @param pInstance
  @return boolean status