Example #1
0
 private void initNewTaskIns(int category, AppealMain workflowMain, AppealFlowTask task)
     throws Exception {
   switch (category) {
     case APPELLANT:
       task.setAgencyId(workflowMain.getAppellantAgencyId());
       task.setAgencyName(workflowMain.getAppellantAgencyName());
       break;
     case RESPONDENT:
       task.setAgencyId(workflowMain.getRespondentAgencyId());
       task.setAgencyName(workflowMain.getRespondentAgencyName());
       break;
     default:
       InsBriefDto ins =
           FsmUtil.getInsBriefsByDistrict(
               workflowMain.getDistrictNo(), FsmUtil.getCategoryByAppealStatus(task.getPhase()));
       task.setAgencyId(ins.getId());
       task.setAgencyName(ins.getName());
       break;
   }
 }
Example #2
0
 @Override
 public void doIt(
     AppealStatusEnum from, AppealHandleTypeEnum trigger, AppealStatusEnum to, Object arg)
     throws Exception {
   AppealJavaDelegateArg javaDelegateArg = (AppealJavaDelegateArg) arg;
   AppealMain main = javaDelegateArg.getWorkflowMain();
   addNextTask(
       APPELLANT,
       to,
       FsmUtil.getResponseFunction(main.getAppellantCategory()),
       javaDelegateArg,
       DateUtils.featureTimeOfDay(DateUtils.FEEDBACK_CUT_OF_DAYS));
   addNextTask(
       RESPONDENT,
       to,
       FsmUtil.getResponseFunction(main.getRespondentCategory()),
       javaDelegateArg,
       DateUtils.featureTimeOfDay(DateUtils.FEEDBACK_CUT_OF_DAYS));
   Response response = javaDelegateArg.finishTaskAndStartNewTasks();
   if (!response.isSuccess()) throw new AppealException(response.getError());
 }
Example #3
0
 @Override
 public void doIt(
     AppealStatusEnum from, AppealHandleTypeEnum trigger, AppealStatusEnum to, Object arg)
     throws Exception {
   AppealJavaDelegateArg javaDelegateArg = (AppealJavaDelegateArg) arg;
   AppealMain main = javaDelegateArg.getWorkflowMain();
   main.setPhase(to);
   AppealFunctionEnum function = FsmUtil.getAppealFunctionNoResponse(to);
   addNextTask(OTHER, to, function, javaDelegateArg, null);
   Response response = javaDelegateArg.finishTaskAndStartNewTasks();
   if (!response.isSuccess()) throw new AppealException(response.getError());
 }