public static final synchronized BPMTaskService getTaskService ( QName serviceDomainName , QName serviceName ) { KnowledgeRuntimeManager runtimeManager = KnowledgeRuntimeManagerRegistry . getRuntimeManager ( serviceDomainName , serviceName ) ; if ( runtimeManager != null ) { RuntimeEngine runtimeEngine = runtimeManager . getRuntimeEngine ( ) ; if ( runtimeEngine != null ) { final TaskService taskService = runtimeEngine . getTaskService ( ) ; if ( taskService != null ) { InvocationHandler ih = new InvocationHandler ( ) { @ Override public Object invoke ( Object proxy , Method method , Object [ ] args ) throws Throwable { return method . invoke ( taskService , args ) ; } } ; return ( BPMTaskService ) Proxy . newProxyInstance ( BPMTaskService . class . getClassLoader ( ) , new Class [ ] { BPMTaskService . class } , ih ) ; } } } return null ; }
Gets a task service .