Overview
You have successfully deployed an application on Bizlogic but the application is not visible in the database and BizStore is failing to process new events while the Process Template ID is not updating in the PROCESSTEMPLATE table.
Errors in bizstore.log:
(1611) Failed to save current state of process to persistent store for event Id [36], event value [P_REMOVED]
due to the error [com.savvion.sbm.bizlogic.storeevent.BizStoreException:
(1531) Failed to retrieve process metadata from cache for templateID: 2; context()].;
context()com.savvion.sbm.bizlogic.storeevent.BizStoreException:
(1531) Failed to retrieve process metadata from cache for templateID: 2; context() |
Thread-25 (HornetQ-client-global-threads-1305535136) |#]
[#| 04 Aug 2020 09:04:09,191 | BizStore | ERROR | ejbServer | BizStore |
(1531) Failed to retrieve process metadata from cache for templateID: 2; context() |
Thread-25 (HornetQ-client-global-threads-1305535136) |#]
java.lang.RuntimeException: Current Stack Trace:
at com.savvion.sbm.util.SBMException.prepMessage(SBMException.java:190)
at com.savvion.sbm.bizlogic.storeevent.BizStoreException.<init>(BizStoreException.java:46)
at com.savvion.sbm.bizlogic.storeevent.BSCache.getProcessData(BSCache.java:240)
at com.savvion.sbm.bizlogic.storeevent.BSCache.getValue(BSCache.java:197)
at com.savvion.sbm.bizlogic.storeevent.BSCache.getPTName(BSCache.java:101)
at com.savvion.sbm.bizlogic.storeevent.BSProcessTemplate.getName(BSProcessTemplate.java:263)
at com.savvion.sbm.bizlogic.storeevent.be.BEProcessTemplate.onRemove(BEProcessTemplate.java:40)
at com.savvion.sbm.bizlogic.storeevent.be.BEEventHandler.processEvent(BEEventHandler.java:37)
at com.savvion.sbm.bizlogic.storeevent.BSEventHandler.storeBLData(BSEventHandler.java:115)
at com.savvion.sbm.bizlogic.storeevent.BSEventHandler.publish(BSEventHandler.java:97)
at com.savvion.sbm.eventreader.EventReader.process(EventReader.java:751)
at com.savvion.sbm.eventreader.EventReader.pollMultiTrans(EventReader.java:656)
at com.savvion.sbm.eventreader.EventReader.start(EventReader.java:477)
at com.savvion.sbm.bizlogic.storeevent.BSControl.start(BSControl.java:373)
at com.savvion.sbm.bizlogic.storeevent.BSControl.performOperation(BSControl.java:1155)
at com.savvion.sbm.bizlogic.server.ejb.BLBizStoreMDB.processBizStoreRequest(BLBizStoreMDB.java:127)
at com.savvion.sbm.bizlogic.server.ejb.BLBizStoreMDB.onMessage(BLBizStoreMDB.java:103)
Environment
Product: Savvion Version: 6.x.x,7.x.x,8.x.x, 10.0.x OS: ANY Application Server: ANY Database: ANY Browser: ANY
Solution
The above errors occur when the problematic PT (Process Template) data is not present in the BizStore table.
Follow the resolution steps below when this problem is encountered:
- Run below queries to confirm whether PT object is in sync in BizLogic and BizStore tables :
SELECT * FROM BIZLOGIC_PROCESSTEMPLATE WHERE PROCESS_TEMPLATE_ID=<PTID>;
Where PTID is the problematic process Process Template Id obtained from the logs.
SELECT * FROM PROCESSTEMPLATE WHERE PROCESS_TEMPLATE_ID=<PTID>; - If any of the above queries don't return any row, this indicates the PT object is not in sync in BizLogic and BizStore table. The only way to restore the bizstore is to delete the data related to the problematic ProcessTemplate from all the tables.
Shutdown the bizstore server by navigating to SBM_HOME\bin from the command prompt and executing stopBizStore.cmd
Refer to this article for instructions on how to delete the data for a specific Process Template: Queries to delete data for particular Process Template.
Testing
- Start the bizstore server by navigating to SBM_HOME\bin in command prompt and execute the startBizStore.cmd
- Monitor the bizstore.log file and execute the below queries
> SELECT * FROM BIZSTOREEVENTCOUNTER;
After a 2 minute interval, bizstore LAST_EVENT_ID will match with BIZEVENT's MAX(EVENT_ID)
> SELECT MAX(EVENT_ID) FROM BIZEVENT; - You can now deploy the application and it should visible from the database.