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();
You have to abort the running process instances.