Something I'm missing about application processes in 4.1?

So I'm trying to create a new application in 4.1. I'm starting out with just the basic login page and I've created a custom Authorization scheme and login/logout procedures that work fine. On the home page, I'm trying to create a region that allows the user to create a new password. I can't get the process to fire - no completion message, no error message. It's supposed to fire after validations/page submit. Here's what it looks like:
declare
  v_usrid      NUMBER        := :G_USER_ID;
  v_usr        VARCHAR2(40);
  v_hash       VARCHAR2(40);
  v_old        VARCHAR2(40)  := :P1_OLD_PWD;
  v_new        VARCHAR2(40)  := :P1_NEW_PWD;
  v_newc       VARCHAR2(40)  := :P1_CONFIRM_NEW_PWD;
begin
  select ADMIN_USERNAME, PWD_HASH into v_usr, v_hash
    from APEX_ACCESS_CONTROL
   where ID = v_usrid;
  if HASH_PASSWORD(v_usr,v_old) = v_hash then
    --Old password matches hash, change password
    if v_new = v_newc then
      update APEX_ACCESS_CONTROL
         set PWD_HASH = HASH_PASSWORD(v_usr,v_new)
         where ID = v_usrid;
        --:new.updated_by := v_usr;
        --:new.updated_on := sysdate;
    end if;
  end if;
end;It worked fine in the last app under APEX 3.2 - I'm literally copying it across.
Just to see if I could get ANYTHING to fire, I created a second process that sets an application variable with the user's location. I use this for a lot of items in the application. It won't fire either. It's pretty simple:
declare
begin
  :G_KEY_LOC := :P1_KEY_LOC;
end;P1_KEY_LOC gets set (if null) to a value tied to the user's login (:APP_USER) from my authorization table and that is working fine. It seems like if I put it in a PL/SQL process, it just doesn't fire at all. What am I doing wrong?

BEFORE Page submit? Uh, in 3.2 I can have page processes that fire On Submit, After Validations and they work fine. If I try to do exactly the same thing here, they never fire. I use the validations to check the values in the fields. It's only AFTER the validations fire that I want the Page Process to fire, because I want the validations to do their job.
Right now, I have the process set to fire when a button is pushed. That's what I'm confused about. Did they change everything about how page processes fire in 4.1?

Similar Messages

  • DOC BUG 4.2: About On Demand Application Processes

    There is an error in Oracle Application Express Application Builder User's Guide Release 4.2 §8.8.1 "About On Demand Application Processes":
    An On Demand process is special type of application process which has a Process Point of On Demand and executes when called from a page-level On Demand process or from an AJAX call from the browser. On Demand processes are useful when you have PL/SQL logic that you would like to run from different execution points across multiple pages.
    On Demand processes should typically be created on a page and not at the application-level. On Demand processes created at the application-level are created with an initial authorization scheme of Must Not Be Public User. This prohibits the processes being invoked from users in authenticated sessions.
    As it is perfectly possible (and indeed desirable) for On Demand application processes to be invoked [only] by authenticated users, this should presumably read:
    An On Demand process is special type of application process which has a Process Point of On Demand and executes when called from a page-level On Demand process or from an AJAX call from the browser. On Demand processes are useful when you have PL/SQL logic that you would like to run from different execution points across multiple pages.
    On Demand processes should typically be created on a page and not at the application-level. On Demand processes created at the application-level are created with an initial authorization scheme of Must Not Be Public User. This prohibits the processes being invoked from users in unauthenticated sessions.
    Furthermore, the second paragraph is a new addition to the documentation for APEX 4.2. What is the reasoning for not creating On Demand processes at application level? I have used them for a number of years as a means to provide reusable, application-wide components (for example, file downloads and AJAX content) only to authenticated APEX sessions.

    Hi,
    thanks again. I added a note to the 5.0 docs.
    It is certainly fine to still create application-level On Demand processes. However, if a process is related to a single page only, it is immediately clear that the process is part of this page's interface. This is good from a maintenance point of view, because if you only use app-level processes, it can be harder to determine whether the process is still in use and where it is called from.
    Regards,
    Christian

  • Questions about application server architecture

    Hello guys,
    I have few questions about application server architecture�
    I have a task to build a server application which will do the following: Clients (special java clients) will connect to it and send some data for further processing on server side. Chunks of data will be relatively small but they will take a lot of time for processing (it is ok that it will be quite slow).
    Also server will run some sort of �database� where all clients� working data will be stored. So, in case a client loses its data he/she is always able to download it from the server.
    For me it seems, like server will consist of the following components:
    1. �Reception�. This part will be responsible for all client-communication procedures.
    2. �Data storage�. This part will simply store all clients� data and provide some API interface for clients through �reception� to manage it (add/get/delete and so on).
    3. �Processor�. Some sort of dummy-sophisticated module. It will take some input data from �data storage� when it receives order for this and process it. �Processor� will have two states: �busy� which means �processor� processing some data and �available� which means �processor� ready to process new data.
    4. �Manager�. This part will always check �data storage� for new data and �processor� for availability. When �processor� and new data are available �manager� will make an order for �processor� to take new data from �data storage� and process it.
    So, my question is the following: Which technology and approaches I should use to realize my plan?
    I think that I can make �reception� as a Session Bean, but I don�t know yet, what are the best for the rest, for example �manager� and �processor�. I was thinking about writing my own application server (and I can do it), but I would like to learn j2ee technologies, so I think it is a perfect chance for me (I read a lot about j2ee before I wrote this post, but all examples have only �account�-�bill�-�money transfer� I think it is quite far away from reality or I am doing something wrong ;-)!
    p.s. I am thinking about using JBoss as an Application Server. I tested it and wrote some tests. They work and run fast enough, so I like it. Moreover it has module architecture.
    Please, give me some advises and tips!
    Thank you in advance!

    1. �Reception�. This part will be responsible for all
    client-communication procedures.Session bean with remote interface.
    2. �Data storage�. This part will simply store all
    clients� data and provide some API interface for
    clients through �reception� to manage it
    (add/get/delete and so on).Session bean that will use entity beans or hibernate to work with persistant data.
    3. �Processor�. Some sort of dummy-sophisticated
    module.Use a message driven bean. Make Reception to enqueue a message when new data is available for processing. Processor will process the data and store the resut in database using Data Storage session bean.
    4. �Manager�. This part will always check �data
    storage� for new data and �processor� for
    availability. When �processor� and new data are
    available �manager� will make an order for
    �processor� to take new data from �data storage� and
    process it.It's redundand component, because application server will manage messages and processors.

  • 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.)

  • 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

  • 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.

  • Display issue with some browser : OnMouse based on An Application Process

    Hello,
    I am playing a little bit with the Application Process and I tried to create something like the Aria Demo (onmouseover="ARIA_DETAIL(this, '#PERSON_ID#')")
    Indeed, no problem to make it work (using a default template among the 20 provided by Apex) BUT the issue is the following :
    - With IE ... the DISPLAY of bulb (tooltip --> dynamic output based on Application Process / PL/SQL) is fine (right of the link where the mouse is placed).
    - With Chrome and/or Mozzila : the DISPLAY (bulb or the tooltip) is on the upper/left corner of the Report.
    I tried to use the theme template provided with the Aria Demo Appli (ID : 120) --> no problem with Chrome or Mozilla
    I am eager to know if this is something related to the template (and how to make it work if I use one of the template provided by Apex).
    ManyThanks in Advance
    Regards

    Can anyone help ?
    Gus

  • Username availability in post-login application processes

    Hi there,
    I have a problem with a post-login application procedure that sets session variables. Some of the variables are based on the username of the user that is logging in. I'm using the function htmldb_custom_auth.get_username to return the username. However, it always reports 'nobody' as the username.
    Is there a way to get the username of the logged-in user in a post-login application procedure?
    Robert

    By "post-login application procedure," I mean an application process whose "Process Point" property is set to "On New Session: After Authentication".That firing point means once per session at the point during the rendering of the requested page after the step where the user identity (if any) has been determined. If the first page requested is a public page (which might be the login page specified by your authentication scheme) then the user identity has not yet been established and will be null, 'nobody', 'APEX_PUBLIC_USER', 'ANONYMOUS', or perhaps some other public user name, depending on "how your application works".
    You should put code like I think you have in this process into the authentication scheme's Post-Authentication Process. This block will be executed after the login API has processed the login request and after a session has been created and registered with the authenticated username.
    I'm not sure what you're asking about how my application works.I was looking for a technical description of what you intend to happen in the scenario, e.g., User starts browser -> user requests URL like f?p=100:1, -> user sees login page which is page number 101 in application 100 and is specified as the Session Not Valid Page in the application's authentication scheme -> user enters username and password and presses Login button -> On New Session process should fire after login page is submitted and capture authentication username -> etc.
    Scott

  • Missing "View|Application Navigator" and "View|Connection Navigator"

    My default Oracle JDeveloper 10g Early Access 10.1.3.34.12 is missing "View|Application Navigator" and "View|Connection Navigator" from the View toolbar. Am I simply missing an additional installation or do I not have something configured correctly?
    Thanks,
    Scott

    Thanks for the answer, that's exactly what it is. I'm new to this environment and had it installed for me, hence I didn't see the differences at the download choosing time. Thanks again.

  • Raising an error in application process?

    How can I raise an error in an application process?
    the application process in on-load before header
    I want to check something at this event
    when not ok I want to show the process error message that can be defined at the aplication process.
    The help text of this process error message says:
    Enter the text for an error message that can be displayed if the process fails.
    Can I programmatically raise that error?
    kind regards Erik

    succes message that I want to show, but the process error message.AFAIK, the same variable works for success or error. So you if you assign it a value it would be shown as the process message.
    If required, you can style it using HTML to identify between success and error cases
    &lt;span style=&quot;color:GREEN&quot;&gt;Successs Message&lt;/span&gt;or
    &lt;span style=&quot;color:RED&quot;&gt;ErrorMessage&lt;/span&gt;
    When I raise the error in the exception part I do get the process error message, but I also get User-Defined-ExceptionThen don't raise any exception, just assign the variable in the exception handler alone in the PLSQL Block.

  • ORA-01403: On Demand Application Process

    Hi
    I have an application process that I pass the customer name into and it returns the SUGGESTED field.
    declare
      l_ID varchar2(100);
    begin
        select distinct SUGGESTED into l_ID from dealers, sr_customers
        where AGREED = 'Y'
        and dealers.CORP_NAME = sr_customers.corp
        and sr_customers.corp = :TEMPORARY_ITEM;
        IF l_ID IS NULL THEN
           htp.prn('NONE');
        ELSE
           htp.prn(l_ID);
        END IF;
    end;The problem I have is when there isn't a record for this customer instead of returning NONE it returns sqlerrm:ORA-01403: no data found
    How can I fix this?
    Regards
    Adam

    Hi Adam,
    Use a cursor instead:
    declare
      l_ID varchar2(100);
      c  SYS_REFCURSOR;
    begin
        OPEN c FOR
                  select distinct SUGGESTED
                  from dealers, sr_customers
                  where AGREED = 'Y'
                  and dealers.CORP_NAME = sr_customers.corp
                  and sr_customers.corp = :TEMPORARY_ITEM;
          FETCH c INTO l_ID; 
          IF c%NOTFOUND THEN
             htp.prn('NONE');
          ELSE 
          htp.prn( l_ID);
        END IF;
    CLOSE c;
    end;
    And it is considered a best practice, to use V('ITEM') in PL/SQL to reference items.
    Bind variable will do just fine..
    Hope it helps,
    Greetings,
    Rutger
    Edited by: Rutger on Oct 8, 2008 7:57 AM
    Edit: Sorry mixed something up, should work now
    Edited by: Rutger on Oct 8, 2008 8:02 AM

  • Shared Components Application Processes - (Documentation for Reset

    There's a "Reset" button on the page, Application Builder > ... > Shared Components > Application Processes. But before everyone jumps in to tell me that it does a reset ... that's not my question.
    My question is: <font color="green"><font size="4">Where is this button documented, please?</font><font color="black">{Thanks -- Howard (newbie)
    </font>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi,
    If you like purge other users sessions this might help
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21678/aadm_mg_sessions.htm#CHDHBFBJ
    But do not mix this idea to your other post about session
    Want to tie initialization to login using some reasonably easy way.
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • Is there something I am missing?

    Question
    After using Firefox and either using the X in the upper right corner or file, exit and attempt to reopen it, I get a message it is still running. I have even tried to use CTRL, ALT, DEL and use task managet to close firefox in the process window but that doesn't work either. The only way I found to fix the problem is to restart windowx XP Home. Is there something I am missing?

    hmm, that should close it. after you close it is there anything in the taskbar running.
    Maybe try starting it in [[Safe Mode]], this would rule out an extension holding on to the process.

  • HELP!!  I'm missing about 30 songs and a book!  They were just here!

    I tried to backup my itouch yesterday and I think it deleted about 30+ songs and a book. They were all here yesterday...but now they are gone! I can prove I purchased them all through the purchase history on my itunes account. But they are gone from my itouch. All of my other songs seem to be in tact (about 128). Just these 30+ songs and the book. They just disappeared! Will apple let me get them back? About $40 worth of music!

    Nope; that's the thing. I thought I synced up my itouch yesterday. But I went to listen to my audio book tonight it was gone. So I checked my itunes library and it wasn't there either. Then I also noticed a lot of my music wasn't there as well. So I checked my itouch a little more thoroughly and that too is missing music1 So something really bad must have happened. basically, I'm missing about 30+ songs and a book. for what its worth, I can prove I purchased everything based on my itunes purchase history. I guess I'm just wondering or hoping Apple will let me download again.

Maybe you are looking for

  • How can i reset my download setting, to its orignial form. ie: with the option to save and open files

    How can i open files, instead of having them just save. there was a option with save or open, and normally i open but i clicked save and i have tried several ways to fix it, none of them work. any and all help would be nice == This happened == Every

  • Returning a collection of data

    Hi all, Took me ages to finally post this cause the forum server seems to be having problems. I want to do a query in a function then return a series of results back to the calling process. Can someone tell me what is the best method of doing this? N

  • Help in Mapping please help

    Hi, I have a requirement with the source structure looking as Sourece : ACCOUNTGL 0....1 item 0...unbounded ITEMNO_ACC 0....1 CURRENCYAMOUNT 0....1 item 0...unbounded ITEMNO_ACC 0....1 CURRENCY_TYPE 0....1 CURRENCY 0.....1 XXXXXX 0......1 TARGET STRU

  • Scenario for GRPO

    Hi All,          I am facing a problem here while handling a scenario in GRPO. Any suggestions would be greatly appreciated. Scenario : GRPO is copied from Purchase order. PO can have upto 200 line items. If the qty of any item is recieved less than

  • IPad Air and random crashes

    Greetings, I'm now on my 3rd iPad (still have my original iPad, and an iPad 3), and just bought an iPad Air, so I've been around them since their inception. I must admit that I've never had any issues with my iPads, until I purchased this Air. I don'