PreparedStatement pstmt = null;
String workId = null;
try
{
SpiCaseIdGenerator caseIdGenerator=gCaseDatabaseImpl.getCaseIdGenerator();
SchemaContext schemaContext=gCaseDatabaseImpl.getSchemaContext();
Store storeConfig= gCaseDatabaseImpl.getStore();
String pkgId = workflowProcess.getWorkflowPackage().getUUID();
String processId = workflowProcess.getUUID();
workId = caseIdGenerator.genWorkflowWorkID(pkgId, processId, caseId);
String strSQL =
"INSERT INTO "
+ schemaContext.getTableName(SchemaContext.SCHEMA_WORK)
+ "(vc_packageid,vc_processid,vc_caseid,vc_owner_processid,vc_activityid,vc_uuid,vc_performer,dat_arriveTime,dat_acceptTime) "
+ "VALUES(?,?,?,?,?,?,?,?,?)";
pstmt = conn.prepareStatement(strSQL);
pstmt.setString(1, pkgId);
pstmt.setString(2, processId);