FND_CONCURRENT.WAIT_FOR_REQUEST: Doubt

Perguntas relacionadas a questões técnicas do Oracle EBS. Criação de Concorrentes, Value Sets, Alerts, Forms Personalizations, Configurações, etc
Post Reply
User avatar
Porva
Rank: DBA Sênior
Rank: DBA Sênior
Posts: 342
Joined: Mon, 29 Jan 2007 7:36 am
Location: São Paulo/SP
Rafael S. Nunes
São Paulo/SP

Galera, beleza?

I did a process that triggers a certain concurrent several times (within a loop), I did a logic to make a kind of parallelism and break a processing in various parts for performance improvement, until then okay, it worked and such

but I need to make another validation after the execution of these concurrents that are called inside the loop, and I need to know if all the ones that were called finished successfully, so then Continue

I have passed the example of the API / function core fnd_concurrent.wait_for_request, but I could not understand the functioning of it, can you give me some tips?

I did:

I store the request_ids in the type l_trequests within the loop that triggers the concurrents as often required (control this According to the QTDE of records to be processed)

with the type loaded with the concurrents reschest_ids that are being performed at the moment I do:

Select all

 
FOR l_nInd IN l_tRequests.FIRST..l_tRequests.LAST LOOP 
  -- 
  l_bCall_Status :=  
    FND_CONCURRENT.WAIT_FOR_REQUEST ( request_id      => l_tRequests(l_nInd).request_id 
				     ,interval        => 1             -- IN 
				     ,max_wait        => 0             -- IN 
				     ,phase           => l_vPhase      -- OUT 
				     ,status          => l_vStatus     -- OUT 
				     ,dev_phase       => l_vDev_phase  -- OUT 
				     ,dev_status      => l_vDev_status -- OUT 
				     ,message         => l_vMessage    -- OUT 
				    );                                                             
END LOOP; 
Doubts:

How do the input and output parameters work, how to use them?

How do I test if all concurrents finished processing ???

The return of Wait_For_Request is true only when Concurrent ends successfully?

for the face called the wait_for_request She is in "wait" until concurrent ends?
DanielNN
Moderador
Moderador
Posts: 641
Joined: Mon, 03 Sep 2007 3:26 pm
Location: Fortaleza - CE
att,

Daniel N.N.

I was also interested in this. Also you have to call concurrents and need to do something only after your conclusion but never knew something that does it.
paulochagas
Moderador
Moderador
Posts: 86
Joined: Wed, 15 Mar 2006 2:46 pm
Location: São Paulo - SP
Paulo Chagas Filho
__________________

Analista Funcional / Desenvolvedor Oracle EBS
MSN - paulochagas@hotmail.com
Gtalk - pachafi@gmail.com
Skype - paulochagas

Hello friends

I'vê already used a twice this API here in the company and the syntax is that same and it worked without problems, with the difference to use only for a concurrent program instead

follows the piece of codigo of the last my program:

Select all

 
           L_Dummy := apps.Fnd_Concurrent.Wait_For_Request(Request_Id => l_request_num 
                                                         , Interval   => 60          
                                                         , Max_Wait   => 0          
                                                         , Phase      => L_Phase           
                                                         , Status     => L_Status          
                                                         , Dev_Phase  => L_Dev_Phase          
                                                         , Dev_Status => L_Dev_Status          
                                                         , Message    => L_Message);            
           -- If Request Completed Successfully         
           If L_Dev_Phase = 'COMPLETE' And L_Dev_Status = 'NORMAL' Then          
              -- 
              fnd_file.put_line (fnd_file.LOG,'The Request Supplier Sites Open Interface Import - Request ID --> '||TO_CHAR(l_request_num)||', was proceeded with sucess!!'); 
follows a page that details the use of this API: http://www.notesbit.com/index.php/oracl ... mple-code/

Hugs


When Submitting Concurrent Requests Using PL / SQL, it is offten desired to have the parent process Wait Until All The Child Have Completed Before Completing Itsself Processes. The Following Describes The Function Used to Accomplish This.

REFER METALINK 1021956.6: The Following Describes How To Submit Count Requests USING PL / SQL AND HAVE THE PARENT REQUEST 'WAIT' UNTIL EACH OF THE CHILD HAVE COMPLETED BEFORE IT COMPLETES.

Use the FND_CONCURRENT.WAIT_FOR_REQUEST FUNCTION Documented in the Oracle Applications Developer's Guide, Release 11i, Page 21-8 SEE THE FND_CONCURRENT.WAIT_FOR_REQUEST FUNCTION DESCRIPTION.

Select all

Summary  
         FUNCTION FND_CONCURRENT.WAIT_FOR_REQUEST  
  
  (request_id IN number DEFAULT NULL,  
          interval   IN number DEFAULT 60,  
          max_wait   IN number DEFAULT 0,  
          phase      OUT varchar2,  
          STATUS     OUT varchar2,  
          dev_phase  OUT varchar2,  
          dev_status OUT varchar2,  
          message    OUT varchar2) RETURN  BOOLEAN;
Description [/b]
Wait for the Request Completion, Then Return The Request Phase / Status and
Completion Message to The Caller. ALSO CALL SLEEP BETWEEN DATABASE CHECKS.

arguments (input)

request_id
The Request ID of the Program to wait on.

Interval
TIME TO WAIT BETWEEN CHECKS. This is the Number of Seconds to Sleep.
The default is 60 seconds.

max_wait
The Maximum Time in Seconds to Wait for the Requests Completion.




Phase
The user friendly Request Phase from Fnd_lookups.

Status
The user friendly Request status from FND_LOKUPS.

Dev_phase
The Request Phase AS Constant String That Can Be Used for Program
Logic Comparisons.

Dev_Status
The Request status AS Constant String That Can Be Used for Program
Logic Compositons.

Message
The Completion Message Supplied If the Request has completed.

Select all

BEGIN 
         l_request_id := 
            fnd_request.submit_request (‘XXCUS’, 
                                        ‘XXCUSSPOOL’,       
                                        NULL, 
                                        NULL, 
                                        FALSE, 
                                        p_filename_i, 
                                        p_seq_i 
                                       ); 
      END; 
      p_request_id_o := l_request_id; 
 
      fnd_file.put_line (fnd_file.LOG,‘XXCUSSPOOL Submitted. Request_id=’”p_request_id_o”‘ Filename=’”p_filename_i”‘ Seq=’”p_seq_i  ); 
 
      IF p_request_id_o = 0 
      THEN 
         ec_log_debug (p_filename_i,‘SUBMIT_FILE_CREATION’,4090, ‘XXCUSSPOOL submission failed for ‘”p_filename_i”‘Request_id=’”p_request_id_o ); 
      ELSE 
         l_return := 
            fnd_concurrent.wait_for_request (request_id      => p_request_id_o, 
                                             INTERVAL        => 10, 
                                             max_wait        => 300, – Null means wait forever, I normally provide 300 = 5 mins 
                                             phase           => l_phase, 
                                             STATUS          => l_status, 
                                             dev_phase       => l_dev_phase, 
                                             dev_status      => l_dev_status, 
                                             MESSAGE         => l_message 
                                            ); 
      END IF;
/ quote]
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 12 guests