public WorkflowTask getTaskById(String taskId) throws RepositoryException {
Connection conn = null;
Statement statement = null;
ResultSet rs = null;
WorkflowTask task = null;
try {
conn = dataSource.getConnection();
statement = conn.createStatement();
String getTasksSql = "SELECT * "
+ "FROM workflow_tasks "
+ "WHERE workflow_task_id = " + taskId;
LOG.log(Level.FINE, "getTaskById: Executing: " + getTasksSql);
rs = statement.executeQuery(getTasksSql);
while (rs.next()) {
// get an instance of the class name
task = DbStructFactory.getWorkflowTask(rs, true);
if (task != null) {
task.setConditions(getConditionsByTaskId(task.getTaskId()));
task.setTaskConfig(getConfigurationByTaskId(task.getTaskId()));
}
}
} catch (Exception e) {
e.printStackTrace();