ABORTING ORACLE SOA INSTANCES PROGRAMMATICALLY USING WLST
There are multiple ways to abort recoverable instances in SOA suites:
- From em console
- Updating dehydration tables
- Programmatically
First option, em console, is useful when there are few instances to be aborted. Though we can update dehydration tables to change instance status, it is not a Oracle recommended approach. I found main tables that are updated when will abort instances by tracing using JMC. But this list is not exhaustive. I am providing sql statements only for reference. Don’t execute these statement unless you understand implications. Aborting instances through SOA management API is a cleaner and quick approach. Please refer to this git repo for the script based approach.
DELETE FROM MEDIATOR_CALLBACK WHERE FLOW_ID = 27594227; DELETE FROM MEDIATOR_CORRELATION WHERE FLOW_ID = 27594227; UPDATE CUBE_INSTANCE SET SCOPE_REVISION = SCOPE_REVISION + 1 WHERE FLOW_ID = 27594227; UPDATE SCA_COMMON_FAULT SET STATE=256 WHERE FLOW_ID = 27594227 AND STATE <> 2816 AND STATE <> 256 AND STATE <> 2560 AND STATE <> 3584; UPDATE SCA_ASYNC_CPNT_STATE SET STATE=4 WHERE FLOW_ID = 27594227 AND STATE <> 2; UPDATE SCA_FLOW_TO_CPST SET ADMIN_STATE=2 , ACTIVE_COMPONENT_INSTANCES=0 WHERE FLOW_ID = 27594227; UPDATE SCA_REJECTED_MESSAGE SET SRM_STATE=3328 WHERE FLOW_ID = 27594227 AND SRM_STATE <> 2816 AND SRM_STATE <> 256 AND SRM_STATE <> 2560 AND SRM_STATE <> 3584; UPDATE SCA_FLOW_INSTANCE SET ADMIN_STATE = 2, RECOVERABLE_FAULTS = 0, UNHANDLED_FAULTS = 1 WHERE FLOW_ID = 27594227;
Comments
Post a Comment