1 Reply Latest reply on Dec 3, 2014 12:42 PM by Darren Osten

    How clean list of old taskService of humann task

    Domenico Schiavone Newbie

      hi to all,

      I would know how to do to clean my taskService.

      I have now a simple process that use a human task, but when I make:

      List<TaskSummary> list = taskService.getTasksAssignedAsPotentialOwner("john", "en-UK");

       

      the list contains the old tasks that belong to old executions where my sample application not finished properly.

       

      Now I want clean all,my taskService,my session etc.....

      how do i it??

      to start my app I make this:

       

      KieServices ks = KieServices.Factory.get();

              KieContainer kContainer = ks.getKieClasspathContainer();

              KieBase kbase = kContainer.getKieBase("kbase");

             

       

              RuntimeManager manager = createRuntimeManager(kbase);

              RuntimeEngine engine = manager.getRuntimeEngine(ProcessInstanceIdContext.get());

              KieSession ksession = engine.getKieSession();

              TaskService taskService = engine.getTaskService();

              AuditService logService = engine.getAuditLogService();