WorkflowManager localManager = createLocalWorkflowManager(taskProvider);
File baseDir = new File("C:\\GRIDP_EXEC");
SimpleJobFolderFactory jobFolderFactory = new SimpleJobFolderFactory(baseDir);
WorkflowManagerServiceImpl webService = new WorkflowManagerServiceImpl(localManager, new BasicSerializerSet(), jobFolderFactory);
//webService.setDeleteDirectoriesWhenFreed(true);
//DO NOT FORGET TO CLONE!
TypeMapping typeMapping = (TypeMapping)Types.getDefaultTypeMapping().clone();
typeMapping.putContentType("file", TransferableFile.DATA_TYPE);
typeMapping.putContentType("taskStub", TaskStub.DATA_TYPE);
//WorkflowManagerServiceImpl webService = new WorkflowManagerServiceImpl(localManager, new BasicSerializerSet(typeMapping), jobFolderFactory);
return new ProxyWorkflowManager(webService, new BasicSerializerSet(typeMapping));
}