Search in sources :

Example 11 with HumanTask

use of org.camunda.bpm.model.cmmn.instance.HumanTask in project camunda-bpm-platform by camunda.

the class HumanTaskItemHandler method initializeTaskDefinitionCandidateUsers.

protected void initializeTaskDefinitionCandidateUsers(CmmnElement element, TaskDefinition taskDefinition, CmmnHandlerContext context) {
    HumanTask definition = getDefinition(element);
    ExpressionManager expressionManager = context.getExpressionManager();
    List<String> candidateUsers = definition.getCamundaCandidateUsersList();
    for (String candidateUser : candidateUsers) {
        Expression candidateUserExpression = expressionManager.createExpression(candidateUser);
        taskDefinition.addCandidateUserIdExpression(candidateUserExpression);
    }
}
Also used : ExpressionManager(org.camunda.bpm.engine.impl.el.ExpressionManager) Expression(org.camunda.bpm.engine.delegate.Expression) HumanTask(org.camunda.bpm.model.cmmn.instance.HumanTask)

Example 12 with HumanTask

use of org.camunda.bpm.model.cmmn.instance.HumanTask in project camunda-bpm-platform by camunda.

the class HumanTaskItemHandler method initializeTaskDefinitionCandidateGroups.

protected void initializeTaskDefinitionCandidateGroups(CmmnElement element, TaskDefinition taskDefinition, CmmnHandlerContext context) {
    HumanTask definition = getDefinition(element);
    ExpressionManager expressionManager = context.getExpressionManager();
    List<String> candidateGroups = definition.getCamundaCandidateGroupsList();
    for (String candidateGroup : candidateGroups) {
        Expression candidateGroupExpression = expressionManager.createExpression(candidateGroup);
        taskDefinition.addCandidateGroupIdExpression(candidateGroupExpression);
    }
}
Also used : ExpressionManager(org.camunda.bpm.engine.impl.el.ExpressionManager) Expression(org.camunda.bpm.engine.delegate.Expression) HumanTask(org.camunda.bpm.model.cmmn.instance.HumanTask)

Example 13 with HumanTask

use of org.camunda.bpm.model.cmmn.instance.HumanTask in project camunda-bpm-platform by camunda.

the class HumanTaskItemHandler method initializeTaskDefinitionDueDate.

protected void initializeTaskDefinitionDueDate(CmmnElement element, TaskDefinition taskDefinition, CmmnHandlerContext context) {
    HumanTask definition = getDefinition(element);
    String dueDate = definition.getCamundaDueDate();
    if (dueDate != null) {
        ExpressionManager expressionManager = context.getExpressionManager();
        Expression dueDateExpression = expressionManager.createExpression(dueDate);
        taskDefinition.setDueDateExpression(dueDateExpression);
    }
}
Also used : ExpressionManager(org.camunda.bpm.engine.impl.el.ExpressionManager) Expression(org.camunda.bpm.engine.delegate.Expression) HumanTask(org.camunda.bpm.model.cmmn.instance.HumanTask)

Example 14 with HumanTask

use of org.camunda.bpm.model.cmmn.instance.HumanTask in project camunda-bpm-platform by camunda.

the class HumanTaskItemHandler method initializeTaskDefinitionFormKey.

protected void initializeTaskDefinitionFormKey(CmmnElement element, TaskDefinition taskDefinition, CmmnHandlerContext context) {
    HumanTask definition = getDefinition(element);
    String formKey = definition.getCamundaFormKey();
    if (formKey != null) {
        ExpressionManager expressionManager = context.getExpressionManager();
        Expression formKeyExpression = expressionManager.createExpression(formKey);
        taskDefinition.setFormKey(formKeyExpression);
    }
}
Also used : ExpressionManager(org.camunda.bpm.engine.impl.el.ExpressionManager) Expression(org.camunda.bpm.engine.delegate.Expression) HumanTask(org.camunda.bpm.model.cmmn.instance.HumanTask)

Example 15 with HumanTask

use of org.camunda.bpm.model.cmmn.instance.HumanTask in project camunda-bpm-platform by camunda.

the class HumanTaskItemHandler method initializeTaskDefinitionPriority.

protected void initializeTaskDefinitionPriority(CmmnElement element, TaskDefinition taskDefinition, CmmnHandlerContext context) {
    HumanTask definition = getDefinition(element);
    String priority = definition.getCamundaPriority();
    if (priority != null) {
        ExpressionManager expressionManager = context.getExpressionManager();
        Expression priorityExpression = expressionManager.createExpression(priority);
        taskDefinition.setPriorityExpression(priorityExpression);
    }
}
Also used : ExpressionManager(org.camunda.bpm.engine.impl.el.ExpressionManager) Expression(org.camunda.bpm.engine.delegate.Expression) HumanTask(org.camunda.bpm.model.cmmn.instance.HumanTask)

Aggregations

HumanTask (org.camunda.bpm.model.cmmn.instance.HumanTask)20 Test (org.junit.Test)9 Expression (org.camunda.bpm.engine.delegate.Expression)8 ExpressionManager (org.camunda.bpm.engine.impl.el.ExpressionManager)8 CasePlanModel (org.camunda.bpm.model.cmmn.instance.CasePlanModel)5 PlanItem (org.camunda.bpm.model.cmmn.instance.PlanItem)5 CmmnActivity (org.camunda.bpm.engine.impl.cmmn.model.CmmnActivity)4 Case (org.camunda.bpm.model.cmmn.instance.Case)4 Stage (org.camunda.bpm.model.cmmn.instance.Stage)4 CaseDefinitionEntity (org.camunda.bpm.engine.impl.cmmn.entity.repository.CaseDefinitionEntity)3 CmmnModelInstance (org.camunda.bpm.model.cmmn.CmmnModelInstance)2 Definitions (org.camunda.bpm.model.cmmn.instance.Definitions)2 Task (org.camunda.bpm.model.cmmn.instance.Task)2 Collection (java.util.Collection)1 TaskListener (org.camunda.bpm.engine.delegate.TaskListener)1 ItemHandler (org.camunda.bpm.engine.impl.cmmn.handler.ItemHandler)1 ClassDelegateTaskListener (org.camunda.bpm.engine.impl.task.listener.ClassDelegateTaskListener)1 DelegateExpressionTaskListener (org.camunda.bpm.engine.impl.task.listener.DelegateExpressionTaskListener)1 ExpressionTaskListener (org.camunda.bpm.engine.impl.task.listener.ExpressionTaskListener)1 ScriptTaskListener (org.camunda.bpm.engine.impl.task.listener.ScriptTaskListener)1