String workId = null;
try
{
SpiCaseIdGenerator caseIdGenerator=gCaseDatabaseImpl.getCaseIdGenerator();
SchemaContext schemaContext=gCaseDatabaseImpl.getSchemaContext();
Store storeConfig= gCaseDatabaseImpl.getStore();
String packageId = workflowProcess.getWorkflowPackage().getUUID();
String processId = workflowProcess.getUUID();
String caseId = workflowCase.getUUID();
workId = caseIdGenerator.genWorkflowWorkID(packageId, processId, caseId);