public List getPathList_impl(SpiCaseDatabaseImpl gCaseDatabaseImpl,WorkflowProcess workflowProcess,WorkflowParticipant operator,Connection conn,boolean canRelease,WorkflowWork workflowWork, boolean isInPath)
throws WorkflowException
{
ArrayList pathList = new ArrayList();
WorkflowPathImpl workflowPath = null;
PreparedStatement pstmt = null;
ResultSet jrs = null;
try
{
SpiCaseIdGenerator caseIdGenerator=gCaseDatabaseImpl.getCaseIdGenerator();
SchemaContext schemaContext=gCaseDatabaseImpl.getSchemaContext();
Store storeConfig= gCaseDatabaseImpl.getStore();
WorkflowCase workflowCase = workflowWork.getWorkflowCase();
WorkflowPackage workflowPackage = workflowProcess.getWorkflowPackage();
String packageId = workflowPackage.getUUID();
String processId = workflowProcess.getUUID();
String caseId = workflowCase.getUUID();
String strSQL =
"SELECT * FROM "
+ schemaContext.getTableName(SchemaContext.SCHEMA_PATH)
+ " "
+ "WHERE vc_packageId=?"
+ " "
+ "AND vc_processid=?"
+ " "
+ "AND vc_caseId=?"
+ " ";
if (isInPath)
{
strSQL += " AND vc_to=?";
}
else
{
strSQL += " AND vc_from=?";
}
pstmt = conn.prepareStatement(strSQL);
pstmt.setString(1, packageId);
pstmt.setString(2, processId);
pstmt.setString(3, caseId);
pstmt.setString(4, workflowWork.getUUID());
jrs = pstmt.executeQuery();
while (jrs.next())
{
workflowPath = new WorkflowPathImpl();
workflowPath.setUUID(jrs.getString("vc_uuid"));
workflowPath.setBacthNo(jrs.getString("vc_batchNo"));
workflowPath.setEventType(jrs.getInt("int_eventType"));
workflowPath.setFromWorkflowWork(
findWork_impl(gCaseDatabaseImpl,workflowProcess,operator,conn,false,workflowWork.getWorkflowCase(), jrs.getString("vc_from")));
workflowPath.setToWorkflowWork(
findWork_impl(gCaseDatabaseImpl,workflowProcess,operator,conn,false,workflowWork.getWorkflowCase(), jrs.getString("vc_to")));
}
}
catch (SQLException sqlex)
{