Domain Portal

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Thursday, 26 June 2008

How To Call Remote Task Flow in JDeveloper 11g

Posted on 14:05 by Unknown
After my last week presentation on ODTUG Kaleidoscope'08 - Development with Oracle JDeveloper/ADF 11g Reusing 10g Best Practices, I was discussing with a guy from auditory and he have talked to me about problems with remote task flow invocation in JDeveloper 11g. So, in this post I will cover this topic. Generally speaking, possibility to call remote task flow is new feature in JDeveloper 11g and there are still problems in Technology Preview 4 in this area. You can refer to OTN Forum post - TP4 error with calling remote taskflow. Actually, currently it works, but only when calling remote task flow directly with complete URL. In my sample application I have implemented this case.

You can download two parts - JobsLocal.zip and JobsRemote.zip. Those two parts are completely separate applications, however from JobsLocal I'm calling remote task flow available in JobsRemote application. Implemented functionality - in JobsLocal user can select Job from a table and pass selected Job key to remote application, where master-detail form for Job and Employees is opened according to passed key value. Both applications are implemented based on HR schema from Oracle XE database.

JobsRemote application contains bounded task flow - this task flow is called from JobsLocal:


You can notice back control flow case pointing to URL View activity. This activity is used when going back from Remote application - in this case I'm going back by calling jobs page from Local application by URL:


If you will run this sample on your local computer, make sure that you are using correct URL.

Task flow in JobsRemote application accepts parameter for setCurrentRowWithKeyValue action:


When task flow in Remote application is defined and components on the page are created, its time to create deployment profile - ADF Library JAR File. We will pack our Remote application as JAR file in order to use defined task flow in Local application:


In order to create JAR after deployment profile is set, just right-click on ViewController and choose Deploy -> Deployment Profile Name -> to ADF Library:


Now its time for JobsLocal application, at first add generated JAR library to Application Resources by selecting New Connection -> File System... in JDeveloper 11g section called Application Resources:


In opened dialog - Create File System Connection, provide Connection Name and Directory Path. Optionally you can Test connection and if Status is positive press OK button:


Library with JobsRemote application task flow is added and you can drag and drop it to the task flow in JobsLocal:


When you will drag and drop it, JDeveloper 11g will create it as Task Flow Call activity:


Only one thing you will need to do is to provide URL for remote application. In our case, I'm constructing URL dynamically in Backing bean method (make sure it is correct in your environment):


getRemoteTaskFlowURL() method retrieves selected row key from Jobs table and adds it as a parameter to remote task flow URL. I'm using the same name for parameter as it is defined in task flow from JobsRemote application.

You can run both applications in parallel directly from JDeveloper 11g, just you will need to use Integrated OC4J option, by default Embedded OC4J option is used. You can switch just by opening Tools -> Java EE Runtime Preferences.

At first, you will need to run bounded task flow from JobsRemote application, since this task flow is called from JobsLocal.

When JobsRemote will be up and running, run jobs.jspx page available in JobsLocal application, you will get similar screen:


In my case I have selected row with JobId = SA_MAN. When Edit Job button is pressed, it navigates to task flow available in remote application - JobsRemote by passing selected job key value:


Remote application is opened with correct data for provided key. You can edit and save data from this screen. Button - Back, through URL call will navigate to original jobs.jspx page in JobsLocal application:

Email ThisBlogThis!Share to XShare to Facebook
Posted in ADF, JDeveloper 11g | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Groovy - Multiple LOV's per Attribute in JDeveloper 11g
    I was blogging previously about multiple LOV's per attribute functionality. I was using RowImpl class for View object in order to calcu...
  • External Transaction Service in Oracle TopLink
    I have developed sample application, in order to demonstrate how to use External Transaction Service (ETS), when Oracle TopLink is used in M...
  • Workaround for Null Value Bug in ADF List Of Values 11g
    Those of you, who are using List Of Values (LOV) component in ADF 11g, most probably already have noticed bug related to Null value. Simple ...
  • Trip to US
    I'm in US this week, Connecticut. Here is the same weather as in Lithuania, it's winter with about -5 degrees in Celsius.
  • Oracle ADF - between 4GL and J2EE is only one step
    According to ADF architecture described in Oracle JDeveloper 10g (10.1.3) Developer's Guide Section 1.1.1 - Framework Architecture and S...
  • Creating new row using CreateInsert operation
    Sample application - CreateInsert.zip , demonstrates how to create editable table with 'create new row' functionality in ADF BC. We ...
  • Show Buttons based on Disclosed Tab
    In 11g it becomes quite common use case to structure application page with tabbed panels. If you develop your pages based on templates, most...
  • Multilanguage in fixed af:selectOneChoice ADF Faces component
    If someone will face a problem how to enable multilanguage support in fixed af:selectOneChoice component, or simply how to bind fixed af:sel...
  • JDeveloper 11g on Mac OS X Leopard
    I'm using Apple Mac Book Pro for about half of a year, but shame for me all this time I was running Windows OS using Apple Boot Camp so...
  • Why I'm here?
    Oracle for me is more then technology, it is a way how I think. So, I'm creating this blog in order to express my knowledge in Oracle Fu...

Categories

  • ADF
  • Apex
  • Apple
  • BPEL
  • Events
  • Forms
  • Groovy
  • JDeveloper 11g
  • Nomination
  • ODTUG Kaleidoscope
  • OFUG
  • Oracle Magazine
  • Oracle OpenWorld
  • Security
  • SOA
  • Spatial
  • TopLink
  • Traveling
  • Uncategorized
  • Vgo Software
  • Web Services
  • WebCenter
  • WebLogic
  • Workarounds

Blog Archive

  • ▼  2008 (72)
    • ►  December (2)
    • ►  November (3)
    • ►  October (9)
    • ►  September (4)
    • ►  August (9)
    • ►  July (6)
    • ▼  June (10)
      • How To Call Remote Task Flow in JDeveloper 11g
      • Good Bye New Orleans - I'm Going Home
      • APEX Versus ADF
      • Funny Souvenir from New Orleans
      • ODTUG Kaleidoscope 2008
      • One Day Before ODTUG Kaleidoscope 2008
      • Oracle Open World 2008 - Abstract Accepted
      • Dynamic Buttons in Oracle ADF
      • Oracle Forms Modernization on Oracle Mix
      • Greece in One Day
    • ►  May (4)
    • ►  April (5)
    • ►  March (7)
    • ►  February (5)
    • ►  January (8)
  • ►  2007 (65)
    • ►  December (6)
    • ►  November (7)
    • ►  October (6)
    • ►  September (4)
    • ►  August (3)
    • ►  July (4)
    • ►  June (6)
    • ►  May (5)
    • ►  April (6)
    • ►  March (4)
    • ►  February (5)
    • ►  January (9)
  • ►  2006 (9)
    • ►  December (9)
Powered by Blogger.

About Me

Unknown
View my complete profile