How to assign all case instructions generated by SSOLITE stored procedures to a dedicated iProcess Engine bgmboxqueue

How to assign all case instructions generated by SSOLITE stored procedures to a dedicated iProcess Engine bgmboxqueue

book

Article ID: KB0078271

calendar_today

Updated On:

Products Versions
TIBCO iProcess Engine (Oracle) -

Description

It is possible to create a new database message queue and Mbox set in order to assign only those instructions generated by the SSOLITE stored procedures.
Dedicated BG processes are assigned to process the case instructions on the dedicated Mbox set.

This can prevent a large build-up of instructions in the default BG message queues.

Issue/Introduction

This article details creating a new message queue and Mbox set for assigning SSOLITE stored procedure instructions to enable dedicated BG process processing.

Environment

TIBCO iProcess Engine (Oracle) - all versions

Resolution

The following can be used to create a new Mbox set and message queue for SSOLITE instructions.

1). Use SQLPLUS to connect to the Oracle instance.
  
    $ORACLE_HOME/bin/sqlplus
  
    connect as the iProcess database user

2). Create an AQ queue table called bgmboxtable3.
   
    EXECUTE DBMS_AQADM.CREATE_QUEUE_TABLE (queue_table => 'SWPRO.bgmboxtable3',queue_payload_type => 'SWPRO.swlocalmsg', sort_list => ' priority, enq_time', comment => '3rd background mbox', compatible =>8.1);

    substitute SWPRO for the TABLE_OWNER of the iProcess tables

3). Create an AQ queue called bgmboxqueue3 in this queue table.

    EXECUTE DBMS_AQADM.CREATE_QUEUE (queue_name => 'SWPRO.bgmboxqueue3', queue_table =>'SWPRO.bgmboxtable3', retry_delay => 300, max_retries => 12);

    substitue SWPRO for the TABLE_OWNER of the iProcess tables

4). Start the bgmboxqueue3 queue.

    EXECUTE DBMS_AQADM.START_QUEUE (queue_name => 'SWPRO.bgmboxqueue3');

    substitute SWPRO for the TABLE_OWNER of the iProcess tables

5). Grant the required privileges on the bgmboxqueue3 queue.
   
    EXECUTE dbms_aqadm.grant_queue_privilege (privilege => 'all', queue_name =>'bgmboxqueue3', grantee => 'SWUSER', grant_option => false );

    substitue SWUSER with the iProcess foreground database user

6). Commit the changes, disconnect and exit Oracle.
 
    commit;
    disconnect;
    exit;

7). Create a new MBOX set called SSOLITE
   
    Run the iProcess command:
       
        swadm add_mboxset SSOLITE Local

8). Create a new queue called SSOLITE
   
    Run the iProcess command:
   
        swadm ADD_QUEUE SSOLITE Local 0001::bgmboxtable3:bgmboxqueue3

9). Add the SSOLITE queue to the SSOLITE Mbox set.

    Run the iProcess command “swadm show_mboxsets” to get the number of the SSOLITE mboxset
    Run the iProcess command “swadm show_queues” to get the number of the SSOLITE queue


    To add the queue to the Mbox set run the iProcess command:
       
        swadm ADD_QUEUE_TO_MBOXSET 6 7

        where 6 is the number of the Mbox set
        and 7 is the number of the message queue

10). Create 4 new BG process.

    Run the iProcess commands:

        swadm add_process 1 BG Y
        swadm add_process 1 BG Y
        swadm add_process 1 BG Y
        swadm add_process 1 BG Y
   (additional BG processes can be added depending on the required throughput)

11). Configure the four new BG processes to work from the SSOLITE mbpxset.

    Run the iProcess command “swadm show_mboxsets” to get the number of the SSOLITE mboxset
    Run the iProcess command “swadm show_processes” to get the number of the  4 new BG processes

    In this example the SSOLITE mboxset is number 6.
    The four new BG processes are 5,6,7 & 8

    Assign the BG to read from the SSOLITE queue using the iProcess commands:

        swadm set_attribute 1 BG 5 MBSET_READ_BG 6
        swadm set_attribute 1 BG 6 MBSET_READ_BG 6
        swadm set_attribute 1 BG 7 MBSET_READ_BG 6
        swadm set_attribute 1 BG 8 MBSET_READ_BG 6

12). Assign all SSOLITE call instructions to be written to the SSOLITE mboxset.

    Run the iProcess command:

        swadm set_attribute 1 SSOLITE 0 MBSET_WRITE_BG 6

        where 6 is the number of the mboxset
 
13). Restart iProcess to use the dedicated queue.
 

The instructions above create the message queue bgmboxqueue3. This name can be changed to suite individual requirements.
 
All message instructions posted a BG process using the iProcess SSOLITE stored procedure will go to the dedicated message queue and Mbox set.

Additional Information

TIBCO iProcess Engine (Oracle) Administrator's Guide