boolean getConditions) throws RepositoryException {
Connection conn = null;
Statement statement = null;
ResultSet rs = null;
Workflow workflow = null;
try {
conn = dataSource.getConnection();
statement = conn.createStatement();
String getWorkflowSql = "SELECT * from workflows WHERE workflow_name = '"
+ workflowName + "'";
LOG.log(Level.FINE, "getWorkflowByName: Executing: " + getWorkflowSql);
rs = statement.executeQuery(getWorkflowSql);
while (rs.next()) {
workflow = DbStructFactory.getWorkflow(rs);
if (getTasks) {
workflow.setTasks(getTasksByWorkflowId(workflow.getId()));
}
if (getConditions) {
workflow.setConditions(getConditionsByWorkflowId(workflow.getId()));
handleGlobalWorkflowConditions(workflow);
}
}
} catch (Exception e) {