Home > AIA, BPEL, BPM, JDeveloper, Oracle, Service Bus, SOA Suite, Tools > SOA Suite delete instances for specific composite

SOA Suite delete instances for specific composite

There are fine resources on how to purge SOA Suite instances. However there are case where you want to delete the instances for a specific composite deployed in the SOA Suite. An example could be after an extensive test or test load on a specific service implemented in a SCA composite.

Here is the PL/SQL we used to purge instances of the productservice composite in the test partition. It is based on the default packages that are bundled with the SOA Suite to purge instance data:

DECLARE
   l_min_creation_date   TIMESTAMP     := to_timestamp('2010-01-01','yyyy-mm-dd');
   l_max_creation_date   TIMESTAMP     := to_timestamp('2012-09-10 1600','yyyy-mm-dd hh24mi');
   l_batch_size          INTEGER       := 100;
   l_max_runtime         INTEGER       := 60;
   l_soa_partition_name  varchar2(100) := 'test';
   l_composite_name      varchar2(100) := 'productservice';
 
BEGIN
-- delete instances for specific composite
soa.delete_instances( min_creation_date => l_min_creation_date
                    , max_creation_date => l_max_creation_date
                    , batch_size => l_batch_size 
                    , max_runtime => l_max_runtime
                    --, retention_period =>
                    , purge_partitioned_component => FALSE
                    , composite_name => l_composite_name
                    --, composite_revision => 
                    , soa_partition_name => l_soa_partition_name
                    );
commit;
END;

You can use the instances tab to track the progress of the delete script:
Composite instance count

  1. Ponraj Ramasubbu
    March 18th, 2013 at 21:28 | #1

    Hi,
    Many thanks for sharing the knowledge!

    What would happen to the other composite instances that are invoked from this composite.
    Say Composite A -> Composite B -> Composite C
    If I purge instances of Composite A, will it purge any instance that are part of that trace?

    Kind regards
    Ponraj

  2. March 22nd, 2013 at 22:06 | #2

    Hi, in the scenario you are giving, it would just purge instances of composite A.

  1. No trackbacks yet.