Achei uma dica interessante para uma necessidade que surgiu aqui.
Você pode determinar um e-mail para que receba o resultado de um concurrent, no meu caso, eu precisava enviar o PDF gerado pelo concurrent. Na tela Submit Request pode-ser fazer isso manualmente pela opção Opções de Entrega/Delivery Opts no próprio concurrent, mas eu precisava fazer isso dinamicamente, então achei a solução abaixo, testei aqui e funcionou:
fonte: http://oraclesanpra.blogspot.com/2013/1 ... tions.htmlDynamically Setting the Delivery Options from Back End
In Oracle Release 12.1.3 Oracle have come up with a new functionality to deliver the output of the Concurrent Program by various methods.
when we click on the Delivery options button it will open up another form which contains the information in which the output can be delivered.
1.IPP Printer : we can specify the Printer IP adress and user name and password for the printer and the no of copies to be printed(can be used if the required information is available).
2.Email: we can specify the email to whom the output has to be mailed after completion.(Specify any valid email address).
3.Fax : we can specify the fax details so that the the output can be faxed once the request is complted.
4.FTP: specify the FTP details to move the output to a particular folder in the server so that it can be access by the employees.
I have taken the Example Email which is generally commenly used.
By default the From field is filled with the email address of the logged in user and subject has the instance name and the report name and the logged in user name.
we can edit and change the subject and give as per the requirement.
In the TO field and the CC fields specify the Email address to whom the output has to be emailed.
If multiple emails are there then seperate them by using the ','.
This is the functionality used from the front end.
If we want to use the same thing from the back end which we generally used to submit the conucurrent program from the back end.
Use the below code.
/* Formatted on 2/20/2013 1:52:15 PM (QP5 v5.139.911.3011) */
DECLARE l_conc_id NUMBER; l_user_id NUMBER := 3651; l_resp_id NUMBER := 20420; l_resp_ppl_id NUMBER := 0; l_boolean BOOLEAN; BEGIN -- -- Define dinamicamente o destinatario do resultado do concurrent -- l_boolean := fnd_request.add_delivery_option(TYPE => 'E', -- this one to speciy the delivery option as Email p_argument1 => 'Testing the Email option from back end', -- subject for the mail p_argument2 => 'abx@xyz.com', -- from address p_argument3 => 'xyz@abc.com', 'adf@abc.com', -- to address p_argument4 => '', -- cc address to be specified here. nls_language => ''); -- language option); -- -- Dispara o concurrent pelo SUBMIT_REQUEST -- IF l_boolean = TRUE THEN fnd_global.apps_initialize(l_user_id, l_resp_id, l_resp_ppl_id); -- intialize the apps. -- l_conc_id := fnd_request.submit_request(application => 'FND', program => 'FNDSCURS', start_time => SYSDATE, sub_request => FALSE); COMMIT; dbms_output.put_line('l_conc_id = ' || l_conc_id); END IF; END;
Exemplo:
![Imagem](https://atechtown.b-cdn.net/wp-content/uploads/2017/03/email-concurrent-request-output.png)
A dica acima seta esta parte dinamicamente:
![Imagem](https://atechtown.b-cdn.net/wp-content/uploads/2017/03/concurrent-program-email-delivery-option.png)