AnsweredAssumed Answered

Do service tasks have access to the process engine?

Question asked by sangv on May 17, 2012
Latest reply on May 23, 2012 by sangv
I wanted to use some of the services like taskService to execute some queries with in a service task (implementing ActivitiBehavior or JavaDelegate). Is there a simple way to get access to the process engine and the various services without having to inject them specifically as a field or using spring beans?

public class CleanupTasksDelegate implements ActivityBehavior {

   public void execute(ActivityExecution execution) throws Exception {
      //query all incomplete user tasks in this process instance and delete/complete them