use of org.camunda.bpm.engine.delegate.Expression in project camunda-bpm-platform by camunda.
the class HumanTaskPlanItemHandlerTest method testTaskDefinitionPeformerExpression.
@Test
public void testTaskDefinitionPeformerExpression() {
// given
CaseRole role = createElement(caseDefinition, "aRole", CaseRole.class);
role.setName("aPerformerRole");
humanTask.setPerformer(role);
// when
CmmnActivity activity = handler.handleElement(planItem, context);
// then
HumanTaskActivityBehavior behavior = (HumanTaskActivityBehavior) activity.getActivityBehavior();
TaskDefinition taskDefinition = behavior.getTaskDefinition();
Expression assigneeExpression = taskDefinition.getAssigneeExpression();
assertNotNull(assigneeExpression);
assertEquals("aPerformerRole", assigneeExpression.getExpressionText());
}
use of org.camunda.bpm.engine.delegate.Expression in project camunda-bpm-platform by camunda.
the class HumanTaskPlanItemHandlerTest method testTaskDefinitionAssigneeExpression.
@Test
public void testTaskDefinitionAssigneeExpression() {
// given
String aPriority = "aPriority";
humanTask.setCamundaPriority(aPriority);
// when
CmmnActivity activity = handler.handleElement(planItem, context);
// then
HumanTaskActivityBehavior behavior = (HumanTaskActivityBehavior) activity.getActivityBehavior();
TaskDefinition taskDefinition = behavior.getTaskDefinition();
Expression priorityExpression = taskDefinition.getPriorityExpression();
assertNotNull(priorityExpression);
assertEquals(aPriority, priorityExpression.getExpressionText());
}
use of org.camunda.bpm.engine.delegate.Expression in project camunda-bpm-platform by camunda.
the class HumanTaskPlanItemHandlerTest method testTaskDefinitionPriorityExpression.
@Test
public void testTaskDefinitionPriorityExpression() {
// given
String aPriority = "aPriority";
humanTask.setCamundaPriority(aPriority);
// when
CmmnActivity activity = handler.handleElement(planItem, context);
// then
HumanTaskActivityBehavior behavior = (HumanTaskActivityBehavior) activity.getActivityBehavior();
TaskDefinition taskDefinition = behavior.getTaskDefinition();
Expression priorityExpression = taskDefinition.getPriorityExpression();
assertNotNull(priorityExpression);
assertEquals(aPriority, priorityExpression.getExpressionText());
}
use of org.camunda.bpm.engine.delegate.Expression in project camunda-bpm-platform by camunda.
the class HumanTaskPlanItemHandlerTest method testTaskDefinitionFollowUpDateExpression.
@Test
public void testTaskDefinitionFollowUpDateExpression() {
// given
String aFollowUpDate = "aFollowDate";
humanTask.setCamundaFollowUpDate(aFollowUpDate);
// when
CmmnActivity activity = handler.handleElement(planItem, context);
// then
HumanTaskActivityBehavior behavior = (HumanTaskActivityBehavior) activity.getActivityBehavior();
TaskDefinition taskDefinition = behavior.getTaskDefinition();
Expression followUpDateExpression = taskDefinition.getFollowUpDateExpression();
assertNotNull(followUpDateExpression);
assertEquals(aFollowUpDate, followUpDateExpression.getExpressionText());
}
use of org.camunda.bpm.engine.delegate.Expression in project camunda-bpm-platform by camunda.
the class FieldSpec method verify.
public void verify(FieldDeclaration field) {
assertEquals(fieldName, field.getName());
Object fieldValue = field.getValue();
assertNotNull(fieldValue);
assertTrue(fieldValue instanceof Expression);
Expression expressionValue = (Expression) fieldValue;
assertEquals(getExpectedExpression(), expressionValue.getExpressionText());
}
Aggregations