It seems that we can register the our own TaskLifeCycleEventListener implementation through spring's "org.kie.spring.factorybeans.TaskServiceFactoryBean" bean. However, can we register the same thorough "org.kie.spring.factorybeans.RuntimeEnvironmentFactoryBean" spring bean? Please let me know if anyone knows about this.
if you use 6.1 or later you can use deployment descriptors for that purpose. Take a look at docs about deployment descriptor and then create one where you define global settings for your environment and define it as default deployment descriptor via system property called org.kie.deployment.desc.location that should be a valid URL of complete location of that file. Note it can reference classpath location by prefixing it with classpath, e.g. classpath:/META-INF/deployment-descriptor.xml
In case you sue kjars you can then control it on kjar level by including deployment descriptor inside the kjar.
Just for the record (as to avoid having to debug/search the code), in a kjar deployment on 6.1.0.Final, the deployment descriptor file name is META-INF/kie-deployment-descriptor.xml