Search in sources :

Example 1 with DefaultTaskFormHandler

use of org.camunda.bpm.engine.impl.form.handler.DefaultTaskFormHandler in project camunda-bpm-platform by camunda.

the class HumanTaskItemHandler method createTaskDefinition.

protected TaskDefinition createTaskDefinition(CmmnElement element, CmmnHandlerContext context) {
    // at the moment a default task form handler is only supported,
    // custom task form handler are not supported.
    TaskFormHandler taskFormHandler = new DefaultTaskFormHandler();
    // create new taskDefinition
    TaskDefinition taskDefinition = new TaskDefinition(taskFormHandler);
    // the plan item id will be handled as taskDefinitionKey
    String taskDefinitionKey = element.getId();
    taskDefinition.setKey(taskDefinitionKey);
    // name
    initializeTaskDefinitionName(element, taskDefinition, context);
    // dueDate
    initializeTaskDefinitionDueDate(element, taskDefinition, context);
    // followUp
    initializeTaskDefinitionFollowUpDate(element, taskDefinition, context);
    // priority
    initializeTaskDefinitionPriority(element, taskDefinition, context);
    // assignee
    initializeTaskDefinitionAssignee(element, taskDefinition, context);
    // candidateUsers
    initializeTaskDefinitionCandidateUsers(element, taskDefinition, context);
    // candidateGroups
    initializeTaskDefinitionCandidateGroups(element, taskDefinition, context);
    // formKey
    initializeTaskDefinitionFormKey(element, taskDefinition, context);
    // description
    initializeTaskDescription(element, taskDefinition, context);
    return taskDefinition;
}
Also used : TaskDefinition(org.camunda.bpm.engine.impl.task.TaskDefinition) DefaultTaskFormHandler(org.camunda.bpm.engine.impl.form.handler.DefaultTaskFormHandler) TaskFormHandler(org.camunda.bpm.engine.impl.form.handler.TaskFormHandler) DefaultTaskFormHandler(org.camunda.bpm.engine.impl.form.handler.DefaultTaskFormHandler)

Aggregations

DefaultTaskFormHandler (org.camunda.bpm.engine.impl.form.handler.DefaultTaskFormHandler)1 TaskFormHandler (org.camunda.bpm.engine.impl.form.handler.TaskFormHandler)1 TaskDefinition (org.camunda.bpm.engine.impl.task.TaskDefinition)1