Ejemplo n.º 1
0
 @Override
 public void referFraud(ActionEvent event) {
   try {
     resolveFluxTags(dto);
     dto.getNotes().add(super.baseReferFraud());
     dto.setReferToFraud(true);
     finish(event);
   } catch (ServiceException e) {
     errorMessage(e.getError(), ERR_GLOBAL);
   } catch (Exception e) {
     showThatsNotGood(dto, new ServiceException(ErrorCodes.UHE000, e), TASK);
   }
 }
Ejemplo n.º 2
0
  private void completeConfirmOfferFlux() throws ServiceException {
    // non-flow task id -1 override
    if (task.getTid() == -1) return;

    boolean xdsFailed = taskRules.xdsFailed(dto.getPid(), xdsAuthenticationLogs);
    dto.setReferToFraud(dto.isReferToFraud() || xdsFailed);
    checkFraud(dto, "fraudCO");

    // Should the documents be scanned at the branch
    setVariable(
        Long.valueOf(task.getPid()).intValue(),
        "branchpre",
        String.valueOf(dto.getContractingMethod().equals(EContractingMethod.BRANCH)));
    // has a loan product been selected
    setVariable(Long.valueOf(task.getPid()).intValue(), "loanselected", "true");
    // has a cellular product been selected
    setVariable(Long.valueOf(task.getPid()).intValue(), "cellselected", "false");
    // has a cellular product been selected
    setVariable(
        Long.valueOf(task.getPid()).intValue(),
        "creditlifesub",
        String.valueOf(dto.isCreditLifeSubstitution()));

    // insurance offer confirmation only (send to fraud)
    setVariable(Long.valueOf(task.getPid()).intValue(), "insfraud", "false");
    if (task.getOrigin().equals("task.confirm.offer.call.insurance")) {
      boolean insfraud = xdsFailed || dto.isReferToFraud();
      setVariable(Long.valueOf(task.getPid()).intValue(), "insfraud", String.valueOf(insfraud));
    }

    // Now call the workflow to complete the task
    if (!task.isSupport()) completeTask(task.getTid(), bayfin.getUser());

    // Update Flux Task Branch Code for Branch Contracting
    if (dto.getContractingMethod().equals(EContractingMethod.BRANCH)) {
      long branchScanningTid =
          getTidforTask(
              Long.valueOf(task.getPid()).intValue(), "task.scan.branch.pre", "Scan pre-agreement");
      if (branchScanningTid > 0) {
        if (signingBranchCode.intValue() > 0) {
          fluxService.updateFluxInboxBranch(branchScanningTid, signingBranchCode.intValue());
        }
      }
    }
  }