Search in sources :

Example 1 with CustomBatchExecutor

use of org.kuali.kfs.sys.batch.service.WrappedBatchExecutorService.CustomBatchExecutor in project cu-kfs by CU-CommunityApps.

the class AccountReversionPriorYearAccountStep method getCustomBatchExecutor.

/**
 * @see org.kuali.kfs.sys.batch.AbstractWrappedBatchStep#getCustomBatchExecutor()
 */
@Override
protected CustomBatchExecutor getCustomBatchExecutor() {
    return new CustomBatchExecutor() {

        /**
         * Runs the account reversion process, retrieving parameter, creating the origin entry group for output entries, and
         * generating the reports on the process.
         * @return true if the job completed successfully, false if otherwise
         * @see org.kuali.kfs.kns.bo.Step#execute(java.lang.String)
         */
        public boolean execute() {
            StopWatch stopWatch = new StopWatch();
            stopWatch.start("AccountReversionPriorYearAccountStep");
            Map jobParameters = accountReversionProcessService.getJobParameters();
            Map<String, Integer> accountReversionCounts = new HashMap<String, Integer>();
            getYearEndService().logAllMissingPriorYearAccounts((Integer) jobParameters.get(KFSConstants.UNIV_FISCAL_YR));
            getYearEndService().logAllMissingSubFundGroups((Integer) jobParameters.get(KFSConstants.UNIV_FISCAL_YR));
            getAccountReversionProcessService().reversionPriorYearAccountProcess(jobParameters, accountReversionCounts);
            stopWatch.stop();
            LOG.info("Account ReversionPriorYearAccountStep took " + (stopWatch.getTotalTimeSeconds() / 60.0) + " minutes to complete");
            return true;
        }
    };
}
Also used : CustomBatchExecutor(org.kuali.kfs.sys.batch.service.WrappedBatchExecutorService.CustomBatchExecutor) HashMap(java.util.HashMap) Map(java.util.Map) HashMap(java.util.HashMap) StopWatch(org.springframework.util.StopWatch)

Example 2 with CustomBatchExecutor

use of org.kuali.kfs.sys.batch.service.WrappedBatchExecutorService.CustomBatchExecutor in project cu-kfs by CU-CommunityApps.

the class AccountReversionCurrentYearAccountStep method getCustomBatchExecutor.

/**
 * @see org.kuali.kfs.sys.batch.AbstractWrappedBatchStep#getCustomBatchExecutor()
 */
@Override
protected CustomBatchExecutor getCustomBatchExecutor() {
    return new CustomBatchExecutor() {

        /**
         * Runs the account reversion process, retrieving parameter, creating the origin entry group for output entries, and
         * generating the reports on the process.
         * @return true if the job completed successfully, false if otherwise
         * @see org.kuali.kfs.kns.bo.Step#execute(String, java.util.Date)
         */
        public boolean execute() {
            StopWatch stopWatch = new StopWatch();
            stopWatch.start("AccountReversionCurrentYearAccountStep");
            Map jobParameters = accountReversionProcessService.getJobParameters();
            Map<String, Integer> accountReversionCounts = new HashMap<String, Integer>();
            getYearEndService().logAllMissingSubFundGroups((Integer) jobParameters.get(KFSConstants.UNIV_FISCAL_YR));
            getAccountReversionProcessService().reversionCurrentYearAccountProcess(jobParameters, accountReversionCounts);
            stopWatch.stop();
            LOG.info("AccountReversionCurrentYearAccountStep took " + (stopWatch.getTotalTimeSeconds() / 60.0) + " minutes to complete");
            return true;
        }
    };
}
Also used : CustomBatchExecutor(org.kuali.kfs.sys.batch.service.WrappedBatchExecutorService.CustomBatchExecutor) HashMap(java.util.HashMap) Map(java.util.Map) HashMap(java.util.HashMap) StopWatch(org.springframework.util.StopWatch)

Aggregations

HashMap (java.util.HashMap)2 Map (java.util.Map)2 CustomBatchExecutor (org.kuali.kfs.sys.batch.service.WrappedBatchExecutorService.CustomBatchExecutor)2 StopWatch (org.springframework.util.StopWatch)2