Search in sources :

Example 1 with TaskFormDataImpl

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

the class MyTaskFormHandler method createTaskForm.

public TaskFormData createTaskForm(TaskEntity task) {
    ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration();
    IdentityService identityService = processEngineConfiguration.getIdentityService();
    RuntimeService runtimeService = processEngineConfiguration.getRuntimeService();
    logAuthentication(identityService);
    logInstancesCount(runtimeService);
    TaskFormDataImpl result = new TaskFormDataImpl();
    result.setTask(task);
    return result;
}
Also used : IdentityService(org.camunda.bpm.engine.IdentityService) TaskFormDataImpl(org.camunda.bpm.engine.impl.form.TaskFormDataImpl) RuntimeService(org.camunda.bpm.engine.RuntimeService) ProcessEngineConfigurationImpl(org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl)

Example 2 with TaskFormDataImpl

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

the class DefaultTaskFormHandler method createTaskForm.

public TaskFormData createTaskForm(TaskEntity task) {
    TaskFormDataImpl taskFormData = new TaskFormDataImpl();
    Expression formKey = task.getTaskDefinition().getFormKey();
    if (formKey != null) {
        Object formValue = formKey.getValue(task);
        if (formValue != null) {
            taskFormData.setFormKey(formValue.toString());
        }
    }
    taskFormData.setDeploymentId(deploymentId);
    taskFormData.setTask(task);
    initializeFormProperties(taskFormData, task.getExecution());
    initializeFormFields(taskFormData, task.getExecution());
    return taskFormData;
}
Also used : TaskFormDataImpl(org.camunda.bpm.engine.impl.form.TaskFormDataImpl) Expression(org.camunda.bpm.engine.delegate.Expression)

Aggregations

TaskFormDataImpl (org.camunda.bpm.engine.impl.form.TaskFormDataImpl)2 IdentityService (org.camunda.bpm.engine.IdentityService)1 RuntimeService (org.camunda.bpm.engine.RuntimeService)1 Expression (org.camunda.bpm.engine.delegate.Expression)1 ProcessEngineConfigurationImpl (org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl)1