Need to call the PL/SQL Package in the group dynamics of approval class that implements IDynamicApprovalGroup

Hi all

This is regarding the approval of invoice AP I need in my project where the user selects the users/people approval when creating the invoice based on logic. There may be any number of users who could be part of the approval group.

Approval users information is stored in a table with a single Bill.

When the user initiates invoice approval, approval of the Bill should go to all the people/users selected in the invoice.

I created the dynamic of approval group which is the result of a java class. This java class implements IDynamicApprovalGroup. (what is the oracle Developer Guide).

I called PL/SQL to java class package to get all the details of users of custom for the current invoice table.

I used the DriverManager.getConnection method by hard coding (JDBC URL, Username, Pwd) connection details that works perfectly fine.

But I don't want to hard-code the connection details because it will change in bodies SIT/UAT/PROD.

Please ask you to guide me if there is no solution for the information of connection without hard coding it.

Following code used to get the connection details

try {}

Class.forName ("oracle.jdbc.driver.OracleDriver");

System.out.println ("= class loaded");

}

catch (ClassNotFoundException ex) {}

System.out.println ("= class loading error");

ex.printStackTrace ();

}

Fitting out = null;

CallableStatement cstmt = null;

Try

{

connection = DriverManager.getConnection ("jdbc:oracle:thin:@xxhostname:1521/SID", "FUSION", "*");

Connection = GetConnection ();

System.out.println ("= connection =" + connection);

prepare the call

cstmt = connection.prepareCall ("{call XX_AP_INV_DYN_APPROVAL_PKG. {GET_GROUP_PARTICIPANTS (?,?)} ») ;

cstmt.setString (1, '12345');   ID on invoice

Exit of the register

cstmt.registerOutParameter (2, java.sql.Types.VARCHAR);

Call the stored procedure

cstmt. Execute();

System.out.println ("= procedure being executed");

approvalGroupMembers = cstmt.getString (2).split("#");

System.out.println ("= output:" + cstmt.getString (2));

}

catch (Exception ex) {}

ex.printStackTrace ();

}

Finally

{

Try

{

If (cstmt! = null)

close the callable statement

{

cstmt. Close();

cstmt = null;

}

System.out.println ("= stmt closed");

}

catch (SQLException ex)

{

System.out.println ("= stmt close err");

ex.printStackTrace ();

}

Try

{

If (connection! = null)

close the connection

{

Connection.Close;

connection = null;

}

System.out.println ("= closed conn");

}

catch (SQLException ex)

{

System.out.println ("= Close conn err");

ex.printStackTrace ();

}

}

Thank you

Dipak.

HI Dembélé - you should be able to call the provider database from the java class. Documentation is here. However, you need to specify the name of the data provider that is the same in all environments. Do you know what it is? If it's not I'll take a look and get back to you.

__

Peter Maurer

Relationship with the developers of Applications in fusion

https://blogs.Oracle.com/fadevrel/

Tags: Oracle Applications

Similar Questions

  • When I start my computer, I get a screen that tells me the EULA has expired and I need to call the computer of the company rented to renew, however is not a rental?

    When I start my computer, I get a screen that tells me that the CONTRACT has expired and I need to call the company, that the computer can be rented to renew, however is not a rental? I have no idea what this same refers to, however, it gives me a password to enter, tells me that I have to wait 10 minutes, then it resets a chipset and allows the computer to, and then starts. I can't even take a screenshot of this message, because what it comes to control over the computer. I've scabbed virus and comes back clean. All this shows is a name of agent: HLZR4G1, then the Version 5.6.5 (Build-a-1028). The password was Wanker that seemed fishy, now the password is numbers and letters. Can someone explain this to me?

    Hello

    Download update and scan with the free version of malwarebytes anti-malware

    http://www.Malwarebytes.org/MBAM.php

    You can also download and run rkill to stop the process of problem before you download and scan with malwarebytes

    http://www.bleepingcomputer.com/download/anti-virus/rkill

    make it work above in safe mode with networking

    Windows Vista

    Using the F8 method:

    1. Restart your computer.
    2. When the computer starts, you will see your computer hardware are listed. When you see this information begins to tap theF8 key repeatedly until you are presented with theBoot Options Advanced Windows Vista.
    3. Select the Safe Mode with networking with the arrow keys.
    4. Then press enter on your keyboard to start mode without failure of Vista.
    5. To start Windows, you'll be a typical logon screen. Connect to your computer and Vista goes into safe mode.
    6. Do whatever tasks you need and when you are done, reboot to return to normal mode.
  • Need to call the javascript function when the page is loaded

    Hello - I have a javascript function defined on Page 0 of my application. It is in the source of an unconditional
    region whose view point is after the header.

    I call successfully the function of event onchange on individual page elements. (The function
    sets the value of an element based on the value of another).

    But I also need to call the function when the page is loaded. The page is a form of data modification,
    so many values is filled when it is loaded, and I need the dependent values populated
    also.

    I tried to add the call to function in the following way. It is not at all get called (alerts are not forthcoming)
    and there is no error in the Firefox error console...
    - as an event onload in individual items
    -call directly to the edit HTML page header
    -call directly from the HTML body of the edit page (which, from what I've read, sounds
    as to execute onload and my page template doesn't have a defined substitution onload string).

    In these 2 cases, I simply call it like: jsLookupValue ($v ("P8_OBJECTTYPE_ID"), "objecttype_id", "P8_OBJECTTYPE_NAME", "objecttype_name", "hdb_objecttype");

    How can I do this?

    Thank you
    Carol

    If you define the function on the zero page and any page you should be able to call using something like:

    
    

    Have you tried to put just a statement alert() on the page in order to check that it runs just about anything?

  • I need to allow the data controllers audio multi media that I need to find out how to access services running on your computer, I need to allow for this program and also Windows media center point final

    I need to allow the data controllers audio multi media that I need to know how to get to ser

    I need services running on your computer allow this program and also Windows media center point final. OK here is the problem have no sound on my computer, it says drivers are not installed, it indicates one or more programs need to be activated. It is said window media center end point should be activated. It is said he can not activate because no driver I have download the drivers yesterday and he always says the same thing, I have problems in trying to solve this problem, but don't know how I need help ok it tells me that there is no driver for my multimedia audio controllers. I have download then and he says the same thing, he repeats to me also to activate the multimedia audio controllers, I need to know how to get to the program that has all the services of the computer, so I can allow these things that need to be activated I do not know how attend you this program thank you for your help.

    The following articles can help me.

    http://www.ehow.com/how_6533261_install-multimedia-audio-controller.html

    http://www.TomsHardware.com/Forum/57964-3-enable-multimedia-audio-controller

  • Need to call the Shell script that uses SQL loader in APex4.1 / 11g

    Hello!

    I have a requirement in which I need to call a shell script that connects to an external server, FTP to a file and then use sqlloader to load data into our table. We have now the ftp script that accomplishes this task to another program, but is a scheduled task. I wanted to call the script ftp in the APEX. Any suggestions on how this can be done, what is the logic of PL/SQL can we use? I saw online some people using DBMS Scheduler for this?

    Thank you
    Sun

    Hello

    Create some sh script on your computer host oracle where you can join in the external server and run the process.
    something like:

    run_external_sh.sh

    #!/bin/sh
    ssh ext_user@ext_host ./sqlloader/import/import.sh
    

    Then create an external TASK to call it via ORACLE (PL/SQL)

    -Shell Script call.

    BEGIN
      DBMS_SCHEDULER.create_program (
        program_name        => 'external_call_sh',
        program_type        => 'EXECUTABLE',
        program_action      => '/local_host/call_external/sh/run_external_sh.sh',
        number_of_arguments => 0,
        enabled             => TRUE,
        comments            => 'Call external SH script');
    END;
    /
    

    You can now create a regular / or unplanned WORK
    -Job defined by the calendar and an existing program.

    BEGIN
      DBMS_SCHEDULER.create_job (
        job_name      => 'jb_external_call_sh',
        program_name  => 'external_call_sh',
        schedule_name => 'external_call_scheduler', -- created scheduler
        enabled       => TRUE,
        comments      => 'Job defined by an existing external_call_sh program and schedule.');
    END;
    /
    

    You can now call the WORK in the APEX in the process of PL/SQL.

    BEGIN
      -- Run job synchronously.
      DBMS_SCHEDULER.run_job (job_name            => 'jb_external_call_sh');
    END;
    

    Concerning
    J :D

  • Call a pl/sql package unix script

    Hello

    With the help of 11.2.0.3 on AIX.

    Is it possible to call the pl/sql package unix script?

    I am cretaing a file in a directory but would like it to automatically write to a directory to archive as well.

    Could use either 2 utl_file.put_lines to 2 separate directories or 1 utl_file and cal script to archive files in another directory. ?

    Thoughts?

    Thank you

    user5716448 wrote:

    Thoughts?

    Use UTL_FILE. FCOPY copy the file you created in the directory of the archive.

    SY.

  • Call a PL/SQL Package

    Hi all

    I use ADF BC, JDev 11 G.
    I need to call a package stored to do the validation of data entered in the page layout. I would like to know how to call the AppmoduleImpl.java package no matter what an example for reference would be useful.
    Thanks in advance, help will be appreciated.

    Jyothi

    Use a method such as the following in your AppModuleImpl file.

      public Integer myMethod(String pParam1, int pParam2) {
        int returnValue = 0;
        String selectDML = "{? = call pkg_name.pkg_function(?,?)}";
    
        CallableStatement statement = getDBTransaction().createCallableStatement(selectDML, 1);
    
        try {
          statement.registerOutParameter(1, Types.INTEGER);
    
          statement.setInt(1, returnValue);
          statement.setString(2, pParam1);
          statement.setInt(3, pParam2);
          statement.execute();
    
          returnValue = statement.getInt(1);
    
          statement.close();
    
          return returnValue;
        } catch (Exception ex) {
          throw new JboException(ex);
        }
      }
    

    Above an example using a pkg with 1 output and 2 in params, customize to your needs.

    Then you can use it inside a bean managed as follows:

      private int returnValue;
    
      public int getReturnValue() {
        ApplicationModule am =
          BindingContext.getCurrent().getDefaultDataControl().getApplicationModule();
    
        AppModuleImpl appModuleImpl = (AppModuleImpl)am;
    
        returnValue = appModuleImpl.myMethod("aString", 0);
    
        return returnValue;
      }
    

    Hope that helps.
    Matthew.

  • I need to call the customer services

    I am a student and I create new account by mistake be cecause I need to get the discount of for students. I use adobe from 2014 by [email protected]. And the new account is [email protected]. So, how can I fix this to have an account with the student account



    Thank you

    Please contact the Support from Adobe by clicking on the link below.

    Contact the customer service

    Please make sure that you are connected with the right ID from Adobe.

    Hope this will help you.

    Kind regards

    Hervé Khare

  • The GC collected by the class that implements the interface

    Hi all

    All my POJO classes implements an interface that has Variables (Static final). When I try to load in Jprobe test I found that all of these classes are not collected by the Garbage collector.
    Is - what the garbage collector accumulates classes with static fields?

    Kind regards.

    Marie-Laure wrote:
    These two classes HibernateDataObject and DataObject has some static Constannts

    Completely irrelevant. The presence of a member in a class static variable does not prevent instances of this class to be GCed.

    How to find the exact place for memory leaks?

    With the help of your Profiler, then the memory usage grows, look at what class uses the most memory. Then use the Profiler to find out what is the referencing instances of this class. As a guess, I would say you have a list or map of connected users, somewhere, and you not delete the item appropriate to this list or card at the end of a user session.

  • 'DBMS_FGA identifier must be declared' when it is called from PL/SQL package...

    Hello

    I'm calling dbms_fga dynamically (of sorts) of a package, and I get the error according to the title.

    I tried as many ways as I can think this call from another package, with each time similar results.

    The user/owner of the package has rights DBA, so it doesn't seem to be a permissions issue.

    Oracle Version is 11.1.0.6.0 on Suse.

    any ideas on this person?

    See you soon

    CODE:

    Attempt 1:

    PROCEDURE enable_sql_auditing (on_off Boolean false by default) is
    v_ssql varchar2 (900);
    cursor c1 is
    Select table_name
    of all_all_tables
    where owner = gcv_pkg_owner;
    Start
    for rec loop c1
    sys.dbms_fga.add_policy (object_schema = > "| gcv_pkg_owner |",)
    object_name = > "| Rec.TABLE_NAME: ",.
    POLICY_NAME = > "| Rec.table_name | ' _AUDIT "'.
    handler_schema = > "| gcv_pkg_owner: ",.
    handler_module = > 'FGA_SQL ',.
    activate = > true);
    end loop;
    end enable_sql_auditing;


    Attempt 2:

    PROCEDURE enable_sql_auditing (on_off Boolean false by default) is
    v_ssql varchar2 (900);
    cursor c1 is
    Select table_name
    of all_all_tables
    where owner = gcv_pkg_owner;
    Start
    for rec loop c1
    v_ssql: = ' start sys.dbms_fga.add_policy (object_schema = > "' | gcv_pkg_owner |) "', object_name = >"' | Rec.TABLE_NAME | " ', policy_name = > "' | Rec.table_name: "_AUDIT", select = > true); end;';
    run immediately (v_ssql);
    end loop;

    end enable_sql_auditing;

    Frenchwood wrote:
    The user/owner of the package has rights DBA, so it doesn't seem to be a permissions issue.

    But it is.

    DBA is a role.
    in PL/SQL, the permissions must be granted directly, rather than through roles.

    for example, you need to directly grant the Execute permission on the package for the required users.

  • Need to call the stored function

    How can I call a stored function that accept the Date paramterasn return String paramtere
    I use Jdeveloper p4
    ADF BC + JSF

    User,

    You import java.util.Date - should be java.sql.Date.

    John

  • Need help with the design of a professional network and implement using Windows Server 2008.

    original title: CNS Capstone Project

    Network design and implementation. The project includes an important process of CCES in life cycle of the product as the collection of data and analysis, needs assessment, planning

    design, test strategy, documentation, etc. in fact build a network simulated by using existing equipment.

    The name of the firm co..   wide are network will connect all the sites with regional hubs. WAN will rely on a two-layer hierarchical model. locations

    LAX, DCA EGKK AND ZSPD all REGIONS will BE connect to san diego headquarters, composed of many disprate TCP/IP servers will be the only ro0uters of network protocols

    installed at each location basic WAN. Each building standardimplentaion active directory windows 2008 I re-branded, PROJECT MANAGEMENT how is that, I have a lot of project management books, but I need a Visual, I have a moment hard to read I'm more show me I learn hands on I went back to school and I am new to this can you help me graduating in March if I pass this capstone project.

    Hello

    The question you have posted is related to professional level support. Please visit the link below to find a community that will support what ask you:

    http://social.technet.Microsoft.com/forums/en-us/category/WindowsServer

  • scam or really attacked by pirates? not a phone call, the new tab opened by saying that I have to call

    a 888 number and do nothing to the computer until I've had technical assistance.  I called them and a (non-native) Indian answered the phone and told me my computer was attacked by pirates and they stole my financial information.

    the tale is that he said that Microsoft programs have a trigger when someone is hacking the computer it will send a warning to consumers and their technical support and that the only way to stop piracy was to have the computer registered with Microsoft and have the wall of fire from Microsoft and it comes free.  I asked Norton and *?  He said Norton was just for the virus and RCP is a scam.  He said that he could not stop hackers and intended to correct the problem, to speak with legal to check what would be the cost!

    $199.99 to install the fire wall to the service of life.

    I feel like I've been diverted, victim of a scam and pirate!  Microsoft please indicate whether this is legitimate?

    Yes, you have been scammed.

    Contact your banking company or credit card immediately to reverse the charges. Also file a report with your local Police Department.

  • BlackBerry 5.0 Smartphones software needs to be the wireless phone? What does that mean?

    Hello - I just downloaded the software update for Desktop Manager, and he tells me that my phone should now be on a wireless network to make calls etc., but doesn't tell me what that means or how it might perform performance, etc.. Anyone know where I can find more information? Thank you!

    Kitamonster wrote:

    Looking at the screen of my phone, it is now an icon at the top right that was not there before - it looks like a visor of rifle with three waves that emanate from him, which I guess tells me that I am now connected to a wireless network.

    No, this icon indicates that you have GPS enabled on the device.

    Kitamonster wrote:

    1. I travel across the country for my work, often in fairly remote areas. I expect a service better or worse with the wireless? Or exist more as a backup copy to mobile network?

    2 - is somehow going to cost me more (for example using minutes instead of 'speak' minutes 'data')?

    1. wireless network = Mobile telephony network. Same thing, different terminology.

    You will have the same connections as before.

    2. the data is given, Talk Talk. They are not the same. When you make a call, it's minutes of conversation.

    When you use SMS text messaging, it's TEXT.

    When you use the internet browser, BBMessenger, mapping, etc., it is given to you.

  • I disabled my iMac and need go to the MacBook Pro, but MacBook says that I still need to turn off a computer.

    Out of the city and the need to move to my MacBook. On my iMac, I went to rack of settings / preferences / account / log out. Then when I try to connect on the TI MacBook says I have reached my limits and must log on another device. I have tried several times over the past two days and get the same error. How to achieve this?

    Remove the license on a computer http://forums.adobe.com/thread/1442423?tstart=0 can help

    -http://helpx.adobe.com/x-productkb/policy-pricing/error-maxium-acitvation-exceeded.html

Maybe you are looking for

  • Backup Watch issue

    I unpaired my 38 m Apple Watch sport when he was to be sent service. Now that I have my replacement watch, it does not show a backup for the last 8 months. I thought that my watch made a return to the top when the coupling and with my nightly backup?

  • Remarks on the EPUB files, do not sync via iCloud in iOS9.3

    I'm 9.3.1 on an iPad IOS 4 and iPhone 6; OS x 10.11.4 on a Macbook of retina of 2015. Can I synchronize EPUB books between devices in iBooks via iCloud, but notes are not synchronized (from the iPad with other devices). I use an Apple for the App Sto

  • NB500 - slow performance - how to make it faster?

    Laptop NB 500 slow response.You have a tool to improve performance? At least if the adapter is connected.

  • HP Pavilion 500-214: upgrade HP Pavilion 500-214 Office for games

    Hello Thanks for the reading/helping first. So, I want to upgrade my home pc to do some games. Games I want to play are the parameters of quality, World of Tanks with stuff on HD and Skyrim high/Ultra Total War Attila. In General, I want to run these

  • Left column disappeared from my Outlook Express e-mail page.

    Can anyone help me to restore the left column which has disappeared from my outlook express email page.  It contains: Outlook ExpressLocal foldersInboxOutboxSent itemsDeleted itemsAir currentsNorton Anti Spam folder