APEX Application Process Automation

In my app, I have to keep track of people who are going on vacation and when they are coming back to work; In my employee table, there is a column named status that shows whether they are on "Vacation" and when they are "On-Duty". Based on the status column, these employees will be listed on one of two report pages - Employees - On-Duty and Employees - On Vacation
There are two tables which are being used.
1. Emps
2. Leave
In the Leave table there is a start_date, end_date and Leave_type that is associated with a employee record in the employee table. The Leave_type column shows what type of leave that particular person will be going on in the next month.
My goal is to create an automated process that changes that "status" column for the employee in the employee table, when the start_date in the leave table ='s the current date.
Can someone make a suggestion on how I can automate this process and point me in the right direction as to how to code this?
My First issue with the req is that I am not sure what feature I should use to reach my goal.
Should I use an Application Process, Application Computation, or an OnLoad Page event.
My second issue that as I am familiar with SQL, but I am not too savvy, yet, with PL/SQL. I am not sure how to write the PL/SQL code to faciliate this need. Below, is a pseudo-code that I have outlined.
1. Open cursor for all employees who are in On-Duty status.
2. Within that cursor, find the last leave_table row entered in the db for each employee.
3. If start_date is = to current_date, update employee status column to = leave_type column in the leave_table.
Any help would be greatly appreciated.
{PR}
Message was edited by:
pruiz1

It will be very difficult for me to change the status column in the reports. Reason being, I have about 7 categories for employees/prospects that are being used in the emp table.
1. On-Duty
2. R&R
3. Adminstrative leave
4. Standby - waiting to be hired on contract
5. Disqualified and
6. Terminated
7. Resigned
If there were only two statuses On-duty and R&R(vacation), i would have no problem doing so. Also, i have had some issues modifying views in APEX, which I never sorted out.
For 3-5, I cannot think a scheme to use so that I can move the status column from the emp table to the leave table.
For 6-7, I have a work_history table that is joined to the employees who are in this status. Once a person is terminated or has resigned, the work_history table is updated manually by the field.
{PR}
Message was edited by:
pruiz1

Similar Messages

  • Is there a problem with APEX Application Processes and VPD?

    I have a table that has a policy function. When I select from the table straight from the page it seems to be only returning the appropriate rows for the user.
    But, when I select from the same table using an application process (On-Demand), PL/SQL Block.
    BEGIN
    OWA_UTIL.mime_header ('text/xml', FALSE);
    HTP.p ('Cache-Control: no-cache');
    HTP.p ('Pragma: no-cache');
    OWA_UTIL.http_header_close;
    HTP.prn ('<select>');
    FOR c IN (SELECT '1' o,
    name || ' (' || school || ')' d,
    pk_id r
    FROM sch_base
    WHERE pk_id = nvl(:REFRESH_LOV_PK_ID,'null')
    UNION
    SELECT '2' o,
    '%' d,
    '%null%' r
    FROM dual
    UNION
    SELECT '3' o,
    name || ' (' || school || ')' d,
    pk_id r
    FROM sch_base
    WHERE pk_id <> nvl(:REFRESH_LOV_PK_ID,'null')
    ORDER BY 1,2)
    LOOP
    HTP.prn ('<option value="' || c.r || '">' ||
    c.d || '</option>');
    END LOOP;
    HTP.prn ('</select>');
    END;
    It returns all rows in the table.

    This is the policy on my table:
    begin
    dbms_rls.add_policy(
    object_schema => 'SIS_EXPRESS',
    object_name => 'SCH_BASE',
    policy_name => 'SCH_BASE Policy',
    function_schema => 'SIS_EXPRESS',
    policy_function => 'VPD_SCH_BASE',
    statement_types => 'select');
    end;
    I have a function VPD_SCH_BASE which set the where condition for the SCH_BASE table.
    It works for a simple list values select, but not when this Application Process is run.
    BEGIN
    OWA_UTIL.mime_header ('text/xml', FALSE);
    HTP.p ('Cache-Control: no-cache');
    HTP.p ('Pragma: no-cache');
    OWA_UTIL.http_header_close;
    HTP.prn ('<select>');
    FOR c IN (SELECT '1' o,
    name || ' (' || school || ')' d,
    pk_id r
    FROM sch_base
    WHERE pk_id = nvl(:REFRESH_LOV_PK_ID,'null')
    UNION
    SELECT '2' o,
    '%' d,
    '%null%' r
    FROM dual
    UNION
    SELECT '3' o,
    name || ' (' || school || ')' d,
    pk_id r
    FROM sch_base
    WHERE pk_id <> nvl(:REFRESH_LOV_PK_ID,'null')
    ORDER BY 1,2)
    LOOP
    HTP.prn ('<option value="' || c.r || '">' ||
    c.d || '</option>');
    END LOOP;
    HTP.prn ('</select>');
    END;

  • Obtaining custom HTTP GET / POST parameters of variable length in Application Process

    Hi, I'm trying to connect a javascript UI control within my page to an APEX Application Process.
    The control calls the application process via AJAX and appends a variable number of GET / POST parameters to its URL.
    What is the best way to obtain these parameters from within the PLSQL procedure of the process? Or is there a better way to connect my javascript AJAX control to the Database behind my APEX app?
    Thanks,
    Steffi

    Steffi,
    I'm using APEX 4.1 and I've not used Treegrid before. It does look pretty interesting.
    Firstly, I'm not sure if you are aware but GET requests aren't as secure as POST requests. GET simply appends a key/value pair to the server as part of the url which can be easily sniffed. POST request on the other hand sends the data as key/value pairs to the server in the header which makes it harder to intercept.  This is why APEX outputs forms with POST methods.
    Secondly, back to your original question.I'm not sure this is possible with an Application Process. In the passed I've used POST methods to pass values to my Application Process. I have some code using native jQuery if you would like to see how its done. Alternatively, if you convert your application process to a standard pl/sql procedure (i.e SQL Workshop>Object Browser>Procedures) you can call this procedure and pass in values as you would with any PHP page.
    Simple example (untested)
    CREATE OR REPLACE PROCEDURE  "foo" ( my_name varchar(20)  
         , count NUMBER)
    IS  
         p_name varchar(20) := my_name;
         p_count NUMBER     := count;
    BEGIN
    --Do what you want
    --output something
       htp.p(p_count || '.: '|| p_name);
    END;
    The url on the page (or ajax call) would be something like "/pls/apex/{MY SCHEMA}.foo?my_name=Alistair&count=1"
    Of course for text you will need to escape single colons and special characters etc.
    I would really like to help you further so if you could create a working demo using a free workspace on http://www.apex.oracle.com and provide me with demo username/password. I can try and have a better look for you.
    In all honesty, I'm sure you would be looking to create this as a plugin so that you can easily reuse it in various parts of your application and can easily update it or maintain it. I can help you with that as well if you want.
    Alistair
    P.S You might want to update your profile on this forum to provide your name so people dont just see "31742965-2d09-4f42-849f-e39eb2cfbc9e" your profile name

  • Does APEX re-write output HTML from an application process

    I have a process which has the following line
    htp.prn('<input type="hidden" name="F05" value="' || l_submitted_previously || '"/>');this however is outputting the following html
    <input name="F05" value="N" type="hidden">as you can see the parameters in the tag are not in the order I specified and also the closing slash is omitted.
    Can anyone explain this?

    APEX 3.2.1.00.12
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    Unfortunately I doh't know the web server architecture
    Firefox v13
    Custom theme
    Custom templates
    Hidden item
    I don't think the last 4 items listed above will have a bearing on this because it's a dynamically produced item created by an application process. I have pasted the entire code for the process in case that helps.
    DECLARE
         l_year_passed number := wwv_flow.g_x01;
         l_expenditure_value number;
         l_submitted_previously varchar2(1) := 'N';
    BEGIN
         SELECT DECODE(COUNT(*),0,'N','Y')
         INTO l_submitted_previously
         FROM F_EXPENDITURE
         WHERE FINANCIAL_YEAR_KEY = l_year_passed;
        for rec in (SELECT *
                    FROM l_service_group
                    WHERE service_designated_year<=l_year_passed
                    AND service_designated_year>0
                    order by NON_SERVICE_GROUP_FLAG, SERVICE_GROUP_SHORT_NAME)
         loop
         BEGIN
              SELECT EXPENDITURE_VALUE
              INTO l_expenditure_value
              FROM F_EXPENDITURE
              WHERE FINANCIAL_YEAR_KEY = l_year_passed
              AND SERVICE_GROUP_KEY = rec.SERVICE_GROUP_KEY;
              EXCEPTION
              WHEN NO_DATA_FOUND THEN
              l_expenditure_value := NULL;
         END;
              htp.prn('<tr><td><label for="F01_' || rec.SERVICE_GROUP_KEY || '"><span class="t13RequiredLabel"><img src="/i/requiredicon_status2.gif" alt="">' || rec.SERVICE_GROUP_SHORT_NAME || '</span></label></td><td><input type="text" name="F01" id="F01_' || rec.SERVICE_GROUP_KEY || '" value="'||l_expenditure_value||'"/><input type="hidden" name="F02" id="F02_' || rec.SERVICE_GROUP_KEY || '" value="' || rec.SERVICE_GROUP_KEY || '"/></td></tr>');
         end loop;
         if l_year_passed = 0 then
              htp.p('<p>Please select a financial year</p>');
         end if;
         htp.prn('<input type="hidden" name="F05" value="' || l_submitted_previously || '"/>');
    END;

  • If-statement in application-process

    Hi,
    First I will tell you which APEX I am using: 3.0.1
    Ok, I have got a form where there are 4 fields:
    P13_ACCTNO (Popup LOV (fetches first rowset)),
    P13_LOCATION_NAME(Text Field (Disabled, saves state)),
    P13_COMP_ACCTNO( Popup LOV (fetches first rowset)),
    P13_LOCATION(Text Field (Disabled, saves state))
    In my table, the company is always filled in, no null values (but it is not the PK, this is the acctno). But location may be null.
    When I select a location (popup will only show fields which are filled in), then the other fields are filled in as well. So the Location (number) and the acctno is the same.
    Now, when I select a comp_acctno, the rest of the fields are filled in automatically. But the Location (number) will remain from the first select, although no location might be there.
    So I have got 2 javascript codes on the page and 2 applicationprocesses and 1 application item.
    I would like to have an if-statement in my application-process (instead of " HTP.prn ('<item id="P13_LOCATION">' || v_null || '</item>');", something like:
    if :p13_location_name is null then
    :p13_location = ' ';
    end if;
    But I don't know how to put this into the following code, because it is a mixture, which I don't understand completely.
    DECLARE
    v_acctno primemines.acctno%type;
    v_company primemines.company%type;
    v_mineloc primemines.mineloc%type;
    v_commodity primemines.commodity1%type;
    v_null varchar2(5);
    CURSOR cur_c
    IS
    SELECT acctno, mineloc, company, commodity1
    FROM primemines
    WHERE acctno = TO_NUMBER (:temporary_application_item);
    BEGIN
    FOR c IN cur_c
    LOOP
    v_acctno := c.acctno;
    v_company := c.company;
    v_mineloc := c.mineloc;
    v_commodity :=c.commodity1;
    END LOOP;
    v_null := '';
    OWA_UTIL.mime_header ('text/xml', FALSE);
    HTP.p ('Cache-Control: no-cache');
    HTP.p ('Pragma: no-cache');
    OWA_UTIL.http_header_close;
    HTP.prn ('<body>');
    HTP.prn ('<desc>this xml genericly sets multiple items</desc>');
    HTP.prn ('<item id="P13_ACCTNO">' || v_company || '</item>');
    HTP.prn ('<item id="P13_LOCATION_NAME">' || v_MINELOC || '</item>');
    HTP.prn ('<item id="P13_COMMODITY">' || v_commodity || '</item>');
    HTP.prn ('<item id="P13_LOCATION">' || v_null || '</item>');
    HTP.prn ('</body>');
    and also I have discovered that the automatically filling of the fields is only working sometimes (i don't know whether it depends on the company I select). Any ideas, why this is happening?
    could somebody help me with the code please?
    Thanks,
    regards,
    Denise

    Hi,
    @Chad: thanks for the code, I think it works (UPDATE: no, it does not work :-( )
    now i am just left with the other problem that it works only sometimes
    @user512746: yes, i guess you have understood correctly. I have changed the items P13_ACCTNO source used to "always replace" and taken out the default value, which I had set to &P13_ACCTNO.
    But it still only works partly, I don't know why?
    any other ideas?
    Thanks so much for your help so far, both of you.
    Regards,
    Denise

  • How to execute a statement in application process on new authentication

    Hi all,
    How can i execute a statement such as
    set role TABLE_NAME identified by sunil;
    in my application process?
    I have tried exec('set role TABLE_NAME identified by sunil');, but wasn't successful. Does anybody knows the problem in my syntax?
    Thanks,
    Sunil Bhatia
    Edited by: Sunil Bhatia on Jun 25, 2009 12:33 PM

    Can you proceed me to this direction?No, it's still the wrong one.
    DB roles are not used in APEX due to fundamentals of APEX and Oracle architecture: this is clear when it is understood Re: Priveleges to create procedures/functions in schemas (points 3 &amp; 4 being most relevant to this issue &ndash; and read "APEX" for "HTML DB")
    (If anyone knows of a more "official"/complete description of what goes on under the covers than the referenced Forum post it would be helpful to know about it.)

  • Application process code is not getting the value

    Hi
    I have implemented search functionality on page 0 (One Textbox and one ImageButton).
    on clicking on image button
    I am calling a application process to redirect a page on the basis of entered value.
    I am using following code in application process:
    DECLARE
    l_number NUMBER;
    rec_count NUMBER;
    BEGIN
    l_number := TO_NUMBER(:P0_SEARCH);
    SELECT COUNT(*) INTO rec_count FROM CASE_DATA WHERE CASE_NUMBER = l_number;
    if rec_count >= 1 then
    OWA_UTIL.REDIRECT_URL('f?p=&APP_ID.:42:&SESSION.::&DEBUG.::P42_CASE_NUMBER:l_number');
    End if;
    exception
    when others then
    NULL;
    END;
    :P0_SEARCH is the name of search textbox that is on page 0.
    when i clicking on image button then this value of l_number is not passed to the
    OWA_UTIL.REDIRECT_URL('f?p=&APP_ID.:42:&SESSION.::&DEBUG.::P42_CASE_NUMBER:l_number');
    its giving an error
    ORA-01722: invalid number
    and in url its showing
    http://apex.oracle.com/pls/otn/f?p=31774:42:16398188927210884::NO::P42_CASE_NUMBER:l_number
    but its working if i am putting the static value as
    OWA_UTIL.REDIRECT_URL('f?p=&APP_ID.:42:&SESSION.::&DEBUG.::P42_CASE_NUMBER:22');
    its redirecting the right page as
    http://apex.oracle.com/pls/otn/f?p=31774:42:16398188927210884::NO::P42_CASE_NUMBER:l4
    So, please help me how to pass the value to redirect.
    Thanks
    -PM

    Hi,
    Try
    OWA_UTIL.REDIRECT_URL('f?p=&APP_ID.:42:&SESSION.::&DEBUG.::P42_CASE_NUMBER:' || l_number);Br,Jari

  • Import of Apex Application to another instance takes a long time

    Hi,
    I have developed an apex application which is of size -24 MB .While importing the appl to another instance it takes a long time (few hours). The imported appl is working fine so far.
    What should be the ideal time for the import of this size appl ?
    Is it the usual due to the size of the app or some thing is wrong with the app ?
    Any one can please throw some light on this, as I am unable to figure out if it the appl issue or the DB issue.
    Thanks in advance!

    The application is getting imported and running, so you do not really have a problem in hand.
    24M is big, but not all that big to run for hours.
    The time taken depends on the resources available on the server where you are trying to import. If the load on that server is high then the resources will be shared between all the processes run on it, and the import process will run longer.
    Monitor disk and CPU usage, it will provide you some clues. Try importing at offpeak time and it should run faster if there is a server resource issue.
    Regards,

  • APEX application deployment

    Hi All,
    I will soon be exporting my first APEX application from a development database to a test database. I do not want to export the data which the application is built on as the development database contains sample data instead of the "real" data. Before exporting my application, I will of course install APEX 3.2.1 in the test environment and then import the "real" data into the test database so that once the application has been exported and installed in the new environment, the APEX application will already have its data in place.
    On page 14-12 in Chapter 14 of the Oracle Application Express Application Builder User's Guide, I saw the following section:
    Exporting an Application
    When you export an application, Oracle Application Express generates a text file containing PL/SQL API calls.
    To export an application:
    1. Navigate to the Export page:
    a. On the Workspace home page, click the Application Builder icon.
    b. Select an application.
    c. On the Application home page, click Export/Import.
    d. On the Export/Import page, click Export and then click Next.
    2. From Application, select the application to be exported.
    3. From File Format, select how rows in the export file will be formatted:
    ■ Choose UNIX to have the resulting file contain rows delimited by line feeds.
    ■ Choose DOS to have the resulting file contain rows delimited by carriage
    returns and line feeds.
    4. From Owner Override, optionally select another owner. By default, the application is owned by the owner identified in the application attribute owner.
    5. From Build Status Override, select one of the following:
    ■ Run Application Only - Developers can only run an application
    ■ Run and Build Application - Developers can both run and edit an application
    Selecting Run Application Only is an effective way to protect an application from modifications from other developers.
    6. From Debugging, select one of the following:
    ■ Yes exports the application with debugging enabled.
    ■ No exports the application with debugging disabled.
    7. From Exporting Supporting Object Definitions, specify whether to export
    supporting object definitions with your application.
    8. From Export Comments, specify whether to export comments for this application.
    See "Adding Developer Comments" on page 6-22.
    9. Use the As of field to export your application as it was previously defined. Specify the number of minutes in the field provided.
    10. Click Export Application
    Since I do not have any images, themes, static files, workspace users, cascading style sheets, etc, to export, it makes no sense to use the “Packaged Application” method to perform the export. All I need is the application definition that contains all my interactive reports, forms, etc.
    The next step would then be to Import the application into the target Oracle Application Express instance and install the application.
    This method should be OK for my needs, right?
    Thanks

    By simply doing an application export, all you will export is the metadata associated with your application (page definitions, items, processes, validations etc).
    No "Customer Data" will be exported neither will any tables or PL/SQL packages that are owned by your parsing schema.
    If you aim is simply to export the APEX application and no tables, pl/sql units, data etc, then doing a simple application export should be good enough. Thats all we ever do and then add the PL/SQL units / table data on top as additional scripts.
    Hope that helps
    Duncs
    http://djmein.blogspot.com
    As a courtesy, please remember to mark helpful or correct responses accordingly :)

  • APEX Application behaviour in a RAC setup

    Hi
    Caveat first: I'm pretty new to Oracle RAC and just looking into it as an option. We have an APEX application currently running in Oracle 11gR2 single node currently and are considering HA for this.
    My question is: What would be the expected behaviour seen by a User of an APEX application, in the event of a node failure, when running with an OHS / RAC configuration? Will they get "transparent fail-over" and see nothing or will they see an error?
    I appreciate I could post in the APEX forum, but feel that is probably more of a development forum and possibly someone here has had to look at things at this level.
    I have read what I think may be the definitive reference for this:
    http://www.oracle.com/technetwork/developer-tools/apex/learnmore/apex-rac-wp-133532.pdf
    but while it covers most of what I want I don't believe I have found an answer to my question
    This states:
    "The Transparent Application Failover (TAF) feature of Oracle Net Services is a runtime failover for high-availability environments. It enables client applications to automatically reconnect to the database if the connection fails and, optionally, resume a SELECT statement that was in progress. The reconnection happens automatically from within the Oracle Call Interface (OCI) library. For applications that do insert, update or delete transactions, the application must trap the error when the failure occurs, rollback the transaction, and then resubmit. If the application is not written to be TAF aware, the session will get disconnected."
    However (as I understand it) APEX runs in the database and would fail with the database, it isn't a typical "client application" connecting to Oracle via a TAF aware connection pool - it is essentially a large pl/sql package and TAF only covers SELECT statements not packages.
    May be I'm over-reading this and it's simpler than that: APEX/Mod_plsql might just handle it?
    - APEX User/HTTP session state is stored in database APEX: Understanding session state which is available on other nodes
    - Mod_plsql in OHS can detect the error returning and reissues the request to good server and APEX on that instance can retrieve Users/HTTP state and process the request (APEX/RAC doc states mod_plsql can see an error from database and cleanup connection up and form a new connection, but not that it will retry the request for the client into other APEX/DB node).
    I'm really just after a (transparent/non-transparent) statement based on experience, but an outline of how the components behave would be useful.
    Thanks in advance
    Dave

    Hi
    Any chance of getting that link outside of Metalink? - I'm trying to get our customer support id, but no luck at present.
    I'm aware that APEX can run with RAC (as per the link I posted) - I'm really after next level info around behaviour in that environment.
    Thanks
    Dave

  • On Demand Application Process not working on IPad or IPhone

    I have application processes that use AJAX to refresh my select list values (see code below). They all work fine on normal devices, but they do not populate at all if I try from an IPad or IPhone. Any ideas?
    HTML Form Element Attributes:
    onactivate="get_select_list_xml1(this,$x('P507_FORMS'),$x('P0_LOGIN_SCHOOL_YEAR'),this,'REFRESH_REPORT_LAYOUT_LOV');" onfocus="if((typeof this.onactivate)!='function'){get_select_list_xml1(this,$x('P507_FORMS'),$x('P0_LOGIN_SCHOOL_YEAR'),this,'REFRESH_REPORT_LAYOUT_LOV');}"
    Application process:
    BEGIN
    OWA_UTIL.mime_header ('text/xml', FALSE);
    HTP.p ('Cache-Control: no-cache');
    HTP.p ('Pragma: no-cache');
    OWA_UTIL.http_header_close;
    HTP.prn ('<select>');
    FOR c IN (SELECT '2' o, A.report_layout_desc d, A.report_layout r
    FROM form B, report_layout A
    WHERE A.fk_form = B.pk_id and
    B.form = :REFRESH_LOV_PK_ID
    ORDER by 1,2)
    LOOP
    HTP.prn ('<option value="' || c.r || '">' ||
    c.d || '</option>');
    END LOOP;
    HTP.prn ('</select>');
    END;

    bobmagan wrote:
    It fires on both onactivate and onfocus. I had to do that to work on the Mac clients. Look at the code:
    onactivate="get_select_list_xml1(this,$x('P507_FORMS'),$x('P0_LOGIN_SCHOOL_YEAR'),this,'REFRESH_REPORT_LAYOUT_LOV');" onfocus="if((typeof this.onactivate)!='function'){get_select_list_xml1(this,$x('P507_FORMS'),$x('P0_LOGIN_SCHOOL_YEAR'),this,'REFRESH_REPORT_LAYOUT_LOV');}"What about just
    onfocus="get_select_list_xml1(this, $x('P507_FORMS'), $x'P0_LOGIN_SCHOOL_YEAR'), this, 'REFRESH_REPORT_LAYOUT_LOV');"If not, supply the following information:
    <li>Full APEX version
    <li>Full DB version and edition
    <li>Web server architecture (EPG, OHS or APEX listener)
    <li>Browser(s)/version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/Item type(s)
    and the <tt>get_select_list_xml1</tt> JS code.
    Post code wrapped in tags<tt>\...\</tt> tags to preserve formatting and special characters.

  • Integrate an Apex Application with the E-Business Suite 11i

    Hi !
    I'm currently working to get connected to APEX (Application Express 3.2.1.00.11) using an E-Business Suite 11i form function then using the ICX cookie.
    I'm using a document created by Rod West(consultant at Cabot Consulting) to help me doing this connection.
    The document is : http://www.oracle.com/technology/products/database/application_express/pdf/apex_ebs_wp_cabot_consulting.pdf
    I always have errors when I try to get connected using the method suggested in the document.
    The error I have received is :
    ORA-00942: table or view does not exist ORA-00942: table or view does not exist ORA-06512: at "APPS.ICX_SEC", line 2388 ORA-06510: PL/SQL: unhandled user-defined exception
    This error seems to come from wfa_sec.getsession(:P101_USERNAME) used in the Before Header process of the login page(Page101).
    See code here (Figure 10 in the document) :
    BEGIN
    wfa_sec.getsession(:P101_USERNAME);
    :P101_PASSWORD :=
    XXAPX_SECURITY_PKG.generate_hash
    (FND_GLOBAL.user_name);
    IF :P101_PASSWORD IS NOT NULL THEN
    APEX_CUSTOM_AUTH.login(
    P_UNAME => :P101_USERNAME,
    P_PASSWORD => :P101_PASSWORD,
    P_SESSION_ID => v('APP_SESSION'),
    P_APP_PAGE => :APP_ID||':1'
    END IF;
    EXCEPTION WHEN OTHERS THEN NULL;
    END;
    I have done a "GRANT EXECUTE ON apps.WFA_SEC" to my APEX Schema, so the APEX Schema should have access to everything used by the package... I have tried to "GRANT EXECUTE ON" ICX_SESSIONS but I still have the same error...
    Do I need to do other "GRANT" ? Have you experienced the same problem ?
    Thanks for your help !

    Hi !
    Yes, I have already created synonyms but I still got the same errors...the error seems to be related to a table used in the package icx_sec...I have tried to grant and create synonym for tables icx_transactions and icx_sessions but I still got the error. Any ideas ?
    I have also tried to use the method (OWA_COOKIE.send) suggested in the 2007 version of the Rod West's document (the method you mentionned in the thread) and I'm able to get connected to my APEX application using the E-Business Menu but I have an intermittent problem with this method.. In fact, some days I'm able to get connected to APEX at the first try but some days I received "Invalid Login Credentials" at the first try and at the second try I get connected...And we haven't found any reasons yet for the intermittent "Invalid Login Credentials" ?
    Have you experienced the same intermittent problem on your side ?
    Thanks !

  • Error when calling a procedure from my apex application

    Hello.
    I want to create a small APEX application that can configure asynchronous change data capture (distributed hotlog) on certain tables.
    Basically, what the application should do is to simply create change tables. Everything else is set up as prerequisite.
    My problem is that when I run the following script from schema apex_cdd (using sqldeveloper) , it works; but if I run it from my apex application by calling it when pressing a button as a pl/sql process, it doen't work.
    BEGIN
    apex_cdc.enable_table_capture
         (     i_owner => 'staging_cdcpub',
              i_change_table_name     => 'g_changeTable',
              i_change_set_name     => 'Source_changeSet',
              i_change_source          => 'orcl01_cs',
              i_source_schema          => 'My_src',
              i_source_table          => 'G',
              i_column_type_list     => 'STARTDATE DATE,STATUS CHAR(1),NAME VARCHAR2(10),ENDDATE DATE,DESCRIPTION VARCHAR2(255),ID NUMBER(8,0),VALUE NUMBER(10,2)'
    END;
    If I look in the trace file, i see that the error is:
    CDCdebug:in ChangeTable.java enableDisabledTriggers: ORA-06550: line 1, column 8:
    PLS-00201: identifier 'SYS.DBMS_CDC_SYS_IPUBLISH' must be declared
    ORA-06550: line 1, column 8:
    PL/SQL: Statement ignored
    oracle.jdbc.driver.OracleSQLException: ORA-06550: line 1, column 8:
    PLS-00201: identifier 'SYS.DBMS_CDC_SYS_IPUBLISH' must be declared
    ORA-06550: line 1, column 8:
    PL/SQL: Statement ignored
    Other remarks:
    - My procedure calls: sys.DBMS_CDC_PUBLISH.CREATE_CHANGE_TABLE.
    - I gave the same rights that I gave for apex_cdc schema to flows_030200 and APEX_PUBLIC_USER schemas (just to see if it works), but it doens't.
    Is APEX calling the procedure from another schema ?
    Does anyone has an idea why this procedure crashes if called from APEX application, but works ok if called from the same schema APEX application runs on, but using SQLDeveloper ?
    Any thoughts are appreciated.
    Radian

    The procedure apex_cdc.enable_table_capture i created myself with no authid mentioned explicitly, so it uses definer rights, by default.
    BUt this procedure is simply a wrapper for sys.dbms_cdc_publish.create_change_table.
    When I look on the security model for this sys.dbms_cdc_publish, i see it runs under invoker rights. (http://www.psoug.org/reference/dbms_cdc_publish.html).
    The code is like this:
    CREATE OR REPLACE PROCEDURE enable_table_capture
              i_owner               IN VARCHAR2,
              i_change_table_name     IN VARCHAR2,
              i_change_set_name     IN VARCHAR2,
              i_change_source          IN VARCHAR2,
              i_source_schema          IN VARCHAR2,
              i_source_table          IN VARCHAR2,
              i_column_type_list     IN VARCHAR2
         IS
         BEGIN
              EXECUTE IMMEDIATE 'alter session set REMOTE_DEPENDENCIES_MODE=SIGNATURE';
              EXECUTE IMMEDIATE 'begin add_log@orcl01(i_tableName => ''G''); end;';
    sys.DBMS_CDC_PUBLISH.CREATE_CHANGE_TABLE(
    owner => i_owner,
    change_table_name => i_change_table_name,
    change_set_name => i_change_set_name,
    source_schema => i_source_schema,
    source_table => i_source_table,
    column_type_list => i_column_type_list,
    capture_values => 'both',
    rs_id => 'y',
    row_id => 'n',
    user_id => 'n',
    timestamp => 'y',
    object_id => 'n',
    source_colmap => 'n',
    target_colmap => 'y',
    options_string => NULL);
    END enable_table_capture;

  • Invoking a webservice as an "application process"

    Hello there,
    I have setup a web service successfully and I can invoke it as a "Page Process", get the response in a collection , and do a few validation based on it.
    However, I will need this validation for most of my pages in the application, so I thought, I would rather run it against the application as a whole.
    The issue came when I try to invoke the web service as an "Application Process" rather than a page process. Unfortunately APEX does not seems to give an option to invoke a web service on application level as it does for page level.
    For Application Process, apparently I can only run a PL/SQL block, which is fine; if I know how to make a call to the web service and fill the collection from a PL/SQL Block.
    My application does not have a particular page as "home entry"; users basically will be accessing different pages as entry points. I really don't like to invoke WS calls on each of the page to get the collection filled, so my validation could run - I mean I will have only this option unless this tread yield me with an alternative :)-
    I am sure someone must have gone through similar situation, and hopefully could provide a solution or workaround for me.
    Thanks a lot in advance
    Regards
    Ligon Gopinathan

    Ligon:
    Yes, using NTLM authentication does complicate things a bit. However, I think it may be possible to to achieve the goal of pushing all users to a fixed landing page upon successful session establishment by the NTLM page-sentry function and from thereon to the page the user requested. This landing page will have 2 'before header' processes , one that will call the Web Service and the another that will simply re-direct the user to the page that was initially requested.
    In the page-sentry function you can modify the call to 'wwv_flow_custom_auth_std.post_login' such that the parameter
    p_flow_page is set to 'apex_application.g_flow_id ||':'<landing-page-id>'
    You will also need to save off the actual page requested( the value of apex_application.g_flow_step_id) into an application_item which you can then reference in the pre-header process of the landing-page.
    I must caution you that I have not tested whether this approach will work but decided to throw this out here anyhow :)
    Check http://www.oracle-base.com/articles/10g/utl_dbws10g.php out for a how-to for calling out to Web Services using PL/SQL .
    Varad

  • Use APEX_APPLICATION in an application process called by a javascript

    I have a page that is split into two; Top portion is a form, and the bottom part is a tabular form of a collection. Currently, if I enter information into the form and the collection and then submit the collection (to save the data to the collection) it erases the information in the form (since submitting for the form is separate). The same thing happens when I attempt to delete certain rows from the collection.
    My solution to this problem was to use javascript to call an application process (that way the page isn't completely refreshed, only the collection portion). However, I can't seem to get the apex package APEX_APPLICATION to work correctly as an application process (works fine as a process on submit as a page process).
    Below is the way I use apex_application for saving:
    begin
    for x in 1..apex_application.g_f03.COUNT
    loop
    apex_collection.update_member_attribute (p_collection_name=> 'SPECIES_COLLECTION',
    p_seq => apex_application.g_f03(x),
    p_attr_number => 8,
    p_attr_value => apex_application.g_f08(x));
    apex_collection.update_member_attribute (p_collection_name=> 'SPECIES_COLLECTION',
    p_seq => apex_application.g_f03(x),
    p_attr_number => 9,
    p_attr_value => apex_application.g_f09(x));
    apex_collection.update_member_attribute (p_collection_name=> 'SPECIES_COLLECTION',
    p_seq => apex_application.g_f03(x),
    p_attr_number => 10,
    p_attr_value => apex_application.g_f10(x));
    apex_collection.update_member_attribute (p_collection_name=> 'SPECIES_COLLECTION',
    p_seq => apex_application.g_f03(x),
    p_attr_number => 11,
    p_attr_value => apex_application.g_f11(x));
    apex_collection.update_member_attribute (p_collection_name=> 'SPECIES_COLLECTION',
    p_seq => apex_application.g_f03(x),
    p_attr_number => 12,
    p_attr_value => apex_application.g_f12(x));
    end loop;
    end;
    Below is the code I use for deleting certain elements from the collection:
    BEGIN
    FOR ii IN 1 .. apex_application.g_f01.COUNT -- checkbox
    LOOP
    apex_collection.delete_member (p_collection_name => 'SPECIES_COLLECTION',
    p_seq => apex_application.g_f01(ii)
    END LOOP;
    APEX_COLLECTION.RESEQUENCE_COLLECTION('SPECIES_COLLECTION');
    END;
    Below is the javascript I attempted to use for application process for submitting:
    function addToCollection()
    var get =
    new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=submitLandings',0);
    gReturn = get.get();
    get = null;
    }

    Your requirement is quite similar to what I have here:
    http://apex.oracle.com/pls/otn/f?p=31517:159
    Using apex_application.g_fxx will not work in the way you originaly planed to do that since an application process can't see it.
    What you can do is to use an application process to update the collection at the moment you enter your data. Apply for an account (see login page of my demo application) and you may see how I solved it in my example.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

Maybe you are looking for

  • Self-Assigned IP error and no Internet thru cable, but fine via Airport crd

    I am having a vert weird problem. Airport base station hooked to a LAN router, new Mac Pro (10.5.1) hooked via cable to Airport base station. I get the self-assigned IP address and no internet. This happens also if I hook Mac Pro directly to router v

  • Goods movement document not updating

    Hi Gurus, I have created the order with component and external services did the goods issues and service acceptance but while checking in Menu bar of order>Extras>Document for order---->Goods movements no movement document is updared.Pls guide  me wh

  • Error: native library oljdbc40.dll already loaded in another classloader

    Hi, we're using Oracle 8iLite in combination with Tomcat (on WinNT4.0) to run servlets accessing our OLite db. We use a deployed db (Deployment tool: PolUtil.exe) and pure JDBC connections. When starting tomcat, the servlet is automatically initializ

  • Why won't xm radio play on my computer?

    site loads fine and then when i get to the part where it is supposed to play music, it will not load or buffer like it did previously. Newest version of Firefox loaded and it started then.

  • TS2756 Here is what worked for me for wifi

    Change your hotspot device name if it looks strange as a wifi SSID. eg use "John iPhone" instead of "John's iPhone" Got to Settings > FaceTime and scroll down to the bottom. Turn Use Cellular Data to off for FaceTime Turn your phone off. (I think thi