use of org.camunda.bpm.engine.impl.persistence.entity.TaskEntity in project camunda-bpm-platform by camunda.
the class CmmnExecution method createTask.
public TaskEntity createTask(TaskDecorator taskDecorator) {
TaskEntity task = TaskEntity.createAndInsert(this);
setTask(task);
taskDecorator.decorate(task, this);
Context.getCommandContext().getHistoricTaskInstanceManager().createHistoricTask(task);
// All properties set, now firing 'create' event
task.fireEvent(TaskListener.EVENTNAME_CREATE);
return task;
}
use of org.camunda.bpm.engine.impl.persistence.entity.TaskEntity in project camunda-bpm-platform by camunda.
the class CaseExecutionEntity method createTask.
public TaskEntity createTask(TaskDecorator taskDecorator) {
TaskEntity task = super.createTask(taskDecorator);
fireHistoricCaseActivityInstanceUpdate();
return task;
}
use of org.camunda.bpm.engine.impl.persistence.entity.TaskEntity in project camunda-bpm-platform by camunda.
the class GetTaskFormCmd method execute.
public TaskFormData execute(CommandContext commandContext) {
TaskManager taskManager = commandContext.getTaskManager();
TaskEntity task = taskManager.findTaskById(taskId);
ensureNotNull("No task found for taskId '" + taskId + "'", "task", task);
for (CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) {
checker.checkReadTask(task);
}
if (task.getTaskDefinition() != null) {
TaskFormHandler taskFormHandler = task.getTaskDefinition().getTaskFormHandler();
ensureNotNull("No taskFormHandler specified for task '" + taskId + "'", "taskFormHandler", taskFormHandler);
return taskFormHandler.createTaskForm(task);
} else {
// Standalone task, no TaskFormData available
return null;
}
}
use of org.camunda.bpm.engine.impl.persistence.entity.TaskEntity in project camunda-bpm-platform by camunda.
the class GetTaskVariableCmd method execute.
public Object execute(CommandContext commandContext) {
ensureNotNull("taskId", taskId);
ensureNotNull("variableName", variableName);
TaskEntity task = Context.getCommandContext().getTaskManager().findTaskById(taskId);
ensureNotNull("task " + taskId + " doesn't exist", "task", task);
checkGetTaskVariable(task, commandContext);
Object value;
if (isLocal) {
value = task.getVariableLocal(variableName);
} else {
value = task.getVariable(variableName);
}
return value;
}
use of org.camunda.bpm.engine.impl.persistence.entity.TaskEntity in project camunda-bpm-platform by camunda.
the class GetTaskVariablesCmd method execute.
public VariableMap execute(CommandContext commandContext) {
ensureNotNull("taskId", taskId);
TaskEntity task = Context.getCommandContext().getTaskManager().findTaskById(taskId);
ensureNotNull("task " + taskId + " doesn't exist", "task", task);
checkGetTaskVariables(task, commandContext);
VariableMapImpl variables = new VariableMapImpl();
// collect variables from task
task.collectVariables(variables, variableNames, isLocal, deserializeValues);
return variables;
}
Aggregations