use of org.wso2.carbon.humantask.core.dao.TaskDAO in project carbon-business-process by wso2.
the class Skip method checkPreConditions.
/**
* Checks the Pre-conditions before executing the task operation.
*/
@Override
protected void checkPreConditions() {
TaskDAO task = getTask();
checkForValidTask();
if (!task.isSkipable()) {
throw new HumanTaskRuntimeException(String.format("The task[id:%d] is not a skippable task.", task.getId()));
}
}
use of org.wso2.carbon.humantask.core.dao.TaskDAO in project carbon-business-process by wso2.
the class UpdateComment method execute.
@Override
public void execute() {
authorise();
TaskDAO task = getTask();
checkPreConditions();
checkState();
task.updateAndPersistComment(updatingCommentId, updatedCommentString, getOperationInvoker().getName());
processTaskEvent();
checkPostConditions();
}
use of org.wso2.carbon.humantask.core.dao.TaskDAO in project carbon-business-process by wso2.
the class TaskCreationContext method injectExpressionEvaluationContext.
public void injectExpressionEvaluationContext(TaskDAO task) {
if (taskConfiguration == null) {
throw new RuntimeException("The task configuration is empty in the task creation context");
}
EvaluationContext evaluationContext = new ExpressionEvaluationContext(task, this.getTaskConfiguration());
this.setEvalContext(evaluationContext);
}
Aggregations