BPM, Workflow, and Case

 View Only
  • 1.  How to delete orphaned tasks?

    Posted Wed October 06, 2021 11:17 AM
    Hi All,

    There was an error setting a recurring timer interval time (it was 0 days...):


    and therefore BAW created lots of TD Remainder tasks connected to that timer before we somehow stopped that:

    There is only 1 process instance, but that belongs to another application:

    Unfortunately AdminTask.BPMTasksCleanup do not delete these tasks using any combinations of taskStatus and taskType.

    How could we delete these orphaned tasks from our Process Center?

    Thx,

    ------------------------------
    Laszlo
    ------------------------------


  • 2.  RE: How to delete orphaned tasks?

    IBM Champion
    Posted Wed October 06, 2021 12:03 PM
    Hi Laszlo,

    I don't think those are orphaned tasks, just normal tasks.
    As the TD Reminder step has an implementation of system service, those should automatically be completed.
    Please could you explain a bit more on the exact issue ?


    ------------------------------
    Atanu Roy
    Solution Architect
    Salient Process
    ------------------------------



  • 3.  RE: How to delete orphaned tasks?

    Posted Wed October 06, 2021 01:46 PM
    Hi Atanu,

    There was the human task with a recurring timer accidentally set to 0 days. As the token arrived to this task, BAW did generate one event per 30..50 milliseconds - I suppose because there is no protection against such a wrong setting (recurring immediately without any real delay). As a result of every event BAW added a new token to the service task, which tried to send an e-mail. And after a while we had continuously growing 50+ MB logs full with this error:

    [2021.10.05. 11:05:04:842 CEST] 000001d3 EmailNotifica W CWLLG1146E: Belső levelek nem küldhetők el a következőhöz: baw.user08@barretest.hu,en: null
    com.lombardisoftware.server.emailnotification.SnapshotDoesNotExistException
    at com.lombardisoftware.server.emailnotification.EmailNotificationHandler.handleAsyncMailNotification(EmailNotificationHandler.java:113)
    at com.lombardisoftware.server.emailnotification.AsyncEmailNotificationTaskExecutable$2.call(AsyncEmailNotificationTaskExecutable.java:56)

    The text at the beginning of the error entry means Could not send internal mails to:

    The e-mail server could not send out the mail because of a relay setting error, and finally blocked the incoming requests because of the very high load (as administrators said). The snapshot does not exist exception is very interesting, because the app ran as Tip (maybe a save in Designer meanwhile produced another unnamed snapshot, and there are differences between them?).

    We deleted the process instance, then we restarted the app server, then we restarted the WAS and finally we restarted the machine - without any success. The timer still generated the lots of tokens, even after any restart.

    Finally we somehow (sorry, I don't remember in details how, we tried too many solutions and found many wrong settings...) stopped the endless timer triggering, so no more error generated. Later we discovered the place where the wrong timer value (the zero) was set, so we fixed it and now it works correctly.

    Now we don't have any problems with our BAW, but it seems a little bit slower than before. I suppose because of the lots of "orphaned" or "lost" tasks. I say orphaned, because as I know a (standard) task must belong to a process, but we terminated and deleted the process producing the error. Maybe orphaned isn't the best word for this...

    So, now we have 12,000+ tasks, and 0 process instances (which could contain these tasks), but we cannot delete them.

    Could you give as a solution for this, please?

    Thx,

    ------------------------------
    Laszlo Kertesz
    ------------------------------



  • 4.  RE: How to delete orphaned tasks?

    IBM Champion
    Posted Fri October 08, 2021 10:07 AM
    Hi Laszlo,

    I understand your problem now. 
    I don't think there is any out of the box feature to delete those tasks. In order to run the BPMTasksCleanup  command, the task status should be CLOSED.
    There might be some other solutions as well but what I can think of, if you know the task ids, do an update to LSW_TASK table and set the status to 32 (CLOSED). then try to run the BPMTasksCleanup  command.
    Else you can raise a PMR with IBM and see what they suggest.


    ------------------------------
    Atanu Roy
    Solution Architect
    Salient Process
    ------------------------------



  • 5.  RE: How to delete orphaned tasks?

    Posted Fri November 12, 2021 08:35 AM
    Hi Atanu,

    After updating the orphaned task state to CLOSED (32) and executed the task cleanup admin task, they are successfully deleted.

    Many thanks for your help!

    Thx,

    ------------------------------
    Laszlo
    ------------------------------



  • 6.  RE: How to delete orphaned tasks?

    IBM Champion
    Posted Fri November 12, 2021 08:46 AM
    Great! Thanks for the update.

    ------------------------------
    Atanu Roy
    Solution Architect
    Salient Process
    ------------------------------