use of org.camunda.bpm.engine.impl.cmmn.behavior.HumanTaskActivityBehavior in project camunda-bpm-platform by camunda.
the class HumanTaskPlanItemHandlerTest method testTaskDefinitionPlanItemNameExpression.
@Test
public void testTaskDefinitionPlanItemNameExpression() {
// given
String name = "A HumanTask";
humanTask.setName(name);
String planItemName = "My LocalName";
planItem.setName(planItemName);
// when
CmmnActivity activity = handler.handleElement(planItem, context);
// then
HumanTaskActivityBehavior behavior = (HumanTaskActivityBehavior) activity.getActivityBehavior();
TaskDefinition taskDefinition = behavior.getTaskDefinition();
Expression nameExpression = taskDefinition.getNameExpression();
assertNotNull(nameExpression);
assertEquals("My LocalName", nameExpression.getExpressionText());
}
use of org.camunda.bpm.engine.impl.cmmn.behavior.HumanTaskActivityBehavior in project camunda-bpm-platform by camunda.
the class HumanTaskPlanItemHandlerTest method testTaskDefinitionDueDateExpression.
@Test
public void testTaskDefinitionDueDateExpression() {
// given
String aDueDate = "aDueDate";
humanTask.setCamundaDueDate(aDueDate);
// when
CmmnActivity activity = handler.handleElement(planItem, context);
// then
HumanTaskActivityBehavior behavior = (HumanTaskActivityBehavior) activity.getActivityBehavior();
TaskDefinition taskDefinition = behavior.getTaskDefinition();
Expression dueDateExpression = taskDefinition.getDueDateExpression();
assertNotNull(dueDateExpression);
assertEquals(aDueDate, dueDateExpression.getExpressionText());
}
use of org.camunda.bpm.engine.impl.cmmn.behavior.HumanTaskActivityBehavior in project camunda-bpm-platform by camunda.
the class HumanTaskPlanItemHandlerTest method testExpressionManager.
@Test
public void testExpressionManager() {
// given: a plan item
// when
CmmnActivity activity = handler.handleElement(planItem, context);
// then
HumanTaskActivityBehavior behavior = (HumanTaskActivityBehavior) activity.getActivityBehavior();
ExpressionManager expressionManager = behavior.getExpressionManager();
assertNotNull(expressionManager);
assertEquals(context.getExpressionManager(), expressionManager);
}
use of org.camunda.bpm.engine.impl.cmmn.behavior.HumanTaskActivityBehavior in project camunda-bpm-platform by camunda.
the class HumanTaskPlanItemHandlerTest method testActivityBehavior.
@Test
public void testActivityBehavior() {
// given: a planItem
// when
CmmnActivity activity = handler.handleElement(planItem, context);
// then
CmmnActivityBehavior behavior = activity.getActivityBehavior();
assertTrue(behavior instanceof HumanTaskActivityBehavior);
}
use of org.camunda.bpm.engine.impl.cmmn.behavior.HumanTaskActivityBehavior in project camunda-bpm-platform by camunda.
the class HumanTaskPlanItemHandlerTest method testTaskDefinitionFormKey.
@Test
public void testTaskDefinitionFormKey() {
// given
String aFormKey = "aFormKey";
humanTask.setCamundaFormKey(aFormKey);
// when
CmmnActivity activity = handler.handleElement(planItem, context);
// then
HumanTaskActivityBehavior behavior = (HumanTaskActivityBehavior) activity.getActivityBehavior();
TaskDefinition taskDefinition = behavior.getTaskDefinition();
Expression formKeyExpression = taskDefinition.getFormKey();
assertNotNull(formKeyExpression);
assertEquals(aFormKey, formKeyExpression.getExpressionText());
}
Aggregations