SOA INFRA Use Full Everyday Queries
SOA INFRA Use Full Everyday Queries
First of all, if you have not allready read the following links, this is the way to start
Take a look:
https://forums.oracle.com/forums/thread.jspa?threadID=962459
The next blog holds all the information about the states and their meaning:
https://blogs.oracle.com/ateamsoab2b/entry/list_of_all_states_from
So, once you have read the above, you can easily understand the rest:
* Find running instances of a single composite
SELECT * FROM COMPOSITE_INSTANCE WHERE COMPOSITE_NAME='COMPOSITE_NAME' AND
LIVE_INSTANCES>0
* Count Instances that have run for a specific composite in a single period
select count(*) from CUBE_INSTANCE
where COMPOSITE_NAME='COMPOSITE_NAME'
and CREATION_DATE BETWEEN TO_DATE('21/09/2012 00:00:01','dd/mm/yyyy
HH24:MI:SS') AND TO_DATE('21/09/2012 10:50:00','dd/mm/yyyy HH24:MI:SS' )
THEN
THEN
THEN
THEN
THEN
THEN
THEN
THEN
THEN
* Query to find the execution time of BPEL instances Extend your search query to find
the parent that has initialized the composite(very usefull!)
SELECT
qu.row_id,qu.ID,qu.composite_id,cu.STATUS,qu.created,qu.duration_in_second
FROM CUBE_INSTANCE cu,
(
select cmpinst.TITLE as row_id,cube.CIKEY as ID,cube.CMPST_ID as
composite_id,cube.CREATION_DATE as created,(extract(day from cube.modify_date
- cube.creation_date)*86400+extract(hour from cube.modify_date cube.creation_date)*3600+extract(minute from cube.modify_date cube.creation_date)*60+extract(second from cube.modify_date cube.creation_date)) duration_in_second
from CUBE_INSTANCE cube,COMPOSITE_INSTANCE cmpinst where
cube.CMPST_ID=cmpinst.ID AND
cube.COMPOSITE_NAME='COMPOSITE_NAME' and
cube.COMPONENT_NAME='COMPONENT_NAME' AND
cube.STATE>4 AND
cube.CREATION_DATE between TO_DATE('2012-10-09 14:00:00', 'YYYY-MM-DD
HH24:Mi:SS') and TO_DATE('2012-10-09 15:00:00', 'YYYY-MM-DD HH24:Mi:SS')
) qu
where
cu.CMPST_ID=qu.composite_id AND
cu.PARENT_ID=concat('bpel:',qu.ID)
* Query to find the execution time of BPEL instances from VIEW TABLES
select avg(EVAL_TIME) from BPEL_PROCESS_INSTANCES where
COMPONENT_NAME='COMPONENT_NAME' and
STATUS='STATUS' and
CREATION_DATE> TO_DATE('2014-02-27 00:00:00', 'YYYY-MM-DD HH24:Mi:SS')
* Callback resolved:
select count(*) from dlv_message where dlv_type = 2 and state=2
* Undeliverd Callback:
select count(*) from dlv_message where dlv_type = 2 and state=0
* Find sensors:
select * from COMPOSITE_SENSOR_VALUE where SENSOR_NAME='OrchestrationId_Sensor'
and STRING_VALUE in ('1-1K8BNZL')
* Fault Framework If the composite you are looking for has not TITLE then you can
search by distinct ECID
select distinct(co.TITLE) from COMPOSITE_INSTANCE_FAULT f,COMPOSITE_INSTANCE
co WHERE
f.ECID=co.ECID and
f.COMPOSITE_DN='COMPOSITE_DN' and
f.CREATED_TIME> TO_DATE('2013-01-08 08:00:00', 'YYYY-MM-DD HH24:Mi:SS')
* TIME OUTS
select EXP_DATE from WORK_ITEM
where CIKEY=237468638