本文整理汇总了Java中org.kuali.rice.krms.framework.type.ValidationRuleType类的典型用法代码示例。如果您正苦于以下问题:Java ValidationRuleType类的具体用法?Java ValidationRuleType怎么用?Java ValidationRuleType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ValidationRuleType类属于org.kuali.rice.krms.framework.type包,在下文中一共展示了ValidationRuleType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testValidWarning
import org.kuali.rice.krms.framework.type.ValidationRuleType; //导入依赖的package包/类
@Transactional
@Test
public void testValidWarning() {
KrmsAttributeTypeDefinitionAndBuilders ruleDefs = createKrmsAttributeTypeDefinitionAndBuilders(
ValidationRuleTypeService.VALIDATIONS_RULE_TYPE_CODE_ATTRIBUTE, KrmsConstants.KRMS_NAMESPACE,
ValidationRuleType.VALID.toString(), true, ValidationRuleType.VALID.toString(),
ValidationRuleType.VALID.getCode(), VALIDATION_RULE_TYPE_SERVICE, krmsTypeBoService, 1);
KrmsAttributeTypeDefinitionAndBuilders actionDef = createKrmsAttributeTypeDefinitionAndBuilders(
ValidationActionTypeService.VALIDATIONS_ACTION_TYPE_CODE_ATTRIBUTE, KrmsConstants.KRMS_NAMESPACE,
ValidationActionType.WARNING.toString(), true, ValidationActionType.WARNING.toString(),
ValidationActionType.WARNING.getCode(), VALIDATION_ACTION_TYPE_SERVICE, krmsTypeBoService, 1);
KrmsAttributeTypeDefinitionAndBuilders actionMessageDef = createKrmsAttributeTypeDefinitionAndBuilders(
ValidationActionTypeService.VALIDATIONS_ACTION_MESSAGE_ATTRIBUTE, KrmsConstants.KRMS_NAMESPACE,
"Valdiation Action Message", true, "Valdiation Action Message",
WARNING_MESSAGE, VALIDATION_ACTION_TYPE_SERVICE, krmsTypeBoService, 1);
List<KrmsAttributeTypeDefinitionAndBuilders> actionDefs = new LinkedList<KrmsAttributeTypeDefinitionAndBuilders>();
actionDefs.add(actionDef);
actionDefs.add(actionMessageDef);
ContextBo contextBo = createContext();
RuleBo ruleBo = createRuleWithAction(ruleDefs, actionDefs, contextBo, WARNING_MESSAGE);
createAgenda(ruleBo, contextBo, createEventAttributeDefinition());
EngineResults results = engineExecute();
assertTrue(results.getAttribute(ValidationActionTypeService.VALIDATIONS_ACTION_ATTRIBUTE) == null);
}
示例2: testValidError
import org.kuali.rice.krms.framework.type.ValidationRuleType; //导入依赖的package包/类
@Transactional
@Test
public void testValidError() {
KrmsAttributeTypeDefinitionAndBuilders ruleDefs = createKrmsAttributeTypeDefinitionAndBuilders(
ValidationRuleTypeService.VALIDATIONS_RULE_TYPE_CODE_ATTRIBUTE, KrmsConstants.KRMS_NAMESPACE,
ValidationRuleType.VALID.toString(), true, ValidationRuleType.VALID.toString(),
ValidationRuleType.VALID.getCode(), VALIDATION_RULE_TYPE_SERVICE, krmsTypeBoService, 1);
KrmsAttributeTypeDefinitionAndBuilders actionDef = createKrmsAttributeTypeDefinitionAndBuilders(
ValidationActionTypeService.VALIDATIONS_ACTION_TYPE_CODE_ATTRIBUTE, KrmsConstants.KRMS_NAMESPACE,
ValidationActionType.ERROR.toString(), true, ValidationActionType.ERROR.toString(),
ValidationActionType.ERROR.getCode(), VALIDATION_ACTION_TYPE_SERVICE, krmsTypeBoService, 1);
KrmsAttributeTypeDefinitionAndBuilders actionMessageDef = createKrmsAttributeTypeDefinitionAndBuilders(
ValidationActionTypeService.VALIDATIONS_ACTION_MESSAGE_ATTRIBUTE, KrmsConstants.KRMS_NAMESPACE,
"Valdiation Action Message", true, "Valdiation Action Message",
ERROR_MESSAGE, VALIDATION_ACTION_TYPE_SERVICE, krmsTypeBoService, 1);
List<KrmsAttributeTypeDefinitionAndBuilders> actionDefs = new LinkedList<KrmsAttributeTypeDefinitionAndBuilders>();
actionDefs.add(actionDef);
actionDefs.add(actionMessageDef);
ContextBo contextBo = createContext();
RuleBo ruleBo = createRuleWithAction(ruleDefs, actionDefs, contextBo, ERROR_MESSAGE);
createAgenda(ruleBo, contextBo, createEventAttributeDefinition());
EngineResults results = engineExecute();
assertTrue(results.getAttribute(ValidationActionTypeService.VALIDATIONS_ACTION_ATTRIBUTE) == null);
}
示例3: testValidWarning
import org.kuali.rice.krms.framework.type.ValidationRuleType; //导入依赖的package包/类
@Transactional
@Test
public void testValidWarning() {
KrmsAttributeTypeDefinitionAndBuilders ruleDefs = createKrmsAttributeTypeDefinitionAndBuilders(
ValidationRuleTypeService.VALIDATIONS_RULE_TYPE_CODE_ATTRIBUTE, KrmsConstants.KRMS_NAMESPACE,
ValidationRuleType.VALID.toString(), true, ValidationRuleType.VALID.toString(),
ValidationRuleType.VALID.getCode(), VALIDATION_RULE_TYPE_SERVICE, krmsTypeRepositoryService, 1);
KrmsAttributeTypeDefinitionAndBuilders actionDef = createKrmsAttributeTypeDefinitionAndBuilders(
ValidationActionTypeService.VALIDATIONS_ACTION_TYPE_CODE_ATTRIBUTE, KrmsConstants.KRMS_NAMESPACE,
ValidationActionType.WARNING.toString(), true, ValidationActionType.WARNING.toString(),
ValidationActionType.WARNING.getCode(), VALIDATION_ACTION_TYPE_SERVICE, krmsTypeRepositoryService, 1);
KrmsAttributeTypeDefinitionAndBuilders actionMessageDef = createKrmsAttributeTypeDefinitionAndBuilders(
ValidationActionTypeService.VALIDATIONS_ACTION_MESSAGE_ATTRIBUTE, KrmsConstants.KRMS_NAMESPACE,
"Valdiation Action Message", true, "Valdiation Action Message",
WARNING_MESSAGE, VALIDATION_ACTION_TYPE_SERVICE, krmsTypeRepositoryService, 1);
List<KrmsAttributeTypeDefinitionAndBuilders> actionDefs = new LinkedList<KrmsAttributeTypeDefinitionAndBuilders>();
actionDefs.add(actionDef);
actionDefs.add(actionMessageDef);
ContextBo contextBo = createContext();
RuleBo ruleBo = createRuleWithAction(ruleDefs, actionDefs, contextBo, WARNING_MESSAGE);
createAgenda(ruleBo, contextBo, createEventAttributeDefinition());
EngineResults results = engineExecute();
assertTrue(results.getAttribute(ValidationActionTypeService.VALIDATIONS_ACTION_ATTRIBUTE) == null);
}
示例4: testValidError
import org.kuali.rice.krms.framework.type.ValidationRuleType; //导入依赖的package包/类
@Transactional
@Test
public void testValidError() {
KrmsAttributeTypeDefinitionAndBuilders ruleDefs = createKrmsAttributeTypeDefinitionAndBuilders(
ValidationRuleTypeService.VALIDATIONS_RULE_TYPE_CODE_ATTRIBUTE, KrmsConstants.KRMS_NAMESPACE,
ValidationRuleType.VALID.toString(), true, ValidationRuleType.VALID.toString(),
ValidationRuleType.VALID.getCode(), VALIDATION_RULE_TYPE_SERVICE, krmsTypeRepositoryService, 1);
KrmsAttributeTypeDefinitionAndBuilders actionDef = createKrmsAttributeTypeDefinitionAndBuilders(
ValidationActionTypeService.VALIDATIONS_ACTION_TYPE_CODE_ATTRIBUTE, KrmsConstants.KRMS_NAMESPACE,
ValidationActionType.ERROR.toString(), true, ValidationActionType.ERROR.toString(),
ValidationActionType.ERROR.getCode(), VALIDATION_ACTION_TYPE_SERVICE, krmsTypeRepositoryService, 1);
KrmsAttributeTypeDefinitionAndBuilders actionMessageDef = createKrmsAttributeTypeDefinitionAndBuilders(
ValidationActionTypeService.VALIDATIONS_ACTION_MESSAGE_ATTRIBUTE, KrmsConstants.KRMS_NAMESPACE,
"Valdiation Action Message", true, "Valdiation Action Message",
ERROR_MESSAGE, VALIDATION_ACTION_TYPE_SERVICE, krmsTypeRepositoryService, 1);
List<KrmsAttributeTypeDefinitionAndBuilders> actionDefs = new LinkedList<KrmsAttributeTypeDefinitionAndBuilders>();
actionDefs.add(actionDef);
actionDefs.add(actionMessageDef);
ContextBo contextBo = createContext();
RuleBo ruleBo = createRuleWithAction(ruleDefs, actionDefs, contextBo, ERROR_MESSAGE);
createAgenda(ruleBo, contextBo, createEventAttributeDefinition());
EngineResults results = engineExecute();
assertTrue(results.getAttribute(ValidationActionTypeService.VALIDATIONS_ACTION_ATTRIBUTE) == null);
}
示例5: testInvalidWarning
import org.kuali.rice.krms.framework.type.ValidationRuleType; //导入依赖的package包/类
@Transactional
@Test
public void testInvalidWarning() {
KrmsAttributeTypeDefinitionAndBuilders ruleDefs = createKrmsAttributeTypeDefinitionAndBuilders(
ValidationRuleTypeService.VALIDATIONS_RULE_TYPE_CODE_ATTRIBUTE, KrmsConstants.KRMS_NAMESPACE,
ValidationRuleType.INVALID.toString(), true, ValidationRuleType.INVALID.toString(),
ValidationRuleType.INVALID.getCode(), VALIDATION_RULE_TYPE_SERVICE, krmsTypeBoService, 1);
KrmsAttributeTypeDefinitionAndBuilders actionDef = createKrmsAttributeTypeDefinitionAndBuilders(
ValidationActionTypeService.VALIDATIONS_ACTION_TYPE_CODE_ATTRIBUTE, KrmsConstants.KRMS_NAMESPACE,
ValidationActionType.WARNING.toString(), true, ValidationActionType.WARNING.toString(),
ValidationActionType.WARNING.getCode(), VALIDATION_ACTION_TYPE_SERVICE, krmsTypeBoService, 1);
KrmsAttributeTypeDefinitionAndBuilders actionMessageDef = createKrmsAttributeTypeDefinitionAndBuilders(
ValidationActionTypeService.VALIDATIONS_ACTION_MESSAGE_ATTRIBUTE, KrmsConstants.KRMS_NAMESPACE,
"Valdiation Action Message", true, "Valdiation Action Message",
WARNING_MESSAGE, VALIDATION_ACTION_TYPE_SERVICE, krmsTypeBoService, 1);
List<KrmsAttributeTypeDefinitionAndBuilders> actionDefs = new LinkedList<KrmsAttributeTypeDefinitionAndBuilders>();
actionDefs.add(actionDef);
actionDefs.add(actionMessageDef);
ContextBo contextBo = createContext();
RuleBo ruleBo = createRuleWithAction(ruleDefs, actionDefs, contextBo, WARNING_MESSAGE);
createAgenda(ruleBo, contextBo, createEventAttributeDefinition());
EngineResults results = engineExecute();
assertNotNull(results.getAttribute(ValidationActionTypeService.VALIDATIONS_ACTION_ATTRIBUTE));
assertEquals(ValidationActionType.WARNING.getCode() + ":" + WARNING_MESSAGE,
results.getAttribute(ValidationActionTypeService.VALIDATIONS_ACTION_ATTRIBUTE));
}
示例6: testInvalidError
import org.kuali.rice.krms.framework.type.ValidationRuleType; //导入依赖的package包/类
@Transactional
@Test
public void testInvalidError() {
KrmsAttributeTypeDefinitionAndBuilders ruleDefs = createKrmsAttributeTypeDefinitionAndBuilders(
ValidationRuleTypeService.VALIDATIONS_RULE_TYPE_CODE_ATTRIBUTE, KrmsConstants.KRMS_NAMESPACE,
ValidationRuleType.INVALID.toString(), true, ValidationRuleType.INVALID.toString(),
ValidationRuleType.INVALID.getCode(), VALIDATION_RULE_TYPE_SERVICE, krmsTypeBoService, 1);
KrmsAttributeTypeDefinitionAndBuilders actionDef = createKrmsAttributeTypeDefinitionAndBuilders(
ValidationActionTypeService.VALIDATIONS_ACTION_TYPE_CODE_ATTRIBUTE, KrmsConstants.KRMS_NAMESPACE,
ValidationActionType.ERROR.toString(), true, ValidationActionType.ERROR.toString(),
ValidationActionType.ERROR.getCode(), VALIDATION_ACTION_TYPE_SERVICE, krmsTypeBoService, 1);
KrmsAttributeTypeDefinitionAndBuilders actionMessageDef = createKrmsAttributeTypeDefinitionAndBuilders(
ValidationActionTypeService.VALIDATIONS_ACTION_MESSAGE_ATTRIBUTE, KrmsConstants.KRMS_NAMESPACE,
"Valdiation Action Message", true, "Valdiation Action Message",
ERROR_MESSAGE, VALIDATION_ACTION_TYPE_SERVICE, krmsTypeBoService, 1);
List<KrmsAttributeTypeDefinitionAndBuilders> actionDefs = new LinkedList<KrmsAttributeTypeDefinitionAndBuilders>();
actionDefs.add(actionDef);
actionDefs.add(actionMessageDef);
ContextBo contextBo = createContext();
RuleBo ruleBo = createRuleWithAction(ruleDefs, actionDefs, contextBo, ERROR_MESSAGE);
createAgenda(ruleBo, contextBo, createEventAttributeDefinition());
EngineResults results = engineExecute();
assertNotNull(results.getAttribute(ValidationActionTypeService.VALIDATIONS_ACTION_ATTRIBUTE));
assertEquals(ValidationActionType.ERROR.getCode() + ":" + ERROR_MESSAGE, results.getAttribute(
ValidationActionTypeService.VALIDATIONS_ACTION_ATTRIBUTE));
}
示例7: shouldExecuteAction
import org.kuali.rice.krms.framework.type.ValidationRuleType; //导入依赖的package包/类
/**
* Valid Validation Rules execute when the ruleExecutionResult is false.
* Invalid Validation Rules execute when the ruleExecutionResult is true.
* @param ruleExecutionResult result of the rules execution
* @return should the actions be executed
*/
@Override
protected boolean shouldExecuteAction(boolean ruleExecutionResult) {
if (type == null || type.equals(ValidationRuleType.VALID)) {
return !ruleExecutionResult;
}
return ruleExecutionResult;
}
示例8: loadRule
import org.kuali.rice.krms.framework.type.ValidationRuleType; //导入依赖的package包/类
@Override
public Rule loadRule(RuleDefinition validationRuleDefinition) {
if (validationRuleDefinition == null) { throw new RiceIllegalArgumentException("validationRuleDefinition must not be null"); }
if (validationRuleDefinition.getAttributes() == null) { throw new RiceIllegalArgumentException("validationRuleDefinition must not be null");}
if (!validationRuleDefinition.getAttributes().containsKey(VALIDATIONS_RULE_TYPE_CODE_ATTRIBUTE)) {
throw new RiceIllegalArgumentException("validationRuleDefinition does not contain an " +
VALIDATIONS_RULE_TYPE_CODE_ATTRIBUTE + " attribute");
}
String validationRuleTypeCode = validationRuleDefinition.getAttributes().get(VALIDATIONS_RULE_TYPE_CODE_ATTRIBUTE);
if (StringUtils.isBlank(validationRuleTypeCode)) {
throw new RiceIllegalArgumentException(VALIDATIONS_RULE_TYPE_CODE_ATTRIBUTE + " attribute must not be null or blank");
}
if (ValidationRuleType.VALID.getCode().equals(validationRuleTypeCode)) {
return new ValidationRule(ValidationRuleType.VALID, validationRuleDefinition.getName(),
translator.translatePropositionDefinition(validationRuleDefinition.getProposition()),
translator.translateActionDefinitions(validationRuleDefinition.getActions()));
}
if (ValidationRuleType.INVALID.getCode().equals(validationRuleTypeCode)) {
return new ValidationRule(ValidationRuleType.INVALID, validationRuleDefinition.getName(),
translator.translatePropositionDefinition(validationRuleDefinition.getProposition()),
translator.translateActionDefinitions(validationRuleDefinition.getActions()));
}
return null;
}
示例9: getAttributeFields
import org.kuali.rice.krms.framework.type.ValidationRuleType; //导入依赖的package包/类
/**
*
* @return List<RemotableAttributeField>
* @throws RiceIllegalArgumentException
*/
@Override
public List<RemotableAttributeField> getAttributeFields(@WebParam(name = "krmsTypeId") String krmsTypeId) throws RiceIllegalArgumentException {
Map<String, String> keyLabels = new TreeMap<String, String>();
keyLabels.put(ValidationRuleType.VALID.getCode(), "Valid - action executed when false");
keyLabels.put(ValidationRuleType.INVALID.getCode(), "Invalid - action executed when true");
return getAttributeFields(krmsTypeId, keyLabels);
}
示例10: testValidRulePassesActionDoesntFire
import org.kuali.rice.krms.framework.type.ValidationRuleType; //导入依赖的package包/类
@Test
public void testValidRulePassesActionDoesntFire() {
Rule validationRule = new ValidationRule(ValidationRuleType.VALID, "testValidRulePassesActionDoesntFire",
new ComparableTermBasedProposition(operatorEquals, term, "true"), Collections
.<Action>singletonList(actionMock));
assertTrue(validationRule.evaluate(new BasicExecutionEnvironment(testEvent, facts, executionOptions,
termResolutionEngine)));
assertFalse(actionMock.actionFired("a1"));
}
示例11: testValidRuleFailsActionFires
import org.kuali.rice.krms.framework.type.ValidationRuleType; //导入依赖的package包/类
@Test
public void testValidRuleFailsActionFires() {
Rule validationRule = new ValidationRule(ValidationRuleType.VALID, "testValidRuleFailsActionFires",
new ComparableTermBasedProposition(operatorEquals, term, "false"), Collections
.<Action>singletonList(actionMock));
assertFalse(validationRule.evaluate(new BasicExecutionEnvironment(testEvent, facts, executionOptions,
termResolutionEngine)));
assertTrue(actionMock.actionFired("a1"));
}
示例12: testInvalidRulePassesActionFires
import org.kuali.rice.krms.framework.type.ValidationRuleType; //导入依赖的package包/类
@Test
public void testInvalidRulePassesActionFires() {
Rule validationRule = new ValidationRule(ValidationRuleType.INVALID, "testInvalidRulePassesActionFires",
new ComparableTermBasedProposition(operatorEquals, term, "true"), Collections
.<Action>singletonList(actionMock));
assertTrue(validationRule.evaluate(new BasicExecutionEnvironment(testEvent, facts, executionOptions,
termResolutionEngine)));
assertTrue(actionMock.actionFired("a1"));
}
示例13: testInvalidRuleFalseActionDoesntFire
import org.kuali.rice.krms.framework.type.ValidationRuleType; //导入依赖的package包/类
@Test
public void testInvalidRuleFalseActionDoesntFire() {
Rule validationRule = new ValidationRule(ValidationRuleType.INVALID, "testInvalidRuleFalseActionDoesntFire",
new ComparableTermBasedProposition(operatorEquals, term, "false"), Collections
.<Action>singletonList(actionMock));
assertFalse(validationRule.evaluate(new BasicExecutionEnvironment(testEvent, facts, executionOptions,
termResolutionEngine)));
assertFalse(actionMock.actionFired("a1"));
}
示例14: testInvalidWarning
import org.kuali.rice.krms.framework.type.ValidationRuleType; //导入依赖的package包/类
@Transactional
@Test
public void testInvalidWarning() {
KrmsAttributeTypeDefinitionAndBuilders ruleDefs = createKrmsAttributeTypeDefinitionAndBuilders(
ValidationRuleTypeService.VALIDATIONS_RULE_TYPE_CODE_ATTRIBUTE, KrmsConstants.KRMS_NAMESPACE,
ValidationRuleType.INVALID.toString(), true, ValidationRuleType.INVALID.toString(),
ValidationRuleType.INVALID.getCode(), VALIDATION_RULE_TYPE_SERVICE, krmsTypeRepositoryService, 1);
KrmsAttributeTypeDefinitionAndBuilders actionDef = createKrmsAttributeTypeDefinitionAndBuilders(
ValidationActionTypeService.VALIDATIONS_ACTION_TYPE_CODE_ATTRIBUTE, KrmsConstants.KRMS_NAMESPACE,
ValidationActionType.WARNING.toString(), true, ValidationActionType.WARNING.toString(),
ValidationActionType.WARNING.getCode(), VALIDATION_ACTION_TYPE_SERVICE, krmsTypeRepositoryService, 1);
KrmsAttributeTypeDefinitionAndBuilders actionMessageDef = createKrmsAttributeTypeDefinitionAndBuilders(
ValidationActionTypeService.VALIDATIONS_ACTION_MESSAGE_ATTRIBUTE, KrmsConstants.KRMS_NAMESPACE,
"Valdiation Action Message", true, "Valdiation Action Message",
WARNING_MESSAGE, VALIDATION_ACTION_TYPE_SERVICE, krmsTypeRepositoryService, 1);
List<KrmsAttributeTypeDefinitionAndBuilders> actionDefs = new LinkedList<KrmsAttributeTypeDefinitionAndBuilders>();
actionDefs.add(actionDef);
actionDefs.add(actionMessageDef);
ContextBo contextBo = createContext();
RuleBo ruleBo = createRuleWithAction(ruleDefs, actionDefs, contextBo, WARNING_MESSAGE);
createAgenda(ruleBo, contextBo, createEventAttributeDefinition());
EngineResults results = engineExecute();
assertNotNull(results.getAttribute(ValidationActionTypeService.VALIDATIONS_ACTION_ATTRIBUTE));
assertEquals(ValidationActionType.WARNING.getCode() + ":" + WARNING_MESSAGE,
results.getAttribute(ValidationActionTypeService.VALIDATIONS_ACTION_ATTRIBUTE));
}
示例15: testInvalidError
import org.kuali.rice.krms.framework.type.ValidationRuleType; //导入依赖的package包/类
@Transactional
@Test
public void testInvalidError() {
KrmsAttributeTypeDefinitionAndBuilders ruleDefs = createKrmsAttributeTypeDefinitionAndBuilders(
ValidationRuleTypeService.VALIDATIONS_RULE_TYPE_CODE_ATTRIBUTE, KrmsConstants.KRMS_NAMESPACE,
ValidationRuleType.INVALID.toString(), true, ValidationRuleType.INVALID.toString(),
ValidationRuleType.INVALID.getCode(), VALIDATION_RULE_TYPE_SERVICE, krmsTypeRepositoryService, 1);
KrmsAttributeTypeDefinitionAndBuilders actionDef = createKrmsAttributeTypeDefinitionAndBuilders(
ValidationActionTypeService.VALIDATIONS_ACTION_TYPE_CODE_ATTRIBUTE, KrmsConstants.KRMS_NAMESPACE,
ValidationActionType.ERROR.toString(), true, ValidationActionType.ERROR.toString(),
ValidationActionType.ERROR.getCode(), VALIDATION_ACTION_TYPE_SERVICE, krmsTypeRepositoryService, 1);
KrmsAttributeTypeDefinitionAndBuilders actionMessageDef = createKrmsAttributeTypeDefinitionAndBuilders(
ValidationActionTypeService.VALIDATIONS_ACTION_MESSAGE_ATTRIBUTE, KrmsConstants.KRMS_NAMESPACE,
"Valdiation Action Message", true, "Valdiation Action Message",
ERROR_MESSAGE, VALIDATION_ACTION_TYPE_SERVICE, krmsTypeRepositoryService, 1);
List<KrmsAttributeTypeDefinitionAndBuilders> actionDefs = new LinkedList<KrmsAttributeTypeDefinitionAndBuilders>();
actionDefs.add(actionDef);
actionDefs.add(actionMessageDef);
ContextBo contextBo = createContext();
RuleBo ruleBo = createRuleWithAction(ruleDefs, actionDefs, contextBo, ERROR_MESSAGE);
createAgenda(ruleBo, contextBo, createEventAttributeDefinition());
EngineResults results = engineExecute();
assertNotNull(results.getAttribute(ValidationActionTypeService.VALIDATIONS_ACTION_ATTRIBUTE));
assertEquals(ValidationActionType.ERROR.getCode() + ":" + ERROR_MESSAGE, results.getAttribute(
ValidationActionTypeService.VALIDATIONS_ACTION_ATTRIBUTE));
}