Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Issue Setting Application Items within apex.server.process for an ***Application*** Process

Joseph UpshawFeb 11 2014 — edited Feb 26 2014

We've been switching out all of our htmldb_get calls for the preferred (and documented and supported!) apex.server.process method. This has worked well so far for invoking AJAX processes from JavaScript so long as the AJAX process in question has been a *Page* level process. However, when we attempt to consume an *Application* process, it just does not appear to be working.

For the examples below, we have two Application Items named PRS_PRODUCT_PROFILE_ID and PRS_PROFILE_OPERATION. We have an On Demand Application Process (*not* a page process!) named MAINTAIN_PRODUCT_PROFILE_2.

Here is the previous htmldb_get approach (which works fine):

function resynchronizeProductProfile(productProfileID)

{

    var profileOperation = 'EDIT_PROFILE';

    var ajaxRequest = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=MAINTAIN_PRODUCT_PROFILE_2',0);

    ajaxRequest.add( 'PRS_PRODUCT_PROFILE_ID', productProfileID );

    ajaxRequest.add( 'PRS_PROFILE_OPERATION', profileOperation );

    var resynchronizeResult = ajaxRequest.get();

    ajaxRequest = null;

    return resynchronizeResult;

}

Here is the (what I think is the) same call using the new apex.server.process approach:

function resynchronizeProductProfile(productProfileID)

{

    var resynchronizeResult;

    $s( 'PRS_PRODUCT_PROFILE_ID', productProfileID );

    $s( 'PRS_PROFILE_OPERATION', 'EDIT_PROFILE' );

    apex.server.process(   'MAINTAIN_PRODUCT_PROFILE_2'

                     , { pageItems: "#PRS_PRODUCT_PROFILE_ID,#PRS_PROFILE_OPERATION" }

                     , { dataType: "text",

                         async: false,

                         complete: function( ajaxResponse )

                                  {                                    

                                    var resynchronizeResult = ajaxResponse.responseText;

                                  }

                       });

    return resynchronizeResult;

}

However, in the new version, the arguments do not appear to be getting set when the MAINTAIN_PRODUCT_PROFILE_2 application process is invoked. PRS_PROFILE_OPERATION, for example, is set to '' although, above, you can see that it is, in fact, hard coded to 'EDIT_PROFILE'

Typically, the call to apex.server.process sets item values both in the page and in the session in one step. This doesn't appear to be happening with Application Items (although it works just fine for Page Items).

What's up with this? Anyone see my error?

Thanks,

-Joe

Message was edited by: Joe Upshaw

This post has been answered by Tom Petrus on Feb 26 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 26 2014
Added on Feb 11 2014
10 comments
9,065 views