In the admin console, when trying to stop a template contained in an ear so that the ear could be updated, the following exception occurred:
com.ibm.bpe.api.ProcessTemplateNotFoundException: CWWBA0008E: Process Template 'MyProcess, Web 2008-10-10 12:32:22.00' is not found.
It’s unknown how many times that the EAR was attempted to be stopped or what happened on the initial removal from the server.
To investigate the ProcessTemplateNotFoundException, I looked at the BPEDB’s PROCESS_TEMPLATE_B_T table. This table holds the persisted information in the database for process templates. A simple
select * from PROCESS_TEMPLATE_B_T should give a list.
When I ran this query, I found that the table was empty. So the database has no records of any process templates. The weird part is that I can still see the templates in the ‘Business Processes’ tab from the admin console. I’m not sure how this information is populated. Does it come from the EAR file itself or is it generated via BPE API calls? If it’s the latter, I’m even more confused why the BPE API would return a list of templates while the database was empty.
I removed the ear from the admin console and it uninstalled properly. I then installed the EAR and looked at the PROCESS_TEMPLATE_B_T table and it was populated properly.
As far as I know, this was a one-off incident. There is a theory that something occured when ‘Update’ of an existing EAR was selected and the updated EAR contained additional templates. But it’s just a theory.
I thought I’d write this up just in-case anyone else out there runs into this issue. The BPEDB should be the ‘gold standard’ as to the state of your business processes. If it gets out of sync with the admin console, weird errors can result.