How to delete a child process (instance) in sbm7.52

Posted by capone_savvion on 18-May-2012 12:44

I have used bizlogic command removeallpi to remove my process instances. However I still see some entries in Bizlogic_processisntance table. When I try deleting the process instance using removepi <process instance). FYI, The parent PI is already removed.

=======================================================
Error while processing the command :removepi 3390142
1. RemoteException : BizLogicException: (596):The Process <xxxxxxxxxxxxxxxxxxxxxxxxxxx#3390142> is a child Process. Only its parent can remove it!; co
2. BizLogicException : (596):The Process <xxxxxxxxxxxxxxxxxxxx#3390142> is a child Process. Only its parent can remove it!; context(ProcessInstanceSBBean.remove)

=======================================================

All Replies

Posted by aasawari on 21-May-2012 01:10

Hi Lokesh,

Ideally the 'removeAllPi' command removes all the process instances of a process template. In case of applications where sub-processes are involved, this command will remove the PI of the sub-process too. You may refer "BizLogic Admin Commands" of Bizlogic Developer's Guide for same.This command should also remove PI data from all the BIZLOGIC tables also.

EG :  |nbmumaasawari:ebms>help removeallpi
        COMMAND:
                     removeAllPi

       SUMMARY:
               This command removes all the process instances
               of the specified process template.

       EXAMPLE:
               removeAllPi MyProcess

                   |nbmumaasawari:ebms>removeallpi test            // 'test' -> Parent PT name.

                   Total 1 process instance(s) removed

Further, I understand that in your case that this command has not removed sub-process instance info from the BIZLOGIC_PROCESSINSTANCE table. I suspect if the removeAllPi command was executed successfully. You may verify the 'bizlogic.log' file located under $SBM_HOME\logs for information on same. If 'Debug' is enabled for bizlogic, you will be able to gather more information on the error occurred during PI removal. Please share the log file for my reference. You may also verify if you are still able to see this PI at BPM Portal.

Thanks,

Aasawari

Posted by capone_savvion on 21-May-2012 20:55

Thanks Aasawari,

There might have been a mistake while executing removeallpi commad from my end. Couple of times, I have killed the job thinking that it is hung. This might have created orphan child instances. I have also checked for those instances in the BPM portal and I did not find anything. What is the right approach to clear these orphan child instances? Is truncating bizlogic_processinstance table a good option...?

Posted by aasawari on 22-May-2012 03:48

Hi Lokesh,

I understand that you had cancencled the 'removeAllPi' operation abdruptly and this may have caused the child PI in orphan stage. In case you dont want this data at all, you may go ahead and manually delete orphan PI data from the database. Please note since you have abdruptly halted the process, you will need to check for the availability of orphan PI data in the SBM tables and them remove them manually. However, moving ahead it would be recommended that you always delete PI data through BizLogic Admin commands / SBM API's or through BPM Portal only.

Hope this information helps you.

Thanks,

Aasawari

Posted by capone_savvion on 23-May-2012 13:16

Could you please provide the list of DB tables from where I have to delete the data. Or Bizlogic_processinstance the only table that I have to deal with.

Thanks,

Lokesh

This thread is closed