.environment(environment)
.entityManagerFactory(entityManagerFactory)
.userGroupCallback(userGroupCallback)
.getTaskService();
String deploymentId = (String)environment.get(Environments.DEPLOYMENT_ID);
internalTaskService.addMarshallerContext(deploymentId, new ContentMarshallerContext(environment, loader));
} else {
internalTaskService = null;
}
InvocationHandler invocationHandler = new TaskServiceInvocationHandler(internalTaskService);
return (BPMTaskService)Proxy.newProxyInstance(BPMTaskService.class.getClassLoader(), new Class[]{BPMTaskService.class}, invocationHandler);