There are lots of workitem (50k) created by an automated process, is there a way to submit (or close) these pending workitems in the inbox? i.e. through the explorer, or should the database be directly updated to close these workitems
You can destroy the parent processes, this should cascade all tasks with it. use runtimeService.deleteProcessInstance() for this…
Fiddling in the database is dangerous and not recommended. You can, for example, create a piece of java that locates the processes that own the task, and delete them one by one..