String parent_workId = null;
String vc_performer = null;
String vc_caseId = null;
String vc_activityId = null;
String vc_owner_processId = null;
WorkflowProcess ownerProcess = null;
while (jrs.next())
{
parent_workId = jrs.getString("vc_parent_workId");
vc_performer = jrs.getString("vc_performer");
vc_activityId = jrs.getString("vc_activityId");
vc_owner_processId = jrs.getString("vc_owner_processId");
vc_caseId = jrs.getString("vc_caseId");
if (parent_workId == null)
{
workflowWork = new WorkflowWorkImpl();
workflowWork.setWorkflowCase(findCase_impl(gCaseDatabaseImpl,workflowProcess,operator,conn,false,vc_caseId, false));
workflowWork.setUUID(jrs.getString("vc_uuid"));
ownerProcess = workflowPackage.findWorkflowProcess(vc_owner_processId);
workflowWork.setWorkflowActivity(ownerProcess.findWorkflowActivity(vc_activityId));
workflowWork.setArriveTime(DateTools.toJavaDate(jrs.getTimestamp("dat_arriveTime")));
workflowWork.setAcceptTime(DateTools.toJavaDate(jrs.getTimestamp("dat_acceptTime")));
workflowWork.setDispatchTime(DateTools.toJavaDate(jrs.getTimestamp("dat_dispatchTime")));
workflowWork.setPerformer(
gCaseDatabaseImpl.getWorkflowService().getUserDatabase().findParticipant(
vc_performer));
}
else
{
SubWorkImpl workflowSubWork = new SubWorkImpl();
workflowSubWork.setWorkflowCase(findCase_impl(gCaseDatabaseImpl,workflowProcess,operator,conn,false,vc_caseId, false));
workflowSubWork.setUUID(jrs.getString("vc_uuid"));
ownerProcess = workflowPackage.findWorkflowProcess(vc_owner_processId);
workflowSubWork.setWorkflowActivity(ownerProcess.findWorkflowActivity(vc_activityId));
workflowSubWork.setArriveTime(DateTools.toJavaDate(jrs.getTimestamp("dat_arriveTime")));
workflowSubWork.setAcceptTime(DateTools.toJavaDate(jrs.getTimestamp("dat_acceptTime")));
workflowSubWork.setDispatchTime(
DateTools.toJavaDate(jrs.getTimestamp("dat_dispatchTime")));