use of org.camunda.bpm.model.cmmn.instance.ManualActivationRule in project camunda-bpm-platform by camunda.
the class StageDiscretionaryItemHandlerTest method testManualActivationRuleByDefaultPlanItemControl.
@Test
public void testManualActivationRuleByDefaultPlanItemControl() {
// given
PlanItemControl defaultControl = createElement(stage, "ItemControl_1", DefaultControl.class);
ManualActivationRule manualActivationRule = createElement(defaultControl, "ManualActivationRule_1", ManualActivationRule.class);
ConditionExpression expression = createElement(manualActivationRule, "Expression_1", ConditionExpression.class);
expression.setText("${true}");
Cmmn.validateModel(modelInstance);
// when
CmmnActivity newActivity = handler.handleElement(discretionaryItem, context);
// then
Object rule = newActivity.getProperty(PROPERTY_MANUAL_ACTIVATION_RULE);
assertNotNull(rule);
assertTrue(rule instanceof CaseControlRule);
}
use of org.camunda.bpm.model.cmmn.instance.ManualActivationRule in project camunda-bpm-platform by camunda.
the class StageDiscretionaryItemHandlerTest method testManualActivationRule.
@Test
public void testManualActivationRule() {
// given
ItemControl itemControl = createElement(discretionaryItem, "ItemControl_1", ItemControl.class);
ManualActivationRule manualActivationRule = createElement(itemControl, "ManualActivationRule_1", ManualActivationRule.class);
ConditionExpression expression = createElement(manualActivationRule, "Expression_1", ConditionExpression.class);
expression.setText("${true}");
Cmmn.validateModel(modelInstance);
// when
CmmnActivity newActivity = handler.handleElement(discretionaryItem, context);
// then
Object rule = newActivity.getProperty(PROPERTY_MANUAL_ACTIVATION_RULE);
assertNotNull(rule);
assertTrue(rule instanceof CaseControlRule);
}
use of org.camunda.bpm.model.cmmn.instance.ManualActivationRule in project camunda-bpm-platform by camunda.
the class StagePlanItemHandlerTest method testManualActivationRuleByDefaultPlanItemControl.
@Test
public void testManualActivationRuleByDefaultPlanItemControl() {
// given
PlanItemControl defaultControl = createElement(stage, "ItemControl_1", DefaultControl.class);
ManualActivationRule manualActivationRule = createElement(defaultControl, "ManualActivationRule_1", ManualActivationRule.class);
ConditionExpression expression = createElement(manualActivationRule, "Expression_1", ConditionExpression.class);
expression.setText("${true}");
Cmmn.validateModel(modelInstance);
// when
CmmnActivity newActivity = handler.handleElement(planItem, context);
// then
Object rule = newActivity.getProperty(PROPERTY_MANUAL_ACTIVATION_RULE);
assertNotNull(rule);
assertTrue(rule instanceof CaseControlRule);
}
use of org.camunda.bpm.model.cmmn.instance.ManualActivationRule in project camunda-bpm-platform by camunda.
the class TaskPlanItemHandlerTest method testManualActivationRuleByDefaultPlanItemControl.
@Test
public void testManualActivationRuleByDefaultPlanItemControl() {
// given
PlanItemControl defaultControl = createElement(task, "ItemControl_1", DefaultControl.class);
ManualActivationRule manualActivationRule = createElement(defaultControl, "ManualActivationRule_1", ManualActivationRule.class);
ConditionExpression expression = createElement(manualActivationRule, "Expression_1", ConditionExpression.class);
expression.setText("${true}");
Cmmn.validateModel(modelInstance);
// when
CmmnActivity newActivity = handler.handleElement(planItem, context);
// then
Object rule = newActivity.getProperty(PROPERTY_MANUAL_ACTIVATION_RULE);
assertNotNull(rule);
assertTrue(rule instanceof CaseControlRule);
}
use of org.camunda.bpm.model.cmmn.instance.ManualActivationRule in project camunda-bpm-platform by camunda.
the class DecisionTaskPlanItemHandlerTest method testManualActivationRule.
@Test
public void testManualActivationRule() {
// given
ItemControl itemControl = createElement(planItem, "ItemControl_1", ItemControl.class);
ManualActivationRule manualActivationRule = createElement(itemControl, "ManualActivationRule_1", ManualActivationRule.class);
ConditionExpression expression = createElement(manualActivationRule, "Expression_1", ConditionExpression.class);
expression.setText("${true}");
Cmmn.validateModel(modelInstance);
// when
CmmnActivity newActivity = handler.handleElement(planItem, context);
// then
Object rule = newActivity.getProperty(PROPERTY_MANUAL_ACTIVATION_RULE);
assertNotNull(rule);
assertTrue(rule instanceof CaseControlRule);
}
Aggregations