Search in sources :

Example 1 with RuleSetBulkRuleRunner

use of org.akaza.openclinica.logic.rulerunner.RuleSetBulkRuleRunner in project OpenClinica by OpenClinica.

the class RuleSetService method runRulesInBulk.

/*
     * (non-Javadoc)
     * @see org.akaza.openclinica.service.rule.RuleSetServiceInterface#runRulesInBulk(java.util.List, java.lang.Boolean,
     * org.akaza.openclinica.bean.managestudy.StudyBean, org.akaza.openclinica.bean.login.UserAccountBean)
     */
public List<RuleSetBasedViewContainer> runRulesInBulk(List<RuleSetBean> ruleSets, Boolean dryRun, StudyBean currentStudy, UserAccountBean ub, boolean jobTrigger) {
    ruleSets = filterByStatusEqualsAvailable(ruleSets);
    ruleSets = filterRuleSetsByStudyEventOrdinal(ruleSets, null);
    if (jobTrigger) {
        try {
            ruleSets = filterRuleSetsByStudySubject(ruleSets);
        } catch (NumberFormatException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (ParseException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
    ruleSets = filterRuleSetsByGroupOrdinal(ruleSets);
    RuleSetBulkRuleRunner ruleRunner = new RuleSetBulkRuleRunner(dataSource, requestURLMinusServletPath, contextPath, mailSender);
    dynamicsMetadataService.setExpressionService(getExpressionService());
    ruleRunner.setDynamicsMetadataService(dynamicsMetadataService);
    ruleRunner.setRuleActionRunLogDao(ruleActionRunLogDao);
    ExecutionMode executionMode = dryRun == true ? ExecutionMode.DRY_RUN : ExecutionMode.SAVE;
    System.out.println("in runRulesinBulk method");
    return ruleRunner.runRulesBulkFromRuleSetScreen(ruleSets, executionMode, currentStudy, null, ub);
// return runRulesBulkFromRuleSetScreen(ruleSets, dryRun, currentStudy, null, ub);
}
Also used : RuleSetBulkRuleRunner(org.akaza.openclinica.logic.rulerunner.RuleSetBulkRuleRunner) ExecutionMode(org.akaza.openclinica.logic.rulerunner.ExecutionMode) ParseException(java.text.ParseException)

Aggregations

ParseException (java.text.ParseException)1 ExecutionMode (org.akaza.openclinica.logic.rulerunner.ExecutionMode)1 RuleSetBulkRuleRunner (org.akaza.openclinica.logic.rulerunner.RuleSetBulkRuleRunner)1