Search in sources :

Example 1 with DataEntryRuleRunner

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

the class RuleSetService method runRulesInDataEntry.

/*
     * (non-Javadoc)
     * @see org.akaza.openclinica.service.rule.RuleSetServiceInterface#runRulesInDataEntry(java.util.List, java.lang.Boolean,
     * org.akaza.openclinica.bean.managestudy.StudyBean, org.akaza.openclinica.bean.login.UserAccountBean, java.util.HashMap)
     */
public MessageContainer runRulesInDataEntry(List<RuleSetBean> ruleSets, Boolean dryRun, StudyBean currentStudy, UserAccountBean ub, HashMap<String, String> variableAndValue, Phase phase, EventCRFBean ecb, HttpServletRequest request) {
    DataEntryRuleRunner ruleRunner = new DataEntryRuleRunner(dataSource, requestURLMinusServletPath, contextPath, mailSender, ecb);
    dynamicsMetadataService.setExpressionService(getExpressionService());
    ruleRunner.setDynamicsMetadataService(dynamicsMetadataService);
    ruleRunner.setRuleActionRunLogDao(ruleActionRunLogDao);
    // TODO: KK return the new object && Pass in the Execution Mode
    ExecutionMode executionMode = dryRun == true ? ExecutionMode.DRY_RUN : ExecutionMode.SAVE;
    return ruleRunner.runRules(ruleSets, executionMode, currentStudy, variableAndValue, ub, phase, request);
// return new HashMap<String, ArrayList<String>>();
// return runRules(ruleSets, dryRun, currentStudy, c.variableAndValue, ub);
}
Also used : DataEntryRuleRunner(org.akaza.openclinica.logic.rulerunner.DataEntryRuleRunner) ExecutionMode(org.akaza.openclinica.logic.rulerunner.ExecutionMode)

Aggregations

DataEntryRuleRunner (org.akaza.openclinica.logic.rulerunner.DataEntryRuleRunner)1 ExecutionMode (org.akaza.openclinica.logic.rulerunner.ExecutionMode)1